HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh Struct Reference

Mesh any scalar grid that has a continuous isosurface. More...

#include <VolumeToMesh.h>

Public Member Functions

 VolumeToMesh (double isovalue=0, double adaptivity=0, bool relaxDisorientedTriangles=true)
 
template<typename InputGridType >
void operator() (const InputGridType &)
 Main call. More...
 
void setRefGrid (const GridBase::ConstPtr &grid, double secAdaptivity=0)
 When surfacing fractured SDF fragments, the original unfractured SDF grid can be used to eliminate seam lines and tag polygons that are coincident with the reference surface with the POLYFLAG_EXTERIOR flag and polygons that are in proximity to the seam lines with the POLYFLAG_FRACTURE_SEAM flag. (The performance cost for using this reference based scheme compared to the regular meshing scheme is approximately 15% for the first fragment and neglect-able for subsequent fragments.) More...
 
void setSurfaceMask (const GridBase::ConstPtr &mask, bool invertMask=false)
 
void setSpatialAdaptivity (const GridBase::ConstPtr &grid)
 
void setAdaptivityMask (const TreeBase::ConstPtr &tree)
 
size_t pointListSize () const
 
PointListpointList ()
 
const PointListpointList () const
 
size_t polygonPoolListSize () const
 
PolygonPoolListpolygonPoolList ()
 
const PolygonPoolListpolygonPoolList () const
 
std::vector< uint8_t > & pointFlags ()
 
const std::vector< uint8_t > & pointFlags () const
 

Detailed Description

Mesh any scalar grid that has a continuous isosurface.

Definition at line 188 of file VolumeToMesh.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::VolumeToMesh ( double  isovalue = 0,
double  adaptivity = 0,
bool  relaxDisorientedTriangles = true 
)
inline
Parameters
isovalueDetermines which isosurface to mesh.
adaptivityAdaptivity threshold [0 to 1]
relaxDisorientedTrianglesToggle relaxing disoriented triangles during adaptive meshing.

Definition at line 4816 of file VolumeToMesh.h.

Member Function Documentation

template<typename InputGridType >
void openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::operator() ( const InputGridType &  inputGrid)
inline

Main call.

Note
Call with scalar typed grid.

Definition at line 4877 of file VolumeToMesh.h.

std::vector<uint8_t>& openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::pointFlags ( )
inline

Definition at line 210 of file VolumeToMesh.h.

const std::vector<uint8_t>& openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::pointFlags ( ) const
inline

Definition at line 211 of file VolumeToMesh.h.

PointList& openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::pointList ( )
inline

Definition at line 203 of file VolumeToMesh.h.

const PointList& openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::pointList ( ) const
inline

Definition at line 204 of file VolumeToMesh.h.

size_t openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::pointListSize ( ) const
inline

Definition at line 202 of file VolumeToMesh.h.

PolygonPoolList& openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::polygonPoolList ( )
inline

Definition at line 207 of file VolumeToMesh.h.

const PolygonPoolList& openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::polygonPoolList ( ) const
inline

Definition at line 208 of file VolumeToMesh.h.

size_t openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::polygonPoolListSize ( ) const
inline

Definition at line 206 of file VolumeToMesh.h.

void openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::setAdaptivityMask ( const TreeBase::ConstPtr tree)
inline
Parameters
treeA boolean tree whose active topology defines the adaptivity mask.
Note
The tree configuration has to match GridT's tree configuration.

Definition at line 4869 of file VolumeToMesh.h.

void openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::setRefGrid ( const GridBase::ConstPtr grid,
double  secAdaptivity = 0 
)
inline

When surfacing fractured SDF fragments, the original unfractured SDF grid can be used to eliminate seam lines and tag polygons that are coincident with the reference surface with the POLYFLAG_EXTERIOR flag and polygons that are in proximity to the seam lines with the POLYFLAG_FRACTURE_SEAM flag. (The performance cost for using this reference based scheme compared to the regular meshing scheme is approximately 15% for the first fragment and neglect-able for subsequent fragments.)

Note
Attributes from the original asset such as uv coordinates, normals etc. are typically transfered to polygons that are marked with the POLYFLAG_EXTERIOR flag. Polygons that are not marked with this flag are interior to reference surface and might need projected UV coordinates or a different material. Polygons marked as POLYFLAG_FRACTURE_SEAM can be used to drive secondary elements such as debris and dust in a FX pipeline.
Parameters
gridreference surface grid of GridT type.
secAdaptivitySecondary adaptivity threshold [0 to 1]. Used in regions that do not exist in the reference grid. (Parts of the fragment surface that are not coincident with the reference surface.)

Definition at line 4840 of file VolumeToMesh.h.

void openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::setSpatialAdaptivity ( const GridBase::ConstPtr grid)
inline
Parameters
gridA scalar grid used as a spatial multiplier for the adaptivity threshold.
Note
The grid's tree configuration has to match GridT's tree configuration.

Definition at line 4862 of file VolumeToMesh.h.

void openvdb::OPENVDB_VERSION_NAME::tools::VolumeToMesh::setSurfaceMask ( const GridBase::ConstPtr mask,
bool  invertMask = false 
)
inline
Parameters
maskA boolean grid whose active topology defines the region to mesh.
invertMaskToggle to mesh the complement of the mask.
Note
The mask's tree configuration has to match GridT's tree configuration.

Definition at line 4854 of file VolumeToMesh.h.


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