HDK
|
Classes | |
class | ChangeBackgroundOp |
class | ChangeLevelSetBackgroundOp |
struct | CompReplaceOp |
class | CsgVisitorBase |
struct | CsgUnionVisitor |
struct | CsgIntersectVisitor |
struct | CsgDiffVisitor |
class | DenseBase |
Base class for Dense which is defined below. More... | |
class | DenseBase< ValueT, LayoutZYX > |
Partial template specialization of DenseBase. More... | |
class | DenseBase< ValueT, LayoutXYZ > |
Partial template specialization of DenseBase. More... | |
class | Dense |
Dense is a simple dense grid API used by the CopyToDense and CopyFromDense classes defined below. More... | |
class | CopyToDense |
Copy an OpenVDB tree into an existing dense grid. More... | |
class | CopyFromDense |
Copy the values from a dense grid into an OpenVDB tree. More... | |
struct | DSConverter |
class | SparseExtractor |
Functor-based class used to extract data that satisfies some criteria defined by the embedded OpType functor. The extractSparseTree function wraps this class. More... | |
class | SparseMaskedExtractor |
Functor-based class used to extract data from a dense grid, at the index-space intersection with a supplied mask in the form of a sparse tree. The extractSparseTreeWithMask function wraps this class. More... | |
struct | ExtractAll |
a simple utility class used by extractSparseTreeWithMask More... | |
class | DenseTransformer |
Class that applies a functor to the index space intersection of a prescribed bounding box and the dense grid. NB: This class only supports DenseGrids with ZYX memory layout. More... | |
struct | ContiguousOp |
a wrapper struct used to avoid unnecessary computation of memory access from Coord when all offsets are guaranteed to be within the dense grid. More... | |
class | SparseToDenseCompositor |
struct | CheckNan |
Checks NaN values. More... | |
struct | CheckInf |
Checks for infinite values, e.g. 1/0 or -1/0. More... | |
struct | CheckFinite |
Checks for both NaN and inf values, i.e. any value that is not finite. More... | |
struct | CheckMagnitude |
Check that the magnitude of a value, a, is close to a fixed magnitude, b, given a fixed tolerance c. That is | |a| - |b| | <= c. More... | |
struct | CheckRange |
Checks a value against a range. More... | |
struct | CheckMin |
Checks a value against a minimum. More... | |
struct | CheckMax |
Checks a value against a maximum. More... | |
struct | CheckNormGrad |
Checks the norm of the gradient against a range, i.e. ![]() | |
struct | CheckEikonal |
Checks the norm of the gradient at zero-crossing voxels against a range. More... | |
struct | CheckDivergence |
Checks the divergence against a range. More... | |
class | Diagnose |
Performs multithreaded diagnostics of a grid. More... | |
class | CheckLevelSet |
Class that performs various types of checks on narrow-band level sets. More... | |
class | CheckFogVolume |
Class that performs various types of checks on fog volumes. More... | |
class | Filter |
Volume filtering (e.g., diffusion) with optional alpha masking. More... | |
struct | VectorToScalarConverter |
VectorToScalarConverter<VectorGridType>::Type is the type of a grid having the same tree configuration as VectorGridType but a scalar value type, T, where T is the type of the original vector components. More... | |
struct | ScalarToVectorConverter |
ScalarToVectorConverter<ScalarGridType>::Type is the type of a grid having the same tree configuration as ScalarGridType but value type Vec3<T> where T is ScalarGridType::ValueType. More... | |
class | Cpt |
Compute the closest-point transform of a scalar grid. More... | |
class | Curl |
Compute the curl of a vector grid. More... | |
class | Divergence |
Compute the divergence of a vector grid. More... | |
class | Gradient |
Compute the gradient of a scalar grid. More... | |
class | Laplacian |
class | MeanCurvature |
class | Magnitude |
class | Normalize |
class | GridResampler |
class | GridTransformer |
A GridTransformer applies a geometric transformation to an input grid using one of several sampling schemes, and stores the result in an output grid. More... | |
class | ABTransform |
This class implements the Transformer functor interface (specifically, the isAffine(), transform() and invTransform() methods) for a transform that maps an A grid into a B grid's index space such that, after resampling, A's index space and transform match B's index space and transform. More... | |
struct | Sampler |
Provises a unified interface for sampling, i.e. interpolation. More... | |
struct | PointSampler |
struct | BoxSampler |
struct | QuadraticSampler |
struct | StaggeredPointSampler |
struct | StaggeredBoxSampler |
struct | StaggeredQuadraticSampler |
class | GridSampler |
Class that provides the interface for continuous sampling of values in a tree. More... | |
class | GridSampler< tree::ValueAccessor< TreeT >, SamplerType > |
Specialization of GridSampler for construction from a ValueAccessor type. More... | |
class | DualGridSampler |
This is a simple convenience class that allows for sampling from a source grid into the index space of a target grid. At construction the source and target grids are checked for alignment which potentially renders interpolation unnecessary. Else interpolation is performed according to the templated Sampler type. More... | |
class | DualGridSampler< tree::ValueAccessor< TreeT >, SamplerT > |
Specialization of DualGridSampler for construction from a ValueAccessor type. More... | |
class | AlphaMask |
struct | Sampler< 0, false > |
struct | Sampler< 1, false > |
struct | Sampler< 2, false > |
struct | Sampler< 0, true > |
struct | Sampler< 1, true > |
struct | Sampler< 2, true > |
class | LevelSetAdvection |
Hyperbolic advection of narrow-band level sets in an external velocity field. More... | |
class | LevelSetFilter |
Filtering (e.g. diffusion) of narrow-band level sets. An optional scalar field can be used to produce a (smooth) alpha mask for the filtering. More... | |
class | LevelSetFracture |
Level set fracturing. More... | |
class | DiracDelta |
Smeared-out and continuous Dirac Delta function. More... | |
class | LevelSetMeasure |
Multi-threaded computation of surface area, volume and average mean-curvature for narrow band level sets. More... | |
class | LevelSetMorphing |
Shape morphology of level sets. Morphing from a source narrow-band level sets to a target narrow-band level set. More... | |
class | LevelSetSphere |
Generates a signed distance field (or narrow band level set) to a single sphere. More... | |
class | LevelSetTracker |
Performs multi-threaded interface tracking of narrow band level sets. More... | |
struct | QuadAndTriangleDataAdapter |
Contiguous quad and triangle data adapter class. More... | |
class | MeshToVoxelEdgeData |
Extracts and stores voxel edge intersection data from a mesh. More... | |
struct | DimToWord |
Mapping from a Log2Dim to a data type of size 2^Log2Dim bits. More... | |
struct | DimToWord< 3 > |
struct | DimToWord< 4 > |
struct | DimToWord< 5 > |
struct | DimToWord< 6 > |
class | Morphology |
class | DilationOp |
Class that performs multi-threaded dilation with support for active tiles. More... | |
class | MultiResGrid |
struct | ParticleAtlas |
class | ParticlesToLevelSet |
class | ClosestPointProjector |
class | PointAdvect |
class | ConstrainedPointAdvect |
struct | PointIndexLeafNode |
struct | PointIndexIterator |
Accelerated range and nearest-neighbor searches for point index grids. More... | |
struct | PointIndexFilter |
class | PointPartitioner |
class | BasePointScatter |
Forward declaration of base class. More... | |
class | UniformPointScatter |
The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes: More... | |
class | DenseUniformPointScatter |
Scatters a fixed (and integer) number of points in all active voxels and tiles. More... | |
class | NonUniformPointScatter |
Non-uniform scatters of point in the active voxels. The local point count is implicitly defined as a product of of a global density (called pointsPerVolume) and the local voxel (or tile) value. More... | |
class | PointsToMask |
Makes every voxel of a grid active if it contains a point. More... | |
class | InactivePruneOp |
class | TolerancePruneOp |
class | LevelSetPruneOp |
class | LinearSearchImpl |
Implements linear iterative search for an iso-value of the level set along the direction of the ray. More... | |
class | LevelSetRayIntersector |
This class provides the public API for intersecting a ray with a narrow-band level set. More... | |
class | VolumeRayIntersector |
This class provides the public API for intersecting a ray with a generic (e.g. density) volume. More... | |
class | LevelSetRayTracer |
A (very) simple multithreaded ray tracer specifically for narrow-band level sets. More... | |
class | VolumeRender |
A (very) simple multithreaded volume render specifically for scalar density. More... | |
class | Film |
A simple class that allows for concurrent writes to pixels in an image, background initialization of the image, and PPM or EXR file output. More... | |
class | BaseCamera |
Abstract base class for the perspective and orthographic cameras. More... | |
class | PerspectiveCamera |
class | OrthographicCamera |
class | BaseShader |
Abstract base class for the shaders. More... | |
class | MatteShader |
Shader that produces a simple matte. More... | |
class | MatteShader< Film::RGBA, SamplerType > |
class | NormalShader |
Color shader that treats the surface normal (x, y, z) as an RGB color. More... | |
class | NormalShader< Film::RGBA, SamplerType > |
class | PositionShader |
Color shader that treats position (x, y, z) as an RGB color in a cube defined from an axis-aligned bounding box in world space. More... | |
class | PositionShader< Film::RGBA, SamplerType > |
class | DiffuseShader |
Simple diffuse Lambertian surface shader. More... | |
class | DiffuseShader< Film::RGBA, SamplerType > |
class | SignedFloodFillOp |
struct | HomogeneousMatMul |
struct | MatMul |
struct | MatMulNormalize |
class | DiscreteField |
Thin wrapper class for a velocity grid. More... | |
class | EnrightField |
Analytical, divergence-free and periodic velocity field. More... | |
class | VelocitySampler |
class | VelocityIntegrator |
Performs Runge-Kutta time integration of variable order in a static velocity field. More... | |
class | VolumeAdvection |
Performs advections of an arbitrary type of volume in a static velocity field. The advections are performed by means of various derivatives of Semi-Lagrangian integration, i.e. backwards tracking along the hyperbolic characteristics followed by interpolation. More... | |
class | PolygonPool |
Collection of quads and triangles. More... | |
struct | VolumeToMesh |
Mesh any scalar grid that has a continuous isosurface. More... | |
class | ClosestSurfacePoint |
Accelerated closest surface point queries for narrow band level sets. More... | |
Typedefs | |
using | ParticleIndexAtlas = ParticleAtlas< PointIndexGrid > |
using | PointIndexTree = tree::Tree< tree::RootNode< tree::InternalNode< tree::InternalNode< PointIndexLeafNode< PointIndex32, 3 >, 4 >, 5 >>> |
Point index tree configured to match the default OpenVDB tree configuration. More... | |
using | PointIndexGrid = Grid< PointIndexTree > |
Point index grid. More... | |
using | UInt32PointPartitioner = PointPartitioner< uint32_t, 3 > |
using | PointList = hboost::scoped_array< openvdb::Vec3s > |
Point and primitive list types. More... | |
using | PolygonPoolList = hboost::scoped_array< PolygonPool > |
Point and primitive list types. More... | |
Enumerations | |
enum | MemoryLayout { LayoutXYZ, LayoutZYX } |
enum | DSCompositeOp { DS_OVER, DS_ADD, DS_SUB, DS_MIN, DS_MAX, DS_MULT, DS_SET } |
enum | MeshToVolumeFlags { UNSIGNED_DISTANCE_FIELD = 0x1, DISABLE_INTERSECTING_VOXEL_REMOVAL = 0x2, DISABLE_RENORMALIZATION = 0x4, DISABLE_NARROW_BAND_TRIMMING = 0x8 } |
Mesh to volume conversion flags. More... | |
enum | NearestNeighbors { NN_FACE = 6, NN_FACE_EDGE = 18, NN_FACE_EDGE_VERTEX = 26 } |
Voxel topology of nearest neighbors. More... | |
enum | TilePolicy { IGNORE_TILES, EXPAND_TILES, PRESERVE_TILES } |
Different policies when dilating trees with active tiles. More... | |
enum | { POLYFLAG_EXTERIOR = 0x1, POLYFLAG_FRACTURE_SEAM = 0x2, POLYFLAG_SUBDIVIDED = 0x4 } |
Polygon flags, used for reference based meshing. More... | |
Functions | |
template<typename TreeOrLeafManagerT > | |
void | changeBackground (TreeOrLeafManagerT &tree, const typename TreeOrLeafManagerT::ValueType &background, bool threaded=true, size_t grainSize=32) |
Replace the background value in all the nodes of a tree. More... | |
template<typename TreeOrLeafManagerT > | |
void | changeLevelSetBackground (TreeOrLeafManagerT &tree, const typename TreeOrLeafManagerT::ValueType &halfWidth, bool threaded=true, size_t grainSize=32) |
Replace the background value in all the nodes of a floating-point tree containing a symmetric narrow-band level set. More... | |
template<typename TreeOrLeafManagerT > | |
void | changeAsymmetricLevelSetBackground (TreeOrLeafManagerT &tree, const typename TreeOrLeafManagerT::ValueType &outsideWidth, const typename TreeOrLeafManagerT::ValueType &insideWidth, bool threaded=true, size_t grainSize=32) |
Replace the background values in all the nodes of a floating-point tree containing a possibly asymmetric narrow-band level set. More... | |
template<typename GridType > | |
OPENVDB_STATIC_SPECIALIZATION GridType::Ptr | clip (const GridType &grid, const BBoxd &bbox, bool keepInterior=true) |
Clip the given grid against a world-space bounding box and return a new grid containing the result. More... | |
template<typename GridType , typename MaskTreeType > | |
OPENVDB_STATIC_SPECIALIZATION GridType::Ptr | clip (const GridType &grid, const Grid< MaskTreeType > &mask, bool keepInterior=true) |
Clip a grid against the active voxels of another grid and return a new grid containing the result. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | csgUnion (GridOrTreeT &a, GridOrTreeT &b, bool prune=true) |
Given two level set grids, replace the A grid with the union of A and B. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | csgIntersection (GridOrTreeT &a, GridOrTreeT &b, bool prune=true) |
Given two level set grids, replace the A grid with the intersection of A and B. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | csgDifference (GridOrTreeT &a, GridOrTreeT &b, bool prune=true) |
Given two level set grids, replace the A grid with the difference A / B. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION GridOrTreeT::Ptr | csgUnionCopy (const GridOrTreeT &a, const GridOrTreeT &b) |
Threaded CSG union operation that produces a new grid or tree from immutable inputs. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION GridOrTreeT::Ptr | csgIntersectionCopy (const GridOrTreeT &a, const GridOrTreeT &b) |
Threaded CSG intersection operation that produces a new grid or tree from immutable inputs. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION GridOrTreeT::Ptr | csgDifferenceCopy (const GridOrTreeT &a, const GridOrTreeT &b) |
Threaded CSG difference operation that produces a new grid or tree from immutable inputs. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | compMax (GridOrTreeT &a, GridOrTreeT &b) |
Given grids A and B, compute max(a, b) per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | compMin (GridOrTreeT &a, GridOrTreeT &b) |
Given grids A and B, compute min(a, b) per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | compSum (GridOrTreeT &a, GridOrTreeT &b) |
Given grids A and B, compute a + b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | compMul (GridOrTreeT &a, GridOrTreeT &b) |
Given grids A and B, compute a * b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | compDiv (GridOrTreeT &a, GridOrTreeT &b) |
Given grids A and B, compute a / b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More... | |
template<typename GridOrTreeT > | |
OPENVDB_STATIC_SPECIALIZATION void | compReplace (GridOrTreeT &a, const GridOrTreeT &b) |
Copy the active voxels of B into A. More... | |
template<typename DenseT , typename GridOrTreeT > | |
void | copyToDense (const GridOrTreeT &sparse, DenseT &dense, bool serial=false) |
Populate a dense grid with the values of voxels from a sparse grid, where the sparse grid intersects the dense grid. More... | |
template<typename DenseT , typename GridOrTreeT > | |
void | copyFromDense (const DenseT &dense, GridOrTreeT &sparse, const typename GridOrTreeT::ValueType &tolerance, bool serial=false) |
Populate a sparse grid with the values of all of the voxels of a dense grid. More... | |
template<typename OpType , typename DenseType > | |
OpType::ResultTreeType::Ptr | extractSparseTree (const DenseType &dense, const OpType &functor, const typename OpType::ResultValueType &background, bool threaded=true) |
Selectively extract and transform data from a dense grid, producing a sparse tree with leaf nodes only (e.g. create a tree from the square of values greater than a cutoff.) More... | |
template<typename DenseType , typename MaskTreeType > | |
DSConverter< DenseType, MaskTreeType >::Type::Ptr | extractSparseTreeWithMask (const DenseType &dense, const MaskTreeType &mask, const typename DenseType::ValueType &background, bool threaded=true) |
Copy data from the intersection of a sparse tree and a dense input grid. The resulting tree has the same configuration as the sparse tree, but holds the data type specified by the dense input. More... | |
template<typename ValueT , typename OpType > | |
void | transformDense (Dense< ValueT, openvdb::tools::LayoutZYX > &dense, const openvdb::CoordBBox &bbox, const OpType &op, bool parallel=true) |
template<DSCompositeOp , typename TreeT > | |
void | compositeToDense (Dense< typename TreeT::ValueType, LayoutZYX > &dense, const TreeT &source, const TreeT &alpha, const typename TreeT::ValueType beta, const typename TreeT::ValueType strength, bool threaded=true) |
Composite data from a sparse tree into a dense array of the same value type. More... | |
template<typename ValueT , typename PointwiseOpT > | |
void | transformDense (Dense< ValueT, openvdb::tools::LayoutZYX > &dense, const openvdb::CoordBBox &bbox, const PointwiseOpT &functor, bool parallel) |
Apply a point-wise functor to the intersection of a dense grid and a given bounding box. More... | |
template<class GridType > | |
std::string | checkLevelSet (const GridType &grid, size_t number=9) |
Perform checks on a grid to see if it is a valid symmetric, narrow-band level set. More... | |
template<class GridType > | |
std::string | checkFogVolume (const GridType &grid, size_t number=6) |
Perform checks on a grid to see if it is a valid fog volume. More... | |
template<class GridType > | |
bool | uniqueInactiveValues (const GridType &grid, std::vector< typename GridType::ValueType > &values, size_t numValues) |
Threaded method to find unique inactive values. More... | |
template<typename GridType , typename InterruptT > | |
ScalarToVectorConverter < GridType >::Type::Ptr | cpt (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the Closest-Point Transform (CPT) from a distance field. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
ScalarToVectorConverter < GridType >::Type::Ptr | cpt (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
ScalarToVectorConverter < GridType >::Type::Ptr | cpt (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
ScalarToVectorConverter < GridType >::Type::Ptr | cpt (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | curl (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the curl of the given vector-valued grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
GridType::Ptr | curl (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
GridType::Ptr | curl (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
GridType::Ptr | curl (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
VectorToScalarConverter < GridType >::Type::Ptr | divergence (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the divergence of the given vector-valued grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
VectorToScalarConverter < GridType >::Type::Ptr | divergence (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
VectorToScalarConverter < GridType >::Type::Ptr | divergence (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
VectorToScalarConverter < GridType >::Type::Ptr | divergence (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
ScalarToVectorConverter < GridType >::Type::Ptr | gradient (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the gradient of the given scalar grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
ScalarToVectorConverter < GridType >::Type::Ptr | gradient (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
ScalarToVectorConverter < GridType >::Type::Ptr | gradient (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
ScalarToVectorConverter < GridType >::Type::Ptr | gradient (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | laplacian (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the Laplacian of the given scalar grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
GridType::Ptr | laplacian (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
GridType::Ptr | laplacian (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
GridType::Ptr | laplacian (const GridType &grid, const MaskT mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | meanCurvature (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the mean curvature of the given grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
GridType::Ptr | meanCurvature (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
GridType::Ptr | meanCurvature (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
GridType::Ptr | meanCurvature (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
VectorToScalarConverter < GridType >::Type::Ptr | magnitude (const GridType &grid, bool threaded, InterruptT *interrupt) |
Compute the magnitudes of the vectors of the given vector-valued grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
VectorToScalarConverter < GridType >::Type::Ptr | magnitude (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
VectorToScalarConverter < GridType >::Type::Ptr | magnitude (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
VectorToScalarConverter < GridType >::Type::Ptr | magnitude (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | normalize (const GridType &grid, bool threaded, InterruptT *interrupt) |
Normalize the vectors of the given vector-valued grid. More... | |
template<typename GridType , typename MaskT , typename InterruptT > | |
GridType::Ptr | normalize (const GridType &grid, const MaskT &mask, bool threaded, InterruptT *interrupt) |
template<typename GridType > | |
GridType::Ptr | normalize (const GridType &grid, bool threaded=true) |
template<typename GridType , typename MaskT > | |
GridType::Ptr | normalize (const GridType &grid, const MaskT &mask, bool threaded=true) |
template<typename Sampler , typename Interrupter , typename GridType > | |
void | resampleToMatch (const GridType &inGrid, GridType &outGrid, Interrupter &interrupter) |
Resample an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide (apart from sampling artifacts), but the output grid's transform is unchanged. More... | |
template<typename Sampler , typename GridType > | |
void | resampleToMatch (const GridType &inGrid, GridType &outGrid) |
Resample an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide (apart from sampling artifacts), but the output grid's transform is unchanged. More... | |
template<typename Sampler , typename Interrupter , typename GridType > | |
void | doResampleToMatch (const GridType &inGrid, GridType &outGrid, Interrupter &interrupter) |
template<class GridType > | |
Real | levelSetArea (const GridType &grid, bool useWorldSpace=true) |
Return the surface area of a narrow-band level set. More... | |
template<class GridType > | |
Real | levelSetVolume (const GridType &grid, bool useWorldSpace=true) |
Return the volume of a narrow-band level set surface. More... | |
template<class GridType > | |
void | levelSetMeasure (const GridType &grid, Real &area, Real &volume, bool useWorldSpace=true) |
Compute the surface area and volume of a narrow-band level set. More... | |
template<class GridType > | |
void | levelSetMeasure (const GridType &grid, Real &area, Real &volume, Real &avgCurvature, bool useWorldSpace=true) |
Compute the surface area and volume of a narrow-band level set. More... | |
template<class GridT > | |
hboost::enable_if < hboost::is_floating_point < typename GridT::ValueType > , Real >::type | doLevelSetArea (const GridT &grid, bool useWorldSpace) |
template<class GridT > | |
hboost::disable_if < hboost::is_floating_point < typename GridT::ValueType > , Real >::type | doLevelSetArea (const GridT &, bool) |
template<class GridT > | |
Real | levelSetArea (const GridT &grid, bool useWorldSpace) |
template<class GridT > | |
hboost::enable_if < hboost::is_floating_point < typename GridT::ValueType > , Real >::type | doLevelSetVolume (const GridT &grid, bool useWorldSpace) |
template<class GridT > | |
hboost::disable_if < hboost::is_floating_point < typename GridT::ValueType > , Real >::type | doLevelSetVolume (const GridT &, bool) |
template<class GridT > | |
Real | levelSetVolume (const GridT &grid, bool useWorldSpace) |
template<class GridT > | |
hboost::enable_if < hboost::is_floating_point < typename GridT::ValueType > >::type | doLevelSetMeasure (const GridT &grid, Real &area, Real &volume, bool useWorldSpace) |
template<class GridT > | |
hboost::disable_if < hboost::is_floating_point < typename GridT::ValueType > >::type | doLevelSetMeasure (const GridT &, Real &, Real &, bool) |
template<class GridT > | |
void | levelSetMeasure (const GridT &grid, Real &area, Real &volume, bool useWorldSpace) |
template<class GridT > | |
hboost::enable_if < hboost::is_floating_point < typename GridT::ValueType > >::type | doLevelSetMeasure (const GridT &grid, Real &area, Real &volume, Real &avgCurvature, bool useWorldSpace) |
template<class GridT > | |
hboost::disable_if < hboost::is_floating_point < typename GridT::ValueType > >::type | doLevelSetMeasure (const GridT &, Real &, Real &, Real &, bool) |
template<class GridT > | |
void | levelSetMeasure (const GridT &grid, Real &area, Real &volume, Real &avgCurvature, bool useWorldSpace) |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetPlatonic (int faceCount, float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=nullptr) |
Return a grid of type GridType containing a narrow-band level set representation of a platonic solid. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetPlatonic (int faceCount, float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of a platonic solid. More... | |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetTetrahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=nullptr) |
Return a grid of type GridType containing a narrow-band level set representation of a tetrahedron. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetTetrahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of a tetrahedron. More... | |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetCube (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=nullptr) |
Return a grid of type GridType containing a narrow-band level set representation of a cube. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetCube (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of a cube. More... | |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetOctahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=nullptr) |
Return a grid of type GridType containing a narrow-band level set representation of an octahedron. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetOctahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of an octahedron. More... | |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetDodecahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=nullptr) |
Return a grid of type GridType containing a narrow-band level set representation of a dodecahedron. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetDodecahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of a dodecahedron. More... | |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetIcosahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=nullptr) |
Return a grid of type GridType containing a narrow-band level set representation of an icosahedron. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetIcosahedron (float scale=1.0f, const Vec3f ¢er=Vec3f(0.0f), float voxelSize=0.1f, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of an icosahedron. More... | |
template<class GridType > | |
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue=0, float halfWidth=float(LEVEL_SET_HALF_WIDTH), const math::Transform *xform=NULL) |
Return a new grid of type GridType that contains a narrow-band level set representation of an isosurface of a given grid. More... | |
template<class GridType > | |
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue, float exBandWidth, float inBandWidth, const math::Transform *xform=NULL) |
Return a new grid of type GridType that contains a narrow-band level set representation of an isosurface of a given grid. More... | |
template<class GridType , typename InterruptT > | |
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue, float exBandWidth, float inBandWidth, const math::Transform *xform=NULL, InterruptT *interrupter=NULL) |
Return a new grid of type GridType that contains a narrow-band level set representation of an isosurface of a given grid. More... | |
template<class GridType , typename InterruptT > | |
hboost::enable_if < hboost::is_floating_point < typename GridType::ValueType > , typename GridType::Ptr > ::type | doLevelSetRebuild (const GridType &grid, typename GridType::ValueType iso, typename GridType::ValueType exWidth, typename GridType::ValueType inWidth, const math::Transform *xform, InterruptT *interrupter) |
template<class GridType , typename InterruptT > | |
hboost::disable_if < hboost::is_floating_point < typename GridType::ValueType > , typename GridType::Ptr > ::type | doLevelSetRebuild (const GridType &, typename GridType::ValueType, typename GridType::ValueType, typename GridType::ValueType, const math::Transform *, InterruptT *) |
template<typename GridType , typename InterruptT > | |
GridType::Ptr | createLevelSetSphere (float radius, const openvdb::Vec3f ¢er, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupt=NULL) |
Return a grid of type GridType containing a narrow-band level set representation of a sphere. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSetSphere (float radius, const openvdb::Vec3f ¢er, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Return a grid of type GridType containing a narrow-band level set representation of a sphere. More... | |
template<class GridType > | |
void | sdfToFogVolume (GridType &grid, typename GridType::ValueType cutoffDistance=lsutilGridMax< GridType >()) |
Threaded method to convert a sparse level set/SDF into a sparse fog volume. More... | |
template<class GridOrTreeType > | |
GridOrTreeType::template ValueConverter< bool > ::Type::Ptr | sdfInteriorMask (const GridOrTreeType &volume, typename GridOrTreeType::ValueType isovalue=lsutilGridZero< GridOrTreeType >()) |
Threaded method to construct a boolean mask that represents interior regions in a signed distance field. More... | |
template<typename GridOrTreeType > | |
GridOrTreeType::template ValueConverter< bool > ::Type::Ptr | extractEnclosedRegion (const GridOrTreeType &volume, typename GridOrTreeType::ValueType isovalue=lsutilGridZero< GridOrTreeType >(), const typename TreeAdapter< GridOrTreeType >::TreeType::template ValueConverter< bool >::Type *fillMask=nullptr) |
Extracts the interior regions of a signed distance field and topologically enclosed (watertight) regions of value greater than the isovalue (cavities) that can arise as the result of CSG union operations between different shapes where at least one of the shapes has a concavity that is capped. More... | |
template<typename GridOrTreeType > | |
GridOrTreeType::template ValueConverter< bool > ::Type::Ptr | extractIsosurfaceMask (const GridOrTreeType &volume, typename GridOrTreeType::ValueType isovalue) |
Return a mask of the voxels that intersect the implicit surface with the given isovalue. More... | |
template<typename GridOrTreeType > | |
void | extractActiveVoxelSegmentMasks (const GridOrTreeType &volume, std::vector< typename GridOrTreeType::template ValueConverter< bool >::Type::Ptr > &masks) |
Return a mask for each connected component of the given grid's active voxels. More... | |
template<typename GridOrTreeType > | |
void | segmentActiveVoxels (const GridOrTreeType &volume, std::vector< typename GridOrTreeType::Ptr > &segments) |
Separates disjoint active topology components into distinct grids or trees. More... | |
template<typename GridOrTreeType > | |
void | segmentSDF (const GridOrTreeType &volume, std::vector< typename GridOrTreeType::Ptr > &segments) |
Separates disjoint SDF surfaces into distinct grids or trees. More... | |
template<typename GridType , typename MeshDataAdapter > | |
GridType::Ptr | meshToVolume (const MeshDataAdapter &mesh, const math::Transform &transform, float exteriorBandWidth=3.0f, float interiorBandWidth=3.0f, int flags=0, typename GridType::template ValueConverter< Int32 >::Type *polygonIndexGrid=nullptr) |
template<typename GridType , typename MeshDataAdapter , typename Interrupter > | |
GridType::Ptr | meshToVolume (Interrupter &interrupter, const MeshDataAdapter &mesh, const math::Transform &transform, float exteriorBandWidth=3.0f, float interiorBandWidth=3.0f, int flags=0, typename GridType::template ValueConverter< Int32 >::Type *polygonIndexGrid=nullptr) |
Convert polygonal meshes that consist of quads and/or triangles into signed or unsigned distance field volumes. More... | |
template<typename GridType > | |
GridType::Ptr | meshToLevelSet (const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Convert a triangle mesh to a level set volume. More... | |
template<typename GridType , typename Interrupter > | |
GridType::Ptr | meshToLevelSet (Interrupter &interrupter, const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Adds support for a interrupter callback used to cancel the conversion. More... | |
template<typename GridType > | |
GridType::Ptr | meshToLevelSet (const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec4I > &quads, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Convert a quad mesh to a level set volume. More... | |
template<typename GridType , typename Interrupter > | |
GridType::Ptr | meshToLevelSet (Interrupter &interrupter, const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec4I > &quads, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Adds support for a interrupter callback used to cancel the conversion. More... | |
template<typename GridType > | |
GridType::Ptr | meshToLevelSet (const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Convert a triangle and quad mesh to a level set volume. More... | |
template<typename GridType , typename Interrupter > | |
GridType::Ptr | meshToLevelSet (Interrupter &interrupter, const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float halfWidth=float(LEVEL_SET_HALF_WIDTH)) |
Adds support for a interrupter callback used to cancel the conversion. More... | |
template<typename GridType > | |
GridType::Ptr | meshToSignedDistanceField (const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float exBandWidth, float inBandWidth) |
Convert a triangle and quad mesh to a signed distance field with an asymmetrical narrow band. More... | |
template<typename GridType , typename Interrupter > | |
GridType::Ptr | meshToSignedDistanceField (Interrupter &interrupter, const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float exBandWidth, float inBandWidth) |
Adds support for a interrupter callback used to cancel the conversion. More... | |
template<typename GridType > | |
GridType::Ptr | meshToUnsignedDistanceField (const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float bandWidth) |
Convert a triangle and quad mesh to an unsigned distance field. More... | |
template<typename GridType , typename Interrupter > | |
GridType::Ptr | meshToUnsignedDistanceField (Interrupter &interrupter, const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float bandWidth) |
Adds support for a interrupter callback used to cancel the conversion. More... | |
template<typename GridType , typename VecType > | |
GridType::Ptr | createLevelSetBox (const math::BBox< VecType > &bbox, const openvdb::math::Transform &xform, typename VecType::ValueType halfWidth=LEVEL_SET_HALF_WIDTH) |
Return a grid of type GridType containing a narrow-band level set representation of a box. More... | |
template<typename FloatTreeT > | |
void | traceExteriorBoundaries (FloatTreeT &tree) |
Traces the exterior voxel boundary of closed objects in the input volume tree. Exterior voxels are marked with a negative sign, voxels with a value below 0.75 are left unchanged and act as the boundary layer. More... | |
template<typename GridType , typename Interrupter > | |
std::enable_if < std::is_floating_point < typename GridType::ValueType > ::value, typename GridType::Ptr >::type | doMeshConversion (Interrupter &interrupter, const openvdb::math::Transform &xform, const std::vector< Vec3s > &points, const std::vector< Vec3I > &triangles, const std::vector< Vec4I > &quads, float exBandWidth, float inBandWidth, bool unsignedDistanceField=false) |
template<typename GridType , typename Interrupter > | |
std::enable_if <!std::is_floating_point < typename GridType::ValueType > ::value, typename GridType::Ptr >::type | doMeshConversion (Interrupter &, const math::Transform &, const std::vector< Vec3s > &, const std::vector< Vec3I > &, const std::vector< Vec4I > &, float, float, bool=false) |
std::ostream & | operator<< (std::ostream &ostr, const MeshToVoxelEdgeData::EdgeData &rhs) |
MeshToVoxelEdgeData::EdgeData | Abs (const MeshToVoxelEdgeData::EdgeData &x) |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | dilateActiveValues (TreeType &tree, int iterations=1, NearestNeighbors nn=NN_FACE, TilePolicy mode=PRESERVE_TILES) |
Topologically dilate all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns. More... | |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | dilateActiveValues (tree::LeafManager< TreeType > &manager, int iterations=1, NearestNeighbors nn=NN_FACE, TilePolicy mode=PRESERVE_TILES) |
Topologically dilate all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns. More... | |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | dilateVoxels (TreeType &tree, int iterations=1, NearestNeighbors nn=NN_FACE) |
Topologically dilate all leaf-level active voxels in a tree using one of three nearest neighbor connectivity patterns. More... | |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | dilateVoxels (tree::LeafManager< TreeType > &manager, int iterations=1, NearestNeighbors nn=NN_FACE) |
Topologically dilate all leaf-level active voxels in a tree using one of three nearest neighbor connectivity patterns. More... | |
template<typename GridOrTree > | |
void | activate (GridOrTree &, const typename GridOrTree::ValueType &value, const typename GridOrTree::ValueType &tolerance=zeroVal< typename GridOrTree::ValueType >()) |
Mark as active any inactive tiles or voxels in the given grid or tree whose values are equal to value (optionally to within the given tolerance). More... | |
template<typename GridOrTree > | |
void | deactivate (GridOrTree &, const typename GridOrTree::ValueType &value, const typename GridOrTree::ValueType &tolerance=zeroVal< typename GridOrTree::ValueType >()) |
Mark as inactive any active tiles or voxels in the given grid or tree whose values are equal to value (optionally to within the given tolerance). More... | |
template<typename GridT , typename PointArrayT > | |
GridT::Ptr | createPointIndexGrid (const PointArrayT &points, double voxelSize) |
Partition points into a point index grid to accelerate range and nearest-neighbor searches. More... | |
template<typename GridT , typename PointArrayT > | |
GridT::Ptr | createPointIndexGrid (const PointArrayT &points, const math::Transform &xform) |
Partition points into a point index grid to accelerate range and nearest-neighbor searches. More... | |
template<typename PointArrayT , typename GridT > | |
bool | isValidPartition (const PointArrayT &points, const GridT &grid) |
Return true if the given point index grid represents a valid partitioning of the given point array. More... | |
template<typename GridT , typename PointArrayT > | |
GridT::ConstPtr | getValidPointIndexGrid (const PointArrayT &points, const typename GridT::ConstPtr &grid) |
Repartition the points if needed, otherwise return the input grid. More... | |
template<typename GridT , typename PointArrayT > | |
GridT::Ptr | getValidPointIndexGrid (const PointArrayT &points, const typename GridT::Ptr &grid) |
Repartition the points if needed, otherwise return the input grid. More... | |
template<typename PointListT , typename GridT > | |
void | maskPoints (const PointListT &points, GridT &grid) |
Makes every voxel of the grid active if it contains a point. More... | |
template<typename PointListT > | |
MaskGrid::Ptr | createPointMask (const PointListT &points, const math::Transform &xform) |
Return a MaskGrid where each binary voxel value is on if the voxel contains one (or more) points (i.e. the 3D position of a point is closer to this voxel than any other voxels). More... | |
template<typename TreeT > | |
void | prune (TreeT &tree, typename TreeT::ValueType tolerance=zeroVal< typename TreeT::ValueType >(), bool threaded=true, size_t grainSize=1) |
Reduce the memory footprint of a tree by replacing with tiles any nodes whose values are all the same (optionally to within a tolerance) and have the same active state. More... | |
template<typename TreeT > | |
void | pruneTiles (TreeT &tree, typename TreeT::ValueType tolerance=zeroVal< typename TreeT::ValueType >(), bool threaded=true, size_t grainSize=1) |
Reduce the memory footprint of a tree by replacing with tiles any non-leaf nodes whose values are all the same (optionally to within a tolerance) and have the same active state. More... | |
template<typename TreeT > | |
void | pruneInactive (TreeT &tree, bool threaded=true, size_t grainSize=1) |
Reduce the memory footprint of a tree by replacing with background tiles any nodes whose values are all inactive. More... | |
template<typename TreeT > | |
void | pruneInactiveWithValue (TreeT &tree, const typename TreeT::ValueType &value, bool threaded=true, size_t grainSize=1) |
Reduce the memory footprint of a tree by replacing any nodes whose values are all inactive with tiles of the given value. More... | |
template<typename TreeT > | |
void | pruneLevelSet (TreeT &tree, bool threaded=true, size_t grainSize=1) |
Reduce the memory footprint of a tree by replacing nodes whose values are all inactive with inactive tiles having a value equal to the first value encountered in the (inactive) child. More... | |
template<typename TreeT > | |
void | pruneLevelSet (TreeT &tree, const typename TreeT::ValueType &outsideWidth, const typename TreeT::ValueType &insideWidth, bool threaded=true, size_t grainSize=1) |
Reduce the memory footprint of a tree by replacing nodes whose voxel values are all inactive with inactive tiles having the value -| insideWidth | if the voxel values are negative and | outsideWidth | otherwise. More... | |
template<typename GridT > | |
void | rayTrace (const GridT &, const BaseShader &, BaseCamera &, size_t pixelSamples=1, unsigned int seed=0, bool threaded=true) |
Ray-trace a volume. More... | |
template<typename GridT , typename IntersectorT > | |
void | rayTrace (const GridT &, const IntersectorT &, const BaseShader &, BaseCamera &, size_t pixelSamples=1, unsigned int seed=0, bool threaded=true) |
Ray-trace a volume using a given ray intersector. More... | |
template<typename TreeOrLeafManagerT > | |
void | signedFloodFill (TreeOrLeafManagerT &tree, bool threaded=true, size_t grainSize=1, Index minLevel=0) |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting outside values to +background and inside values to -background. More... | |
template<typename TreeOrLeafManagerT > | |
void | signedFloodFillWithValues (TreeOrLeafManagerT &tree, const typename TreeOrLeafManagerT::ValueType &outsideWidth, const typename TreeOrLeafManagerT::ValueType &insideWidth, bool threaded=true, size_t grainSize=1, Index minLevel=0) |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting exterior values to outsideWidth and interior values to insideWidth. Set the background value of this tree to outsideWidth. More... | |
template<typename TreeOrLeafManagerT > | |
hboost::enable_if_c < hboost::is_floating_point < typename TreeOrLeafManagerT::ValueType > ::value||hboost::is_signed < typename TreeOrLeafManagerT::ValueType > ::value, void >::type | doSignedFloodFill (TreeOrLeafManagerT &tree, typename TreeOrLeafManagerT::ValueType outsideValue, typename TreeOrLeafManagerT::ValueType insideValue, bool threaded, size_t grainSize, Index minLevel) |
template<typename TreeOrLeafManagerT > | |
hboost::disable_if_c < hboost::is_floating_point < typename TreeOrLeafManagerT::ValueType > ::value||hboost::is_signed < typename TreeOrLeafManagerT::ValueType > ::value, void >::type | doSignedFloodFill (TreeOrLeafManagerT &, const typename TreeOrLeafManagerT::ValueType &, const typename TreeOrLeafManagerT::ValueType &, bool, size_t, Index) |
template<typename IterT > | |
math::Histogram | histogram (const IterT &iter, double minVal, double maxVal, size_t numBins=10, bool threaded=true) |
Iterate over a scalar grid and compute a histogram of the values of the voxels that are visited, or iterate over a vector-valued grid and compute a histogram of the magnitudes of the vectors. More... | |
template<typename IterT > | |
math::Extrema | extrema (const IterT &iter, bool threaded=true) |
Iterate over a scalar grid and compute extrema (min/max) of the values of the voxels that are visited, or iterate over a vector-valued grid and compute extrema of the magnitudes of the vectors. More... | |
template<typename IterT > | |
math::Stats | statistics (const IterT &iter, bool threaded=true) |
Iterate over a scalar grid and compute statistics (mean, variance, etc.) of the values of the voxels that are visited, or iterate over a vector-valued grid and compute statistics of the magnitudes of the vectors. More... | |
template<typename IterT , typename ValueOp > | |
math::Extrema | extrema (const IterT &iter, const ValueOp &op, bool threaded) |
Iterate over a grid and compute extrema (min/max) of the values produced by applying the given functor at each voxel that is visited. More... | |
template<typename IterT , typename ValueOp > | |
math::Stats | statistics (const IterT &iter, const ValueOp &op, bool threaded) |
Iterate over a grid and compute statistics (mean, variance, etc.) of the values produced by applying the given functor at each voxel that is visited. More... | |
template<typename OperatorT , typename IterT > | |
math::Stats | opStatistics (const IterT &iter, const OperatorT &op=OperatorT(), bool threaded=true) |
Iterate over a grid and compute statistics (mean, variance, etc.) of the values produced by applying a given operator (see math/Operators.h) at each voxel that is visited. More... | |
template<typename OperatorT , typename IterT > | |
math::Extrema | opExtrema (const IterT &iter, const OperatorT &op=OperatorT(), bool threaded=true) |
Same as opStatistics except it returns a math::Extrema vs a math::Stats. More... | |
template<typename GridT > | |
GridT::template ValueConverter < float >::Type::Ptr | topologyToLevelSet (const GridT &grid, int halfWidth=3, int closingSteps=1, int dilation=0, int smoothingSteps=0) |
Compute the narrow-band signed distance to the interface between active and inactive voxels in the input grid. More... | |
template<typename GridT , typename InterrupterT > | |
GridT::template ValueConverter < float >::Type::Ptr | topologyToLevelSet (const GridT &grid, int halfWidth=3, int closingSteps=1, int dilation=0, int smoothingSteps=0, InterrupterT *interrupt=NULL) |
Compute the narrow-band signed distance to the interface between active and inactive voxels in the input grid. More... | |
template<typename IterT , typename XformOp > | |
void | foreach (const IterT &iter, XformOp &op, bool threaded=true, bool shareOp=true) |
template<typename IterT , typename XformOp > | |
void | foreach (const IterT &iter, const XformOp &op, bool threaded=true, bool shareOp=true) |
template<typename InIterT , typename OutGridT , typename XformOp > | |
void | transformValues (const InIterT &inIter, OutGridT &outGrid, XformOp &op, bool threaded=true, bool shareOp=true, MergePolicy merge=MERGE_ACTIVE_STATES) |
template<typename InIterT , typename OutGridT , typename XformOp > | |
void | transformValues (const InIterT &inIter, OutGridT &outGrid, const XformOp &op, bool threaded=true, bool shareOp=true, MergePolicy merge=MERGE_ACTIVE_STATES) |
template<typename IterT , typename XformOp > | |
void | accumulate (const IterT &iter, XformOp &op, bool threaded=true) |
template<typename TreeT > | |
void | setValueOnMin (TreeT &tree, const Coord &xyz, const typename TreeT::ValueType &value) |
Set the value of the voxel at the given coordinates in tree to the minimum of its current value and value, and mark the voxel as active. More... | |
template<typename TreeT > | |
void | setValueOnMax (TreeT &tree, const Coord &xyz, const typename TreeT::ValueType &value) |
Set the value of the voxel at the given coordinates in tree to the maximum of its current value and value, and mark the voxel as active. More... | |
template<typename TreeT > | |
void | setValueOnSum (TreeT &tree, const Coord &xyz, const typename TreeT::ValueType &value) |
Set the value of the voxel at the given coordinates in tree to the sum of its current value and value, and mark the voxel as active. More... | |
template<typename TreeT > | |
void | setValueOnMult (TreeT &tree, const Coord &xyz, const typename TreeT::ValueType &value) |
Set the value of the voxel at the given coordinates in tree to the product of its current value and value, and mark the voxel as active. More... | |
template<typename GridType > | |
void | transformVectors (GridType &, const Mat4d &) |
Apply an affine transform to the voxel values of a vector-valued grid in accordance with the grid's vector type (covariant, contravariant, etc.). More... | |
template<typename GridType > | |
hboost::disable_if_c < VecTraits< typename GridType::ValueType >::IsVec, void >::type | doTransformVectors (GridType &, const Mat4d &) |
template<typename GridType > | |
hboost::enable_if_c< VecTraits < typename GridType::ValueType > ::IsVec, void >::type | doTransformVectors (GridType &grid, const Mat4d &mat) |
template<typename GridType > | |
void | volumeToMesh (const GridType &grid, std::vector< Vec3s > &points, std::vector< Vec4I > &quads, double isovalue=0.0) |
Uniformly mesh any scalar grid that has a continuous isosurface. More... | |
template<typename GridType > | |
void | volumeToMesh (const GridType &grid, std::vector< Vec3s > &points, std::vector< Vec3I > &triangles, std::vector< Vec4I > &quads, double isovalue=0.0, double adaptivity=0.0, bool relaxDisorientedTriangles=true) |
Adaptively mesh any scalar grid that has a continuous isosurface. More... | |
Vec3d | findFeaturePoint (const std::vector< Vec3d > &points, const std::vector< Vec3d > &normals) |
Given a set of tangent elements, points with corresponding normals , this method returns the intersection point of all tangent elements. More... | |
template<typename GridType > | |
std::enable_if< std::is_scalar < typename GridType::ValueType > ::value, void >::type | doVolumeToMesh (const GridType &grid, std::vector< Vec3s > &points, std::vector< Vec3I > &triangles, std::vector< Vec4I > &quads, double isovalue, double adaptivity, bool relaxDisorientedTriangles) |
template<typename GridType > | |
std::enable_if<!std::is_scalar < typename GridType::ValueType > ::value, void >::type | doVolumeToMesh (const GridType &, std::vector< Vec3s > &, std::vector< Vec3I > &, std::vector< Vec4I > &, double, double, bool) |
template<typename GridT , typename InterrupterT = util::NullInterrupter> | |
void | fillWithSpheres (const GridT &grid, std::vector< openvdb::Vec4s > &spheres, int maxSphereCount, bool overlapping=false, float minRadius=1.0, float maxRadius=std::numeric_limits< float >::max(), float isovalue=0.0, int instanceCount=10000, InterrupterT *interrupter=nullptr) |
Fill a closed level set or fog volume with adaptively-sized spheres. More... | |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | erodeVoxels (TreeType &tree, int iterations=1, NearestNeighbors nn=NN_FACE) |
Topologically erode all leaf-level active voxels in the given tree. More... | |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | erodeVoxels (tree::LeafManager< TreeType > &manager, int iterations=1, NearestNeighbors nn=NN_FACE) |
Topologically erode all leaf-level active voxels in the given tree. More... | |
using openvdb::OPENVDB_VERSION_NAME::tools::ParticleIndexAtlas = typedef ParticleAtlas<PointIndexGrid> |
Definition at line 167 of file ParticleAtlas.h.
using openvdb::OPENVDB_VERSION_NAME::tools::PointIndexGrid = typedef Grid<PointIndexTree> |
Point index grid.
Definition at line 86 of file PointIndexGrid.h.
using openvdb::OPENVDB_VERSION_NAME::tools::PointIndexTree = typedef tree::Tree<tree::RootNode<tree::InternalNode<tree::InternalNode <PointIndexLeafNode<PointIndex32, 3>, 4>, 5>>> |
Point index tree configured to match the default OpenVDB tree configuration.
Definition at line 83 of file PointIndexGrid.h.
using openvdb::OPENVDB_VERSION_NAME::tools::PointList = typedef hboost::scoped_array<openvdb::Vec3s> |
Point and primitive list types.
Definition at line 179 of file VolumeToMesh.h.
using openvdb::OPENVDB_VERSION_NAME::tools::PolygonPoolList = typedef hboost::scoped_array<PolygonPool> |
Point and primitive list types.
Definition at line 180 of file VolumeToMesh.h.
using openvdb::OPENVDB_VERSION_NAME::tools::UInt32PointPartitioner = typedef PointPartitioner<uint32_t, 3> |
Definition at line 201 of file PointPartitioner.h.
anonymous enum |
Polygon flags, used for reference based meshing.
Enumerator | |
---|---|
POLYFLAG_EXTERIOR | |
POLYFLAG_FRACTURE_SEAM | |
POLYFLAG_SUBDIVIDED |
Definition at line 117 of file VolumeToMesh.h.
We currrently support the following operations when compositing sparse data into a dense grid.
Enumerator | |
---|---|
DS_OVER | |
DS_ADD | |
DS_SUB | |
DS_MIN | |
DS_MAX | |
DS_MULT | |
DS_SET |
Definition at line 173 of file DenseSparseTools.h.
We currently support the following two 3D memory layouts for dense volumes: XYZ, i.e. x is the fastest moving index, and ZYX, i.e. z is the fastest moving index. The ZYX memory layout leads to nested for-loops of the order x, y, z, which we find to be the most intuitive. Hence, ZYX is the layout used throughout VDB. However, other data structures, e.g. Houdini and Maya, employ the XYZ layout. Clearly a dense volume with the ZYX layout converts more efficiently to a VDB, but we support both for convenience.
Enumerator | |
---|---|
LayoutXYZ | |
LayoutZYX |
Mesh to volume conversion flags.
Definition at line 87 of file MeshToVolume.h.
Voxel topology of nearest neighbors.
face adjacency (6 nearest neighbors, defined as all neighbor voxels connected along one of the primary axes)
face and edge adjacency (18 nearest neighbors, defined as all neighbor voxels connected along either one or two of the primary axes)
Enumerator | |
---|---|
NN_FACE | |
NN_FACE_EDGE | |
NN_FACE_EDGE_VERTEX |
Definition at line 87 of file Morphology.h.
Different policies when dilating trees with active tiles.
Active tiles are ignores, i.e. only active voxels are dilates.
Active tiles are expanded into active voxels and then dilated.
Enumerator | |
---|---|
IGNORE_TILES | |
EXPAND_TILES | |
PRESERVE_TILES |
Definition at line 102 of file Morphology.h.
|
inline |
Definition at line 3664 of file MeshToVolume.h.
|
inline |
Iterate over a grid and at each step call op(iter)
. If threading is enabled, call op.join(otherOp)
to accumulate intermediate results from pairs of threads.
iter | an iterator over a grid or its tree (Grid::ValueOnCIter , Tree::NodeIter , etc.) |
op | a functor with a join method of the form void join(XformOp&) and a call method of the form void op(const IterT&) , where IterT is the type of iter |
threaded | if true, transform multiple values of the grid in parallel |
tbb::parallel_for()
or tbb::parallel_reduce()
in conjunction with a tree::IteratorRange that wraps a grid or tree iterator. Definition at line 704 of file ValueTransformer.h.
|
inline |
Mark as active any inactive tiles or voxels in the given grid or tree whose values are equal to value (optionally to within the given tolerance).
Definition at line 944 of file Morphology.h.
|
inline |
Replace the background values in all the nodes of a floating-point tree containing a possibly asymmetric narrow-band level set.
All inactive values will be set to +| outsideWidth | if outside and -| insideWidth | if inside, where outsideWidth is the outside width of the narrow band and insideWidth is its inside width.
tree | Tree (or LeafManager) that will have its background value changed |
outsideWidth | The width of the outside of the narrow band |
insideWidth | The width of the inside of the narrow band |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 32) |
ValueError | if outsideWidth is negative or insideWidth is not negative (as defined by math::isNegative) |
Definition at line 244 of file ChangeBackground.h.
|
inline |
Replace the background value in all the nodes of a tree.
The sign of the background value is preserved, and only inactive values equal to the old background value are replaced.
tree | Tree (or LeafManager) that will have its background value changed |
background | the new background value |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 32) |
Definition at line 230 of file ChangeBackground.h.
|
inline |
Replace the background value in all the nodes of a floating-point tree containing a symmetric narrow-band level set.
All inactive values will be set to +| halfWidth | if outside and -| halfWidth | if inside, where halfWidth is half the width of the symmetric narrow band.
tree | Tree (or LeafManager) that will have its background value changed |
halfWidth | half of the width of the symmetric narrow band |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 32) |
ValueError | if halfWidth is negative (as defined by math::isNegative) |
Definition at line 260 of file ChangeBackground.h.
std::string openvdb::OPENVDB_VERSION_NAME::tools::checkFogVolume | ( | const GridType & | grid, |
size_t | number = 6 |
||
) |
Perform checks on a grid to see if it is a valid fog volume.
grid | Grid to be checked |
number | Number of the checks to be performed (see below) |
number refers to the following ordered list of checks - always starting from the top. Fast checks 1: value type is floating point 2: has FOG volume class type 3: background value is zero
Slower checks 4: all the values are finite, i.e not NaN or infinite 5: inactive values are zero 6: active values are in the range [0,1]
Definition at line 1091 of file Diagnostics.h.
std::string openvdb::OPENVDB_VERSION_NAME::tools::checkLevelSet | ( | const GridType & | grid, |
size_t | number = 9 |
||
) |
Perform checks on a grid to see if it is a valid symmetric, narrow-band level set.
grid | Grid to be checked |
number | Number of the checks to be performed (see below) |
number refers to the following ordered list of checks - always starting from the top. Fast checks 1: value type is floating point 2: has level set class type 3: has uniform scale 4: background value is positive and n*dx
Slower checks 5: no active tiles 6: all the values are finite, i.e not NaN or infinite 7: active values in range between +-background 8: abs of inactive values = background, i.e. assuming a symmetric narrow band!
Relatively slow check (however multithreaded) 9: norm gradient is close to one, i.e. satisfied the Eikonal equation.
Definition at line 955 of file Diagnostics.h.
|
inline |
Clip the given grid against a world-space bounding box and return a new grid containing the result.
grid | the grid to be clipped |
bbox | a world-space bounding box |
keepInterior | if true, discard voxels that lie outside the bounding box; if false, discard voxels that lie inside the bounding box |
|
inline |
Clip a grid against the active voxels of another grid and return a new grid containing the result.
grid | the grid to be clipped |
mask | a grid whose active voxels form a boolean clipping mask |
keepInterior | if true, discard voxels that do not intersect the mask; if false, discard voxels that intersect the mask |
The mask grid need not have the same transform as the source grid. Also, if the mask grid is a level set, consider using tools::sdfInteriorMask to construct a new mask comprising the interior (rather than the narrow band) of the level set.
|
inline |
Given grids A and B, compute a / b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty.
Definition at line 687 of file Composite.h.
|
inline |
Given grids A and B, compute max(a, b) per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty.
Definition at line 625 of file Composite.h.
|
inline |
Given grids A and B, compute min(a, b) per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty.
Definition at line 641 of file Composite.h.
|
inline |
Given grids A and B, compute a * b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty.
Definition at line 672 of file Composite.h.
void openvdb::OPENVDB_VERSION_NAME::tools::compositeToDense | ( | Dense< typename TreeT::ValueType, LayoutZYX > & | dense, |
const TreeT & | source, | ||
const TreeT & | alpha, | ||
const typename TreeT::ValueType | beta, | ||
const typename TreeT::ValueType | strength, | ||
bool | threaded = true |
||
) |
Composite data from a sparse tree into a dense array of the same value type.
dense | Dense grid to be altered by the operation |
source | Sparse data to composite into dense |
alpha | Sparse Alpha mask used in compositing operations. |
beta | Constant multiplier on src |
strength | Constant multiplier on alpha |
threaded | Enable threading for this operation. |
Definition at line 1225 of file DenseSparseTools.h.
|
inline |
Copy the active voxels of B into A.
Definition at line 732 of file Composite.h.
|
inline |
Given grids A and B, compute a + b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty.
Definition at line 657 of file Composite.h.
void openvdb::OPENVDB_VERSION_NAME::tools::copyFromDense | ( | const DenseT & | dense, |
GridOrTreeT & | sparse, | ||
const typename GridOrTreeT::ValueType & | tolerance, | ||
bool | serial = false |
||
) |
Populate a sparse grid with the values of all of the voxels of a dense grid.
dense | the dense grid from which to copy values |
sparse | an OpenVDB grid or tree into which to copy values |
tolerance | values in the dense grid that are within this tolerance of the sparse grid's background value become inactive background voxels or tiles in the sparse grid |
serial | if false, process voxels in parallel |
void openvdb::OPENVDB_VERSION_NAME::tools::copyToDense | ( | const GridOrTreeT & | sparse, |
DenseT & | dense, | ||
bool | serial = false |
||
) |
Populate a dense grid with the values of voxels from a sparse grid, where the sparse grid intersects the dense grid.
sparse | an OpenVDB grid or tree from which to copy values |
dense | the dense grid into which to copy values |
serial | if false, process voxels in parallel |
|
inline |
Compute the Closest-Point Transform (CPT) from a distance field.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 952 of file GridOperators.h.
|
inline |
Definition at line 960 of file GridOperators.h.
|
inline |
Definition at line 91 of file GridOperators.h.
|
inline |
Definition at line 98 of file GridOperators.h.
|
inline |
Return a grid of type GridType
containing a narrow-band level set representation of a box.
bbox | a bounding box in world units |
xform | world-to-index-space transform |
halfWidth | half the width of the narrow band, in voxel units |
Definition at line 4162 of file MeshToVolume.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetCube | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = nullptr |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a cube.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
GridType::ValueType
must be a floating-point scalar. Definition at line 167 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetCube | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a cube.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
GridType::ValueType
must be a floating-point scalar. Definition at line 188 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetDodecahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = nullptr |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a dodecahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
GridType::ValueType
must be a floating-point scalar. Definition at line 257 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetDodecahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a dodecahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
GridType::ValueType
must be a floating-point scalar. Definition at line 278 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetIcosahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = nullptr |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of an icosahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
GridType::ValueType
must be a floating-point scalar. Definition at line 302 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetIcosahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of an icosahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
GridType::ValueType
must be a floating-point scalar. Definition at line 323 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetOctahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = nullptr |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of an octahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
GridType::ValueType
must be a floating-point scalar. Definition at line 212 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetOctahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of an octahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
GridType::ValueType
must be a floating-point scalar. Definition at line 233 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetPlatonic | ( | int | faceCount, |
float | scale = 1.0f , |
||
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = nullptr |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a platonic solid.
faceCount | number of faces of the platonic solid, i.e. 4, 6, 8, 12 or 20 |
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
Faces: TETRAHEDRON=4, CUBE=6, OCTAHEDRON=8, DODECAHEDRON=12, ICOSAHEDRON=20
GridType::ValueType
must be a floating-point scalar. Definition at line 337 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetPlatonic | ( | int | faceCount, |
float | scale = 1.0f , |
||
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a platonic solid.
faceCount | number of faces of the platonic solid, i.e. 4, 6, 8, 12 or 20 |
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
Faces: TETRAHEDRON=4, CUBE=6, OCTAHEDRON=8, DODECAHEDRON=12, ICOSAHEDRON=20
GridType::ValueType
must be a floating-point scalar. Definition at line 96 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetSphere | ( | float | radius, |
const openvdb::Vec3f & | center, | ||
float | voxelSize, | ||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = NULL |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a sphere.
radius | radius of the sphere in world units |
center | center of the sphere in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
GridType::ValueType
must be a floating-point scalar. Definition at line 203 of file LevelSetSphere.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetSphere | ( | float | radius, |
const openvdb::Vec3f & | center, | ||
float | voxelSize, | ||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a sphere.
radius | radius of the sphere in world units |
center | center of the sphere in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
GridType::ValueType
must be a floating-point scalar. Definition at line 87 of file LevelSetSphere.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetTetrahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) , |
||
InterruptT * | interrupt = nullptr |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a tetrahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
interrupt | a pointer adhering to the util::NullInterrupter interface |
GridType::ValueType
must be a floating-point scalar. Definition at line 121 of file LevelSetPlatonic.h.
GridType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::createLevelSetTetrahedron | ( | float | scale = 1.0f , |
const Vec3f & | center = Vec3f(0.0f) , |
||
float | voxelSize = 0.1f , |
||
float | halfWidth = float(LEVEL_SET_HALF_WIDTH) |
||
) |
Return a grid of type GridType
containing a narrow-band level set representation of a tetrahedron.
scale | scale of the platonic solid in world units |
center | center of the platonic solid in world units |
voxelSize | voxel size in world units |
halfWidth | half the width of the narrow band, in voxel units |
GridType::ValueType
must be a floating-point scalar. Definition at line 143 of file LevelSetPlatonic.h.
|
inline |
Partition points into a point index grid to accelerate range and nearest-neighbor searches.
points | world-space point array conforming to the PointArray interface |
voxelSize | voxel size in world units |
Definition at line 1319 of file PointIndexGrid.h.
|
inline |
Partition points into a point index grid to accelerate range and nearest-neighbor searches.
points | world-space point array conforming to the PointArray interface |
xform | world-to-index-space transform |
Definition at line 1303 of file PointIndexGrid.h.
|
inline |
Return a MaskGrid where each binary voxel value is on if the voxel contains one (or more) points (i.e. the 3D position of a point is closer to this voxel than any other voxels).
points | points that active the voxels in the returned grid. |
xform | transform from world space to voxels in grid space. |
Definition at line 116 of file PointsToMask.h.
|
inline |
Given two level set grids, replace the A grid with the difference A / B.
ValueError | if the background value of either grid is not greater than zero. |
Definition at line 1046 of file Composite.h.
|
inline |
Threaded CSG difference operation that produces a new grid or tree from immutable inputs.
Definition at line 1087 of file Composite.h.
|
inline |
Given two level set grids, replace the A grid with the intersection of A and B.
ValueError | if the background value of either grid is not greater than zero. |
Definition at line 1034 of file Composite.h.
|
inline |
Threaded CSG intersection operation that produces a new grid or tree from immutable inputs.
Definition at line 1073 of file Composite.h.
|
inline |
Given two level set grids, replace the A grid with the union of A and B.
ValueError | if the background value of either grid is not greater than zero. |
Definition at line 1022 of file Composite.h.
|
inline |
Threaded CSG union operation that produces a new grid or tree from immutable inputs.
Definition at line 1059 of file Composite.h.
|
inline |
Compute the curl of the given vector-valued grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 968 of file GridOperators.h.
|
inline |
Definition at line 976 of file GridOperators.h.
|
inline |
Definition at line 119 of file GridOperators.h.
|
inline |
Definition at line 126 of file GridOperators.h.
|
inline |
Mark as inactive any active tiles or voxels in the given grid or tree whose values are equal to value (optionally to within the given tolerance).
Definition at line 967 of file Morphology.h.
|
inline |
Topologically dilate all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns.
tree | tree to be dilated |
iterations | number of iterations to apply the dilation |
nn | connectivity pattern of the dilation: either face-adjacent (6 nearest neighbors), face- and edge-adjacent (18 nearest neighbors) or face-, edge- and vertex-adjacent (26 nearest neighbors). |
mode | Defined the policy for handling active tiles (see above for details) |
Definition at line 1074 of file Morphology.h.
|
inline |
Topologically dilate all active values (i.e. both voxels and tiles) in a tree using one of three nearest neighbor connectivity patterns.
manager | Leaf node manager for the tree to be dilated |
iterations | number of iterations to apply the dilation |
nn | connectivity pattern of the dilation: either face-adjacent (6 nearest neighbors), face- and edge-adjacent (18 nearest neighbors) or face-, edge- and vertex-adjacent (26 nearest neighbors). |
mode | Defined the policy for handling active tiles (see above for details) |
Definition at line 1081 of file Morphology.h.
|
inline |
Topologically dilate all leaf-level active voxels in a tree using one of three nearest neighbor connectivity patterns.
tree | tree to be dilated |
iterations | number of iterations to apply the dilation |
nn | connectivity pattern of the dilation: either face-adjacent (6 nearest neighbors), face- and edge-adjacent (18 nearest neighbors) or face-, edge- and vertex-adjacent (26 nearest neighbors). |
Definition at line 855 of file Morphology.h.
|
inline |
Topologically dilate all leaf-level active voxels in a tree using one of three nearest neighbor connectivity patterns.
manager | LeafManager containing the tree to be dilated. |
iterations | number of iterations to apply the dilation |
nn | connectivity pattern of the dilation: either face-adjacent (6 nearest neighbors), face- and edge-adjacent (18 nearest neighbors) or face-, edge- and vertex-adjacent (26 nearest neighbors). |
Definition at line 845 of file Morphology.h.
|
inline |
Compute the divergence of the given vector-valued grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 984 of file GridOperators.h.
|
inline |
Definition at line 993 of file GridOperators.h.
|
inline |
Definition at line 148 of file GridOperators.h.
|
inline |
Definition at line 155 of file GridOperators.h.
|
inline |
Definition at line 458 of file LevelSetMeasure.h.
|
inline |
Definition at line 468 of file LevelSetMeasure.h.
|
inline |
Definition at line 512 of file LevelSetMeasure.h.
|
inline |
Definition at line 520 of file LevelSetMeasure.h.
|
inline |
Definition at line 537 of file LevelSetMeasure.h.
|
inline |
Definition at line 546 of file LevelSetMeasure.h.
|
inline |
The normal entry points for level set rebuild are the levelSetRebuild() functions. doLevelSetRebuild() is mainly for internal use, but when the isovalue and half band widths are given in ValueType units (for example, if they are queried from a grid), it might be more convenient to call this function directly.
Definition at line 229 of file LevelSetRebuild.h.
|
inline |
Definition at line 288 of file LevelSetRebuild.h.
|
inline |
Definition at line 485 of file LevelSetMeasure.h.
|
inline |
Definition at line 495 of file LevelSetMeasure.h.
|
inline |
Definition at line 3408 of file MeshToVolume.h.
|
inline |
Definition at line 3479 of file MeshToVolume.h.
|
inline |
The normal entry points for resampling are the resampleToMatch() functions, which correctly handle level set grids under scaling and shearing. doResampleToMatch() is mainly for internal use but is typically faster for level sets, and correct provided that no scaling or shearing is needed.
Definition at line 445 of file GridTransformer.h.
|
inline |
Definition at line 247 of file SignedFloodFill.h.
|
inline |
Definition at line 265 of file SignedFloodFill.h.
|
inline |
Definition at line 101 of file VectorTransformer.h.
|
inline |
Definition at line 109 of file VectorTransformer.h.
|
inline |
Definition at line 5231 of file VolumeToMesh.h.
|
inline |
Definition at line 5287 of file VolumeToMesh.h.
|
inline |
Topologically erode all leaf-level active voxels in the given tree.
That is, shrink the set of active voxels by iterations voxels in the +x, -x, +y, -y, +z and -z directions, but don't change the values of any voxels, only their active states.
Definition at line 875 of file Morphology.h.
|
inline |
Topologically erode all leaf-level active voxels in the given tree.
That is, shrink the set of active voxels by iterations voxels in the +x, -x, +y, -y, +z and -z directions, but don't change the values of any voxels, only their active states.
Definition at line 865 of file Morphology.h.
|
inline |
Return a mask for each connected component of the given grid's active voxels.
volume | Input grid or tree |
masks | Output set of disjoint active topology masks sorted in descending order based on the active voxel count. |
Definition at line 2355 of file LevelSetUtil.h.
|
inline |
Extracts the interior regions of a signed distance field and topologically enclosed (watertight) regions of value greater than the isovalue (cavities) that can arise as the result of CSG union operations between different shapes where at least one of the shapes has a concavity that is capped.
For example the enclosed region of a capped bottle would include the walls and the interior cavity.
volume
and whose active and true
values correspond to the interior and enclosed regions in the input signed distance field.volume | Signed distance field / level set volume. |
isovalue | Threshold below which values are considered part of the interior region. |
fillMask | Optional boolean tree, when provided enclosed cavity regions that are not completely filled by this mask are ignored. |
For instance if the fill mask does not completely fill the bottle in the previous example only the walls and cap are returned and the interior cavity will be ignored.
Definition at line 2306 of file LevelSetUtil.h.
|
inline |
Return a mask of the voxels that intersect the implicit surface with the given isovalue.
volume | Signed distance field / level set volume. |
isovalue | The crossing point that is considered the surface. |
Definition at line 2331 of file LevelSetUtil.h.
OpType::ResultTreeType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::extractSparseTree | ( | const DenseType & | dense, |
const OpType & | functor, | ||
const typename OpType::ResultValueType & | background, | ||
bool | threaded = true |
||
) |
Selectively extract and transform data from a dense grid, producing a sparse tree with leaf nodes only (e.g. create a tree from the square of values greater than a cutoff.)
dense | A dense grid that acts as a data source |
functor | A functor that selects and transforms data for output |
background | The background value of the resulting sparse grid |
threaded | Option to use threaded or serial code path |
Ptr
to tree with the valuetype and configuration defined by typedefs in the functor
. The type of the sparse tree is determined by the specified OtpType functor by means of the typedef OptType::ResultTreeType
The OptType function is responsible for the the transformation of dense grid data to sparse grid data on a per-voxel basis.
Only leaf nodes with active values will be added to the sparse grid.
The OpType must struct that defines a the minimal form
For example, to generate a <ValueType, 5, 4, 3> tree with valuesOn at locations greater than a given maskvalue
Definition at line 421 of file DenseSparseTools.h.
DSConverter< DenseType, MaskTreeType >::Type::Ptr openvdb::OPENVDB_VERSION_NAME::tools::extractSparseTreeWithMask | ( | const DenseType & | dense, |
const MaskTreeType & | mask, | ||
const typename DenseType::ValueType & | background, | ||
bool | threaded = true |
||
) |
Copy data from the intersection of a sparse tree and a dense input grid. The resulting tree has the same configuration as the sparse tree, but holds the data type specified by the dense input.
dense | A dense grid that acts as a data source |
mask | The active voxels and tiles intersected with dense define iteration mask |
background | The background value of the resulting sparse grid |
threaded | Option to use threaded or serial code path |
Ptr
to tree with the same configuration as mask
but of value type defined by dense
. Definition at line 613 of file DenseSparseTools.h.
|
inline |
Iterate over a scalar grid and compute extrema (min/max) of the values of the voxels that are visited, or iterate over a vector-valued grid and compute extrema of the magnitudes of the vectors.
iter | an iterator over the values of a grid or its tree (Grid::ValueOnCIter , Tree::ValueOffIter , etc.) |
threaded | if true, iterate over the grid in parallel |
Definition at line 379 of file Statistics.h.
|
inline |
Iterate over a grid and compute extrema (min/max) of the values produced by applying the given functor at each voxel that is visited.
iter | an iterator over the values of a grid or its tree (Grid::ValueOnCIter , Tree::ValueOffIter , etc.) |
op | a functor of the form void op(const IterT&, math::Stats&) , where IterT is the type of iter, that inserts zero or more floating-point values into the provided math::Stats object |
threaded | if true, iterate over the grid in parallel |
Definition at line 395 of file Statistics.h.
|
inline |
Fill a closed level set or fog volume with adaptively-sized spheres.
grid | a scalar grid that defines the surface to be filled with spheres |
spheres | an output array of 4-tuples representing the fitted spheres The first three components of each tuple specify the sphere center, and the fourth specifies the radius. The spheres are ordered by radius, from largest to smallest. |
maxSphereCount | no more than this number of spheres are generated |
overlapping | toggle to allow spheres to overlap/intersect |
minRadius | the smallest allowable sphere size, in voxel units |
maxRadius | the largest allowable sphere size, in voxel units |
isovalue | the voxel value that determines the surface of the volume The default value of zero works for signed distance fields, while fog volumes require a larger positive value (0.5 is a good initial guess). |
instanceCount | the number of interior points to consider for the sphere placement Increasing this count increases the chances of finding optimal sphere sizes. |
interrupter | pointer to an object adhering to the util::NullInterrupter interface |
Definition at line 651 of file VolumeToSpheres.h.
|
inline |
Given a set of tangent elements, points
with corresponding normals
, this method returns the intersection point of all tangent elements.
Definition at line 295 of file VolumeToMesh.h.
|
inline |
Iterate over a grid and at each step call op(iter)
.
iter | an iterator over a grid or its tree (Grid::ValueOnCIter , Tree::NodeIter , etc.) |
op | a functor of the form void op(const IterT&) , where IterT is the type of iter |
threaded | if true, transform multiple values of the grid in parallel |
shareOp | if true and threaded is true, all threads use the same functor; otherwise, each thread gets its own copy of the original functor |
tbb::parallel_for()
or tbb::parallel_reduce()
in conjunction with a tree::IteratorRange that wraps a grid or tree iterator. Definition at line 392 of file ValueTransformer.h.
|
inline |
Definition at line 406 of file ValueTransformer.h.
|
inline |
Repartition the points if needed, otherwise return the input grid.
Definition at line 1355 of file PointIndexGrid.h.
|
inline |
Repartition the points if needed, otherwise return the input grid.
Definition at line 1367 of file PointIndexGrid.h.
|
inline |
Compute the gradient of the given scalar grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 1001 of file GridOperators.h.
|
inline |
Definition at line 1010 of file GridOperators.h.
|
inline |
Definition at line 177 of file GridOperators.h.
|
inline |
Definition at line 184 of file GridOperators.h.
|
inline |
Iterate over a scalar grid and compute a histogram of the values of the voxels that are visited, or iterate over a vector-valued grid and compute a histogram of the magnitudes of the vectors.
iter | an iterator over the values of a grid or its tree (Grid::ValueOnCIter , Tree::ValueOffIter , etc.) |
minVal | the smallest value that can be added to the histogram |
maxVal | the largest value that can be added to the histogram |
numBins | the number of histogram bins |
threaded | if true, iterate over the grid in parallel |
Definition at line 368 of file Statistics.h.
|
inline |
Return true
if the given point index grid represents a valid partitioning of the given point array.
points | world-space point array conforming to the PointArray interface |
grid | point index grid to validate |
Definition at line 1328 of file PointIndexGrid.h.
|
inline |
Compute the Laplacian of the given scalar grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 1018 of file GridOperators.h.
|
inline |
Definition at line 1027 of file GridOperators.h.
|
inline |
Definition at line 205 of file GridOperators.h.
|
inline |
Definition at line 212 of file GridOperators.h.
|
inline |
Return the surface area of a narrow-band level set.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
useWorldSpace | if true the area is computed in world space units, else in voxel units. |
TypeError | if grid is not scalar or not floating-point or not a level set. |
|
inline |
Definition at line 476 of file LevelSetMeasure.h.
|
inline |
Compute the surface area and volume of a narrow-band level set.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
area | surface area of the level set |
volume | volume of the level set surface |
useWorldSpace | if true the area and volume are computed in world space units, else in voxel units. |
TypeError | if grid is not scalar or not floating-point or not a level set. |
|
inline |
Compute the surface area and volume of a narrow-band level set.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
area | surface area of the level set |
volume | volume of the level set surface |
avgCurvature | average mean curvature of the level set surface |
useWorldSpace | if true the area, volume and curvature are computed in world space units, else in voxel units. |
TypeError | if grid is not scalar or not floating-point or not a level set. |
|
inline |
Definition at line 528 of file LevelSetMeasure.h.
|
inline |
Definition at line 554 of file LevelSetMeasure.h.
|
inline |
Return a new grid of type GridType
that contains a narrow-band level set representation of an isosurface of a given grid.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
isovalue | the isovalue that defines the implicit surface (defaults to zero, which is typical if the input grid is already a level set or a SDF). |
halfWidth | half the width of the narrow band, in voxel units (defaults to 3 voxels, which is required for some level set operations) |
xform | optional transform for the output grid (if not provided, the transform of the input grid will be matched) |
TypeError | if grid is not scalar or not floating-point |
Definition at line 333 of file LevelSetRebuild.h.
|
inline |
Return a new grid of type GridType
that contains a narrow-band level set representation of an isosurface of a given grid.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
isovalue | the isovalue that defines the implicit surface |
exBandWidth | the exterior narrow-band width in voxel units |
inBandWidth | the interior narrow-band width in voxel units |
xform | optional transform for the output grid (if not provided, the transform of the input grid will be matched) |
TypeError | if grid is not scalar or not floating-point |
Definition at line 317 of file LevelSetRebuild.h.
|
inline |
Return a new grid of type GridType
that contains a narrow-band level set representation of an isosurface of a given grid.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
isovalue | the isovalue that defines the implicit surface |
exBandWidth | the exterior narrow-band width in voxel units |
inBandWidth | the interior narrow-band width in voxel units |
xform | optional transform for the output grid (if not provided, the transform of the input grid will be matched) |
interrupter | optional interrupter object |
TypeError | if grid is not scalar or not floating-point |
Definition at line 302 of file LevelSetRebuild.h.
|
inline |
Return the volume of a narrow-band level set surface.
grid | a scalar, floating-point grid with one or more disjoint, closed isosurfaces at the given isovalue |
useWorldSpace | if true the volume is computed in world space units, else in voxel units. |
TypeError | if grid is not scalar or not floating-point or not a level set. |
|
inline |
Definition at line 503 of file LevelSetMeasure.h.
|
inline |
Compute the magnitudes of the vectors of the given vector-valued grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 1052 of file GridOperators.h.
|
inline |
Definition at line 1061 of file GridOperators.h.
|
inline |
Definition at line 262 of file GridOperators.h.
|
inline |
Definition at line 269 of file GridOperators.h.
|
inline |
Makes every voxel of the grid
active if it contains a point.
points | points that active the voxels of grid |
grid | on out its voxels with points are active |
Definition at line 101 of file PointsToMask.h.
|
inline |
Compute the mean curvature of the given grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 1035 of file GridOperators.h.
|
inline |
Definition at line 1044 of file GridOperators.h.
|
inline |
Definition at line 233 of file GridOperators.h.
|
inline |
Definition at line 240 of file GridOperators.h.
|
inline |
Convert a triangle mesh to a level set volume.
GridType
containing a narrow-band level set representation of the input mesh.TypeError | if GridType is not scalar or not floating-point |
xform | transform for the output grid |
points | list of world space point positions |
triangles | triangle index list |
halfWidth | half the width of the narrow band, in voxel units |
Definition at line 3499 of file MeshToVolume.h.
|
inline |
Adds support for a interrupter callback used to cancel the conversion.
Definition at line 3514 of file MeshToVolume.h.
|
inline |
Convert a quad mesh to a level set volume.
GridType
containing a narrow-band level set representation of the input mesh.TypeError | if GridType is not scalar or not floating-point |
xform | transform for the output grid |
points | list of world space point positions |
quads | quad index list |
halfWidth | half the width of the narrow band, in voxel units |
Definition at line 3529 of file MeshToVolume.h.
|
inline |
Adds support for a interrupter callback used to cancel the conversion.
Definition at line 3544 of file MeshToVolume.h.
|
inline |
Convert a triangle and quad mesh to a level set volume.
GridType
containing a narrow-band level set representation of the input mesh.TypeError | if GridType is not scalar or not floating-point |
xform | transform for the output grid |
points | list of world space point positions |
triangles | triangle index list |
quads | quad index list |
halfWidth | half the width of the narrow band, in voxel units |
Definition at line 3559 of file MeshToVolume.h.
|
inline |
Adds support for a interrupter callback used to cancel the conversion.
Definition at line 3574 of file MeshToVolume.h.
|
inline |
Convert a triangle and quad mesh to a signed distance field with an asymmetrical narrow band.
GridType
containing a narrow-band signed distance field representation of the input mesh.TypeError | if GridType is not scalar or not floating-point |
xform | transform for the output grid |
points | list of world space point positions |
triangles | triangle index list |
quads | quad index list |
exBandWidth | the exterior narrow-band width in voxel units |
inBandWidth | the interior narrow-band width in voxel units |
Definition at line 3589 of file MeshToVolume.h.
|
inline |
Adds support for a interrupter callback used to cancel the conversion.
Definition at line 3605 of file MeshToVolume.h.
|
inline |
Convert a triangle and quad mesh to an unsigned distance field.
GridType
containing a narrow-band unsigned distance field representation of the input mesh.TypeError | if GridType is not scalar or not floating-point |
xform | transform for the output grid |
points | list of world space point positions |
triangles | triangle index list |
quads | quad index list |
bandWidth | the width of the narrow band, in voxel units |
Definition at line 3621 of file MeshToVolume.h.
|
inline |
Adds support for a interrupter callback used to cancel the conversion.
Definition at line 3636 of file MeshToVolume.h.
|
inline |
Definition at line 3387 of file MeshToVolume.h.
|
inline |
Convert polygonal meshes that consist of quads and/or triangles into signed or unsigned distance field volumes.
interrupter | a callback to interrupt the conversion process that conforms to the util::NullInterrupter interface |
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 this value to std::numeric_limits<float>::max() to fill interior regions 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 active narrow band region |
Definition at line 3085 of file MeshToVolume.h.
|
inline |
Normalize the vectors of the given vector-valued grid.
When a mask grid is specified, the solution is calculated only in the intersection of the mask active topology and the input active topology independent of the transforms associated with either grid.
Definition at line 1069 of file GridOperators.h.
|
inline |
Definition at line 1078 of file GridOperators.h.
|
inline |
Definition at line 290 of file GridOperators.h.
|
inline |
Definition at line 297 of file GridOperators.h.
|
inline |
Definition at line 3654 of file MeshToVolume.h.
|
inline |
Same as opStatistics except it returns a math::Extrema vs a math::Stats.
Definition at line 414 of file Statistics.h.
|
inline |
Iterate over a grid and compute statistics (mean, variance, etc.) of the values produced by applying a given operator (see math/Operators.h) at each voxel that is visited.
iter | an iterator over the values of a grid or its tree (Grid::ValueOnCIter , Tree::ValueOffIter , etc.) |
op | an operator object with a method of the form double result(Accessor&, const Coord&) |
threaded | if true, iterate over the grid in parallel |
result()
methods are of the form double result(const Map&, Accessor&, const Coord&)
, must be wrapped in a math::MapAdapter. Definition at line 423 of file Statistics.h.
|
inline |
Reduce the memory footprint of a tree by replacing with tiles any nodes whose values are all the same (optionally to within a tolerance) and have the same active state.
tree | the tree to be pruned |
tolerance | tolerance within which values are considered to be equal |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
|
inline |
Reduce the memory footprint of a tree by replacing with background tiles any nodes whose values are all inactive.
tree | the tree to be pruned |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
|
inline |
Reduce the memory footprint of a tree by replacing any nodes whose values are all inactive with tiles of the given value.
tree | the tree to be pruned |
value | value assigned to inactive tiles created during pruning |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
|
inline |
Reduce the memory footprint of a tree by replacing nodes whose values are all inactive with inactive tiles having a value equal to the first value encountered in the (inactive) child.
This method is faster than tolerance-based prune and useful for narrow-band level set applications where inactive values are limited to either an inside or an outside value.
tree | the tree to be pruned |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
ValueError | if the background of the tree is negative (as defined by math::isNegative) |
|
inline |
Reduce the memory footprint of a tree by replacing nodes whose voxel values are all inactive with inactive tiles having the value -| insideWidth | if the voxel values are negative and | outsideWidth | otherwise.
This method is faster than tolerance-based prune and useful for narrow-band level set applications where inactive values are limited to either an inside or an outside value.
tree | the tree to be pruned |
outsideWidth | the width of the outside of the narrow band |
insideWidth | the width of the inside of the narrow band |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
ValueError | if outsideWidth is negative or insideWidth is not negative (as defined by math::isNegative). |
|
inline |
Reduce the memory footprint of a tree by replacing with tiles any non-leaf nodes whose values are all the same (optionally to within a tolerance) and have the same active state.
tree | the tree to be pruned |
tolerance | tolerance within which values are considered to be equal |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
|
inline |
Ray-trace a volume.
Definition at line 802 of file RayTracer.h.
|
inline |
Ray-trace a volume using a given ray intersector.
Definition at line 816 of file RayTracer.h.
|
inline |
Resample an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide (apart from sampling artifacts), but the output grid's transform is unchanged.
Specifically, this function resamples the input grid into the output grid's index space, using a sampling kernel like PointSampler, BoxSampler, or QuadraticSampler.
inGrid | the grid to be resampled |
outGrid | the grid into which to write the resampled voxel data |
interrupter | an object adhering to the util::NullInterrupter interface |
Definition at line 478 of file GridTransformer.h.
|
inline |
Resample an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide (apart from sampling artifacts), but the output grid's transform is unchanged.
Specifically, this function resamples the input grid into the output grid's index space, using a sampling kernel like PointSampler, BoxSampler, or QuadraticSampler.
inGrid | the grid to be resampled |
outGrid | the grid into which to write the resampled voxel data |
Definition at line 521 of file GridTransformer.h.
|
inline |
Threaded method to construct a boolean mask that represents interior regions in a signed distance field.
volume
and whose active and true
values correspond to the interior of the input signed distance field.volume | Signed distance field / level set volume. |
isovalue | Threshold below which values are considered part of the interior region. |
Definition at line 2291 of file LevelSetUtil.h.
|
inline |
Threaded method to convert a sparse level set/SDF into a sparse fog volume.
For a level set, the active and negative-valued interior half of the narrow band becomes a linear ramp from 0 to 1; the inactive interior becomes active with a constant value of 1; and the exterior, including the background and the active exterior half of the narrow band, becomes inactive with a constant value of 0. The interior, though active, remains sparse.
For a generic SDF, a specified cutoff distance determines the width of the ramp, but otherwise the result is the same as for a level set.
grid | level set/SDF grid to transform |
cutoffDistance | optional world space cutoff distance for the ramp (automatically clamped if greater than the interior narrow band width) |
Definition at line 2175 of file LevelSetUtil.h.
|
inline |
Separates disjoint active topology components into distinct grids or trees.
Supports volumes with active tiles.
volume | Input grid or tree |
segments | Output set of disjoint active topology components sorted in descending order based on the active voxel count. |
Definition at line 2513 of file LevelSetUtil.h.
|
inline |
Separates disjoint SDF surfaces into distinct grids or trees.
Supports asymmetric interior / exterior narrowband widths and SDF volumes with dense interior regions.
volume | Input signed distance field / level set volume |
segments | Output set of disjoint SDF surfaces found in volume sorted in descending order based on the surface intersecting voxel count. |
Definition at line 2557 of file LevelSetUtil.h.
|
inline |
Set the value of the voxel at the given coordinates in tree to the maximum of its current value and value, and mark the voxel as active.
This is typically significantly faster than calling getValue() followed by setValueOn().
Definition at line 303 of file ValueTransformer.h.
|
inline |
Set the value of the voxel at the given coordinates in tree to the minimum of its current value and value, and mark the voxel as active.
This is typically significantly faster than calling getValue() followed by setValueOn().
Definition at line 295 of file ValueTransformer.h.
|
inline |
Set the value of the voxel at the given coordinates in tree to the product of its current value and value, and mark the voxel as active.
This is typically significantly faster than calling getValue() followed by setValueOn().
Definition at line 319 of file ValueTransformer.h.
|
inline |
Set the value of the voxel at the given coordinates in tree to the sum of its current value and value, and mark the voxel as active.
This is typically significantly faster than calling getValue() followed by setValueOn().
Definition at line 311 of file ValueTransformer.h.
|
inline |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting outside values to +background and inside values to -background.
tree | Tree or LeafManager that will be flood filled. |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
minLevel | Specify the lowest tree level to process (leafnode level = 0) |
TypeError | if the ValueType of tree is not floating-point. |
Definition at line 294 of file SignedFloodFill.h.
|
inline |
Set the values of all inactive voxels and tiles of a narrow-band level set from the signs of the active voxels, setting exterior values to outsideWidth and interior values to insideWidth. Set the background value of this tree to outsideWidth.
tree | Tree or LeafManager that will be flood filled |
outsideWidth | the width of the outside of the narrow band |
insideWidth | the width of the inside of the narrow band |
threaded | enable or disable threading (threading is enabled by default) |
grainSize | used to control the threading granularity (default is 1) |
minLevel | Specify the lowest tree level to process (leafnode level = 0) |
TypeError | if the ValueType of tree is not floating-point. |
Definition at line 280 of file SignedFloodFill.h.
|
inline |
Iterate over a scalar grid and compute statistics (mean, variance, etc.) of the values of the voxels that are visited, or iterate over a vector-valued grid and compute statistics of the magnitudes of the vectors.
iter | an iterator over the values of a grid or its tree (Grid::ValueOnCIter , Tree::ValueOffIter , etc.) |
threaded | if true, iterate over the grid in parallel |
Definition at line 387 of file Statistics.h.
|
inline |
Iterate over a grid and compute statistics (mean, variance, etc.) of the values produced by applying the given functor at each voxel that is visited.
iter | an iterator over the values of a grid or its tree (Grid::ValueOnCIter , Tree::ValueOffIter , etc.) |
op | a functor of the form void op(const IterT&, math::Stats&) , where IterT is the type of iter, that inserts zero or more floating-point values into the provided math::Stats object |
threaded | if true, iterate over the grid in parallel |
Definition at line 404 of file Statistics.h.
|
inline |
Compute the narrow-band signed distance to the interface between active and inactive voxels in the input grid.
float
grid | Input grid of arbitrary type whose active voxels are used in constructing the level set. |
halfWidth | Half the width of the narrow band in voxel units. |
closingSteps | Number of morphological closing steps used to fill gaps in the active voxel region. |
dilation | Number of voxels to expand the active voxel region. |
smoothingSteps | Number of smoothing interations. |
Definition at line 270 of file TopologyToLevelSet.h.
|
inline |
Compute the narrow-band signed distance to the interface between active and inactive voxels in the input grid.
float
grid | Input grid of arbitrary type whose active voxels are used in constructing the level set. |
halfWidth | Half the width of the narrow band in voxel units. |
closingSteps | Number of morphological closing steps used to fill gaps in the active voxel region. |
dilation | Number of voxels to expand the active voxel region. |
smoothingSteps | Number of smoothing interations. |
interrupt | Optional object adhering to the util::NullInterrupter interface. |
Definition at line 212 of file TopologyToLevelSet.h.
|
inline |
Traces the exterior voxel boundary of closed objects in the input volume tree. Exterior voxels are marked with a negative sign, voxels with a value below 0.75
are left unchanged and act as the boundary layer.
Definition at line 3008 of file MeshToVolume.h.
void openvdb::OPENVDB_VERSION_NAME::tools::transformDense | ( | Dense< ValueT, openvdb::tools::LayoutZYX > & | dense, |
const openvdb::CoordBBox & | bbox, | ||
const OpType & | op, | ||
bool | parallel = true |
||
) |
Apply a point-wise functor to the intersection of a dense grid and a given bounding box
dense | A dense grid to be transformed |
bbox | Index space bounding box, define region where the transformation is applied |
op | A functor that acts on the dense grid value type |
parallel | Used to select multithreaded or single threaded Minimally, the op class has to support a operator() method, // Square values in a grid
struct Op
{
ValueT operator()(const ValueT& in) const
{
// do work
ValueT result = in * in;
return result;
}
};
|
void openvdb::OPENVDB_VERSION_NAME::tools::transformDense | ( | Dense< ValueT, openvdb::tools::LayoutZYX > & | dense, |
const openvdb::CoordBBox & | bbox, | ||
const PointwiseOpT & | functor, | ||
bool | parallel | ||
) |
Apply a point-wise functor to the intersection of a dense grid and a given bounding box.
Definition at line 788 of file DenseSparseTools.h.
|
inline |
Iterate over a grid and at each step call op(iter, accessor)
to populate (via the accessor) the given output grid, whose ValueType
need not be the same as the input grid's.
inIter | a non-const or (preferably) const iterator over an input grid or its tree (Grid::ValueOnCIter , Tree::NodeIter , etc.) |
outGrid | an empty grid to be populated |
op | a functor of the form void op(const InIterT&, OutGridT::ValueAccessor&) , where InIterT is the type of inIter |
threaded | if true, transform multiple values of the input grid in parallel |
shareOp | if true and threaded is true, all threads use the same functor; otherwise, each thread gets its own copy of the original functor |
merge | how to merge intermediate results from multiple threads (see Types.h) |
tbb::parallel_for()
or tbb::parallel_reduce()
in conjunction with a tree::IteratorRange that wraps a grid or tree iterator. Definition at line 599 of file ValueTransformer.h.
|
inline |
Definition at line 618 of file ValueTransformer.h.
|
inline |
Apply an affine transform to the voxel values of a vector-valued grid in accordance with the grid's vector type (covariant, contravariant, etc.).
TypeError | if the grid is not vector-valued |
Definition at line 145 of file VectorTransformer.h.
bool openvdb::OPENVDB_VERSION_NAME::tools::uniqueInactiveValues | ( | const GridType & | grid, |
std::vector< typename GridType::ValueType > & | values, | ||
size_t | numValues | ||
) |
Threaded method to find unique inactive values.
grid | A VDB volume. |
values | List of unique inactive values, returned by this method. |
numValues | Number of values to look for. |
false
if the grid has more than numValues inactive values. Definition at line 1295 of file Diagnostics.h.
|
inline |
Uniformly mesh any scalar grid that has a continuous isosurface.
grid | a scalar grid to mesh |
points | output list of world space points |
quads | output quad index list |
isovalue | determines which isosurface to mesh |
TypeError | if grid does not have a scalar value type |
Definition at line 5317 of file VolumeToMesh.h.
|
inline |
Adaptively mesh any scalar grid that has a continuous isosurface.
grid | a scalar grid to mesh |
points | output list of world space points |
triangles | output triangle index list |
quads | output quad index list |
isovalue | determines which isosurface to mesh |
adaptivity | surface adaptivity threshold [0 to 1] |
relaxDisorientedTriangles | toggle relaxing disoriented triangles during adaptive meshing. |
TypeError | if grid does not have a scalar value type |
Definition at line 5302 of file VolumeToMesh.h.