![]() |
OpenVDB 13.0.1
|
Class that implements the actual shrink wrap algorithm. More...
#include <openvdb/tools/PolySoupToLevelSet.h>
Public Member Functions | |
| PolySoupToLevelSet (PolySoup &&poly, int dim, float width=float(LEVEL_SET_HALF_WIDTH)) | |
| Constructor from a desired voxel dimension. | |
| PolySoupToLevelSet (PolySoup &&poly, float voxelSize, float width=float(LEVEL_SET_HALF_WIDTH)) | |
| Constructor from a desired voxel size. | |
| template<class ShrinkWrapT, class ProgressT> | |
| void | process (const ShrinkWrapT &D, ProgressT *progress, int mode=0) |
| Performs the actual processing to generate the shrink wrap surfaces. | |
| size_t | gridCount () const |
| Number of shrink wrap grids generated, i.e. depth of the LOD hierarchy. | |
| GridType::Ptr | grid (int n=0) const |
| Returns a shared pointer to a particular shrink wrap grid. | |
| std::vector< typename GridType::Ptr > | grids () const |
| Vector with shared pointers to all the shrink wrap grids. | |
| const PolySoup & | mesh (int n=0, float adaptivity=0.005f, float isoValue=0.0f) |
| Generate an adaptive polygon mesh from a particular shrink wrap SDF. | |
| auto | offset (float dx, int mode=0) |
| Generates a dx-offset level set surface from the internal polygon soup. | |
| float | minVoxelSize () const |
| Returns the finest/smallest voxel size, in world units, i.e. the voxel size of the final (highest-resolution) level set surface. | |
| float | maxVoxelSize () const |
| Returns the coarsest/largest voxel size, in world units, used to initiate the coarse-to-fine shrink wrap algorithm. | |
| float | halfWidth () const |
| Returns the half-width of the output narrow-band level set, in voxel units. | |
Static Public Member Functions | |
| static math::BBox< Vec3f > | getBBox (const std::vector< Vec3s > &vtx) |
| Static method that computes the bounding box of a list of vertex coordinates. | |
Class that implements the actual shrink wrap algorithm.
This class implements our shrink wrap algorithm. Normally the free-standing function called above should be used instead of this class.
| PolySoupToLevelSet | ( | PolySoup && | poly, |
| int | dim, | ||
| float | width = float(LEVEL_SET_HALF_WIDTH) ) |
Constructor from a desired voxel dimension.
| poly | Polygon soup that will be moved to this instance. |
| dim | Desired voxel dimension of the output level set. |
| width | Half-width of the output narrow-band level set, in voxel units. |
| PolySoupToLevelSet | ( | PolySoup && | poly, |
| float | voxelSize, | ||
| float | width = float(LEVEL_SET_HALF_WIDTH) ) |
Constructor from a desired voxel size.
| poly | Polygon soup that will be moved to this instance. |
| voxelSize | Desired voxel size of the output level set in world units. |
| width | Half-width of the output narrow-band level set, in voxel units. |
|
static |
Static method that computes the bounding box of a list of vertex coordinates.
| vtx | Vector of vertex coordinates. |
|
inline |
Returns a shared pointer to a particular shrink wrap grid.
| n | Number of the shrink wrap grid, where n = 0 has the finest sampling and n = gridCount-1 is the coarsest voxel sampling. |
|
inline |
Number of shrink wrap grids generated, i.e. depth of the LOD hierarchy.
|
inline |
Vector with shared pointers to all the shrink wrap grids.
|
inline |
Returns the half-width of the output narrow-band level set, in voxel units.
|
inline |
Returns the coarsest/largest voxel size, in world units, used to initiate the coarse-to-fine shrink wrap algorithm.
|
inline |
Generate an adaptive polygon mesh from a particular shrink wrap SDF.
| n | Number of the shrink wrap grid, where n = 0 has the finest sampling and n = gridCount-1 is the coarsest voxel sampling. |
| adaptivity | Optional adaptivity parameter used for meshing. A value of zero means adaptivity is disabled, i.e. uniform quads are produced. |
| isoValue | Iso-value used for the mesh generation. |
|
inline |
Returns the finest/smallest voxel size, in world units, i.e. the voxel size of the final (highest-resolution) level set surface.
| auto offset | ( | float | dx, |
| int | mode = 0 ) |
Generates a dx-offset level set surface from the internal polygon soup.
| dx | Voxel size (world units) of the output level set. |
| mode | 0) old method (using mesh -> UDF -> mesh -> SDF), 1) Mihai's signed-flood-fill and 2) Greg's createLevelSetDilatedMesh |
| void process | ( | const ShrinkWrapT & | D, |
| ProgressT * | progress, | ||
| int | mode = 0 ) |
Performs the actual processing to generate the shrink wrap surfaces.
| ShrinkWrapT | Optional template parameter of the functor controlling the number of constrained erosion steps (see our paper). |
| ProgressT | Template parameter of the optional progress bar. |
| D | Optional functor controlling the number of constrained erosion steps and the closing threshold (see our paper). |
| progress | Optional pointer to a progress bar. |
| mode | EXPERIMENTAL parameter that will be removed in the near future. It should only be used by experts! |