Loading...
Searching...
No Matches
MeshDataAdapter Interface Reference

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

`#include <openvdb/tools/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;
};
MeshDataAdapter
Convert polygonal meshes that consist of quads and/or triangles into signed or unsigned distance fiel...
openvdb::v10_0::math::Vec3d
Vec3< double > Vec3d
Definition Vec3.h:664

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