OpenVDB
0.104.0
|
Namespaces | |
namespace | composite |
namespace | internal |
namespace | local |
This class rasterizes particles (with position, radius and velocity) into a narrow-band level set. | |
namespace | local_util |
namespace | valxform |
Classes | |
struct | CompReplaceOp |
class | CsgVisitorBase |
struct | CsgUnionVisitor |
struct | CsgIntersectVisitor |
struct | CsgDiffVisitor |
class | CptImpl |
Computes the Closest-Point-Transform (CPT) from a distance field. More... | |
class | CptFunctor |
class | Cpt |
Computes the Closest-Point-Transform (CPT) from a distance field. More... | |
class | Filter |
Filtering of VDB volumes. 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 | Curl |
Computes the Curl of a scalar grid. More... | |
class | Divergence |
Computes the Divergence of a scalar grid. More... | |
class | Gradient |
Computes the Gradient of a scalar grid. More... | |
class | Laplacian |
Computes the Laplacian of a scalar grid. More... | |
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 | PointSampler |
struct | BoxSampler |
struct | QuadraticSampler |
struct | StaggeredPointSampler |
struct | StaggeredBoxSampler |
struct | StaggeredQuadraticSampler |
class | GridSampler |
Base class that provides the interface for continuous sampling of values in a grid. More... | |
class | GridSampling |
Base class that provides the interface for continuous sampling of values in a grid. More... | |
class | LinearInterp |
Perform linear interpolation on a grid voxel to sample space. More... | |
class | QuadraticInterp |
class | DiscreteField |
Sime wrapper class for a velocity grid. More... | |
class | EnrightField |
Analytical, divergence-free and periodic vecloity field. More... | |
class | LevelSetAdvection |
Hyperbolic advection of narrow-band level sets in an external velocity field. More... | |
class | LevelSetFilter |
Filtering (i.e. diffusion) of narrow-band level sets. 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... | |
class | MinMaxVoxel |
Threaded operation to find the min and max active voxel values. More... | |
class | LeafTransformer |
Threaded leaf-node transformation scheme. More... | |
class | LevelSetFracture |
Level set fracturing. More... | |
class | MeshToVolume |
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 | ParticlesToLevelSet |
class | ParticlesToLevelSetAndId |
Use this wrapper class to convert particles into a level set and a separate index grid of closest-point particle id. The latter can be used to subsequently transfer particles attributes into separate grids. More... | |
class | ClosestPointProjector |
class | VelocitySampler |
class | VelocityIntegrator |
Performs runge-kutta time integration of variable order in a static velocity field. More... | |
class | PointAdvect |
class | ConstrainedPointAdvect |
class | UniformPointScatter |
The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes: 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 and the local voxel (or tile) value. More... | |
class | PolygonPool |
Collection of quads and triangles. More... | |
class | VolumeToMesh |
Mesh any scalar grid with a continuous isosurface. More... | |
Typedefs | |
typedef boost::scoped_array < openvdb::Vec3s > | PointList |
Point and primitive list types. More... | |
typedef boost::scoped_array < PolygonPool > | PolygonPoolList |
Point and primitive list types. More... | |
Enumerations | |
enum | { GENERATE_PRIM_INDEX_GRID = 0x1 } |
Conversion flags, used to control the MeshToVolume output. More... | |
enum | { POLYFLAG_EXTERIOR = 0x1, POLYFLAG_FRACTURE_SEAM = 0x2 } |
Polygon flags, used for reference based meshing. More... | |
Functions | |
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 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 | compReplace (GridOrTreeT &a, const GridOrTreeT &b) |
Copy the active voxels of B into A. More... | |
template<typename GridType > | |
GridType::Ptr | curl (const GridType &grid, bool threaded=true) |
Compute the curl of the given vector-valued grid. More... | |
template<typename GridType > | |
VectorToScalarConverter < GridType >::Type::Ptr | divergence (const GridType &grid, bool threaded=true) |
Compute the divergence of the given vector-valued grid. More... | |
template<typename GridType > | |
ScalarToVectorConverter < GridType >::Type::Ptr | gradient (const GridType &grid, bool threaded=true) |
Compute the gradient of the given scalar grid. More... | |
template<typename GridType > | |
GridType::Ptr | laplacian (const GridType &grid, bool threaded=true) |
Compute the Laplacian of the given scalar grid. More... | |
template<typename GridType > | |
GridType::Ptr | meanCurvature (const GridType &grid, bool threaded=true) |
Compute the mean curvature of the given grid. More... | |
template<typename GridType > | |
GridType::Ptr | magnitude (const GridType &grid, bool threaded=true) |
Compute the magnitude of the given grid. More... | |
template<typename GridType > | |
GridType::Ptr | normalize (const GridType &grid, bool threaded=true) |
Normalizes the given vector grid. More... | |
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<class GridType > | |
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue, float halfWidth=3.0f, const math::Transform *xform=NULL) |
Returns a grid of type GridType containing a new narrow-band level set. More... | |
template<class GridType > | |
GridType::Ptr | levelSetRebuild (const GridType &grid, float isovalue, float exBandWidth, float inBandWidth, const math::Transform *xform=NULL) |
Returns a grid of type GridType containing a new narrow-band level set. 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) |
Returns a grid of type GridType containing a new narrow-band level set. More... | |
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<typename InterruptT > | |
OPENVDB_DEPRECATED FloatGrid::Ptr | makeSphere (float radius, const openvdb::Vec3f ¢er, float voxelSize, float halfWidth, InterruptT *interrupt) |
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 GridType > | |
Grid< typename GridType::TreeType::template ValueConverter< bool >::Type > ::Ptr | sdfInteriorMask (const GridType &grid, typename GridType::ValueType iso=lsutilGridZero< GridType >()) |
Threaded method to extract the interior region mask from a level-set/SDF grid. More... | |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | dilateVoxels (TreeType &tree) |
template<typename TreeType > | |
OPENVDB_STATIC_SPECIALIZATION void | dilateVoxels (tree::LeafManager< TreeType > &manager) |
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) |
template<typename InIterT , typename OutGridT , typename XformOp > | |
void | transformValues (const InIterT &inIter, OutGridT &outGrid, const XformOp &op, bool threaded=true, bool shareOp=true) |
typedef boost::scoped_array<openvdb::Vec3s> PointList |
Point and primitive list types.
typedef boost::scoped_array<PolygonPool> PolygonPoolList |
Point and primitive list types.
anonymous enum |
Conversion flags, used to control the MeshToVolume output.
Enumerator | |
---|---|
GENERATE_PRIM_INDEX_GRID |
anonymous enum |
|
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.
|
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.
|
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.
|
inline |
Copy the active voxels of B into A.
|
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.
GridType::Ptr 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. GridType::Ptr openvdb::v0_104_0::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.
|
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. |
|
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. |
|
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. |
|
inline |
Compute the curl of the given vector-valued grid.
|
inline |
Topologically dilate all leaf-level active voxels in the given tree, i.e., expand the set of active voxels by one voxel in the +x, -x, +y, -y, +z and -z directions, but don't change the values of any voxels, only their active states.
|
inline |
|
inline |
Compute the divergence of the given vector-valued grid.
|
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 functor |
tbb::parallel_for()
or tbb::parallel_reduce()
in conjunction with a tree::IteratorRange that wraps a grid or tree iterator.
|
inline |
|
inline |
Compute the gradient of the given scalar grid.
|
inline |
Compute the Laplacian of the given scalar grid.
|
inline |
Returns a grid of type GridType
containing a new narrow-band level set.
grid | A scalar grid with a single closed isosurface at the given isovalue. |
isovalue | The isovalue that defines the implicite surface. |
halfWidth | Half the width of the narrow band, in voxel units. |
xform | Optional transform for the output grid, if not provided the transform of the input grid will be matched. |
|
inline |
Returns a grid of type GridType
containing a new narrow-band level set.
grid | A scalar grid with a single closed isosurface at the given isovalue. |
isovalue | The isovalue that defines the implicite 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. |
|
inline |
Returns a grid of type GridType
containing a new narrow-band level set.
grid | A scalar grid with a single closed isosurface at the given isovalue. |
isovalue | The isovalue that defines the implicite 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 interupter object. |
|
inline |
Compute the magnitude of the given grid.
OPENVDB_DEPRECATED FloatGrid::Ptr openvdb::v0_104_0::tools::makeSphere | ( | float | radius, |
const openvdb::Vec3f & | center, | ||
float | voxelSize, | ||
float | halfWidth, | ||
InterruptT * | interrupt | ||
) |
radius | Radius of the sphere in world units |
center | Center of the sphere in world units |
voxelSize | Size of voxels in world units |
halfWidth | Half-width of narrow-band in voxel units |
interrupt | Pointer to optional interrupter. Use template argument util::NullInterrupter if no interruption is desired. |
|
inline |
Compute the mean curvature of the given grid.
|
inline |
Normalizes the given vector grid.
|
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 |
|
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 |
|
inline |
Threaded method to extract the interior region mask from a level-set/SDF grid.
grid
. The interior region is made active.grid | A Level set / SDF grid. |
iso | Values below this threshold are considered to be part of the interior region. |
|
inline |
Threaded method to convert a sparse level-set/SDF into a sparse fog volume.
grid | Level set / SDF grid to transform. |
cutOffDistance | Optional world space cutoff distance for the gradient (automatically clamped if greater than the interior narrow band width) |
|
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 functor |
tbb::parallel_for()
or tbb::parallel_reduce()
in conjunction with a tree::IteratorRange that wraps a grid or tree iterator.
|
inline |