OpenVDB 5.1.0

MeshDataAdapter Interface Reference

Convert polygonal meshes that consist of quads and/or triangles into signed or unsigned distance field volumes. More...

`#include <MeshToVolume.h>`

## Detailed Description

Convert polygonal meshes that consist of quads and/or triangles into signed or unsigned distance field volumes.

Note
  Requires a closed surface but not necessarily a manifold surface. Supports surfaces with self intersections and degenerate faces and is independent of mesh surface normals.

Expected interface for the MeshDataAdapter class

struct MeshDataAdapter {
size_t polygonCount() const; // Total number of polygons
size_t pointCount() const; // Total number of points
size_t vertexCount(size_t n) const; // Vertex count for polygon n
// Return position pos in local grid index space for polygon n and vertex v
void getIndexSpacePoint(size_t n, size_t v, openvdb::Vec3d& pos) const;
};

Parameters

  mesh | mesh data access class that conforms to the MeshDataAdapter interface
  transform | world-to-index-space transform
  exteriorBandWidth | exterior narrow band width in voxel units
  interiorBandWidth | interior narrow band width in voxel units (set to std::numeric_limits<float>::max() to fill object interior with distance values)
  flags | optional conversion flags defined in `MeshToVolumeFlags`
  polygonIndexGrid | optional grid output that will contain the closest-polygon index for each voxel in the narrow band region

The documentation for this interface was generated from the following file:

- MeshToVolume.h