meshToLevelset

carb::volume::GridData* meshToLevelset(const float* points,
                                    size_t numPoints,
                                    const uint32_t* faceVertexIndices,
                                    size_t numFaceVertexIndices,
                                    const uint32_t* faceVertexCounts,
                                    size_t numFaceVertexCounts,
                                    int dim,
                                    float voxel,
                                    float width)

Get a level set volume from mesh data.

Arguments

  • points The vertex coordinates.

  • numPoints The number of vertices.

  • faceVertexIndices The face vertex indices.

  • numFaceVertexIndices The number of face vertex indices.

  • faceVertexCounts The list of numbers of face vertices per face (3 or 4).

  • numFaceVertexCounts The number of faces.

  • dim The largest dimension in voxel units of the mesh bbox (defaults to 256). If voxel is defined then ‘dim’ is ignored”.

  • voxel The voxel size in world units (by defaults dim is used to derive voxel). If specified this option takes precedence over dim.

  • width The half-width in voxel units of the output narrow-band level set (defaults to 3 units on either side of the zero-crossing).

Return

The level set volume created.