HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points Namespace Reference

Namespaces

 attribute_traits
 
 future
 
 index
 
 index_filter_internal
 
 internal
 
 point_advect_internal
 
 point_attribute_internal
 
 point_conversion_internal
 
 point_delete_internal
 
 point_group_internal
 
 point_mask_internal
 
 point_move_internal
 
 point_sample_internal
 
 point_scatter_internal
 

Classes

class  AttributeArray
 Base class for storing attribute data. More...
 
struct  UnknownCodec
 
struct  NullCodec
 
struct  TruncateCodec
 
struct  PositionRange
 
struct  UnitRange
 
struct  FixedPointCodec
 
struct  UnitVecCodec
 
class  TypedAttributeArray
 Typed class for storing attribute data. More...
 
class  AttributeHandle
 
class  AttributeWriteHandle
 Write-able version of AttributeHandle. More...
 
struct  AccessorEval
 Accessor to call unsafe get and set methods based on templated Codec and Value. More...
 
struct  AccessorEval< UnknownCodec, ValueType >
 Partial specialization when Codec is not known at compile-time to use the supplied functor instead. More...
 
struct  StringCodec
 
class  StringMetaInserter
 
class  StringAttributeHandle
 
class  StringAttributeWriteHandle
 
struct  GroupCodec
 
class  GroupHandle
 
class  GroupWriteHandle
 
class  GroupFilter
 Index filtering on group membership. More...
 
class  AttributeSet
 Ordered collection of uniquely-named attribute arrays. More...
 
class  ValueMaskFilter
 Index filtering on active / inactive state of host voxel. More...
 
class  MultiGroupFilter
 
class  RandomLeafFilter
 
class  AttributeHashFilter
 
class  LevelSetFilter
 
class  BBoxFilter
 
class  BinaryFilter
 
struct  FilterTraits
 
struct  FilterTraits< BBoxFilter >
 
struct  FilterTraits< LevelSetFilter< T > >
 
struct  FilterTraits< BinaryFilter< T0, T1, And > >
 
class  NullFilter
 A no-op filter that can be used when iterating over all indices. More...
 
class  ValueVoxelCIter
 A forward iterator over array indices in a single voxel. More...
 
class  IndexIter
 A forward iterator over array indices with filtering IteratorT can be either IndexIter or ValueIndexIter (or some custom index iterator) FilterT should be a struct or class with a valid() method than can be evaluated per index Here's a simple filter example that only accepts even indices: More...
 
class  PointAttributeVector
 Point-partitioner compatible STL vector attribute wrapper for convenience. More...
 
class  PointDataLeafNode
 
struct  TreeConverter
 Similiar to ValueConverter, but allows for tree configuration conversion to a PointDataTree. ValueConverter<PointDataIndex32> cannot be used as a PointDataLeafNode is not a specialization of LeafNode. More...
 
struct  NullDeformer
 No-op deformer (adheres to the deformer interface documented in PointMove.h) More...
 
struct  DeformerTraits
 Deformer Traits for optionally configuring deformers to be applied in index-space. The default is world-space. More...
 
class  CachedDeformer
 A Deformer that caches the resulting positions from evaluating another Deformer. More...
 
struct  SampleWithRounding
 
struct  DummySampleType
 

Typedefs

using StringIndexType = uint32_t
 
using StringAttributeArray = TypedAttributeArray< StringIndexType, StringCodec< false >>
 
using GroupType = uint8_t
 
using GroupAttributeArray = TypedAttributeArray< GroupType, GroupCodec >
 
using ActiveFilter = ValueMaskFilter< true >
 
using InactiveFilter = ValueMaskFilter< false >
 
using PointDataTree = tree::Tree< tree::RootNode< tree::InternalNode< tree::InternalNode< PointDataLeafNode< PointDataIndex32, 3 >, 4 >, 5 >>>
 Point index tree configured to match the default VDB configurations. More...
 
using PointDataGrid = Grid< PointDataTree >
 Point data grid. More...
 

Functions

template<typename IntegerT , typename FloatT >
IntegerT floatingPointToFixedPoint (const FloatT s)
 
template<typename FloatT , typename IntegerT >
FloatT fixedPointToFloatingPoint (const IntegerT s)
 
template<typename IntegerVectorT , typename FloatT >
IntegerVectorT floatingPointToFixedPoint (const math::Vec3< FloatT > &v)
 
template<typename FloatVectorT , typename IntegerT >
FloatVectorT fixedPointToFloatingPoint (const math::Vec3< IntegerT > &v)
 
bool isString (const AttributeArray &array)
 
bool isGroup (const AttributeArray &array)
 
template<typename IterT >
Index64 iterCount (const IterT &iter)
 Count up the number of times the iterator can iterate. More...
 
template<typename PointDataGridT , typename VelGridT , typename AdvectFilterT = NullFilter, typename FilterT = NullFilter>
void advectPoints (PointDataGridT &points, const VelGridT &velocity, const Index integrationOrder, const double dt, const Index timeSteps, const AdvectFilterT &advectFilter=NullFilter(), const FilterT &filter=NullFilter(), const bool cached=true)
 Advect points in a PointDataGrid through a velocity grid. More...
 
template<typename PointDataTreeT >
void appendAttribute (PointDataTreeT &tree, const Name &name, const NamePair &type, const Index strideOrTotalSize=1, const bool constantStride=true, Metadata::Ptr metaDefaultValue=Metadata::Ptr(), const bool hidden=false, const bool transient=false)
 Appends a new attribute to the VDB tree (this method does not require a templated AttributeType) More...
 
template<typename ValueType , typename CodecType = NullCodec, typename PointDataTreeT = PointDataTree>
void appendAttribute (PointDataTreeT &tree, const std::string &name, const ValueType &uniformValue=point_attribute_internal::Default< ValueType >::value(), const Index strideOrTotalSize=1, const bool constantStride=true, Metadata::Ptr metaDefaultValue=Metadata::Ptr(), const bool hidden=false, const bool transient=false)
 Appends a new attribute to the VDB tree. More...
 
template<typename ValueType , typename PointDataTreeT >
void collapseAttribute (PointDataTreeT &tree, const Name &name, const ValueType &uniformValue=point_attribute_internal::Default< ValueType >::value())
 Collapse the attribute into a uniform value. More...
 
template<typename PointDataTreeT >
void dropAttributes (PointDataTreeT &tree, const std::vector< size_t > &indices)
 Drops attributes from the VDB tree. More...
 
template<typename PointDataTreeT >
void dropAttributes (PointDataTreeT &tree, const std::vector< Name > &names)
 Drops attributes from the VDB tree. More...
 
template<typename PointDataTreeT >
void dropAttribute (PointDataTreeT &tree, const size_t &index)
 Drop one attribute from the VDB tree (convenience method). More...
 
template<typename PointDataTreeT >
void dropAttribute (PointDataTreeT &tree, const Name &name)
 Drop one attribute from the VDB tree (convenience method). More...
 
template<typename PointDataTreeT >
void renameAttributes (PointDataTreeT &tree, const std::vector< Name > &oldNames, const std::vector< Name > &newNames)
 Rename attributes in a VDB tree. More...
 
template<typename PointDataTreeT >
void renameAttribute (PointDataTreeT &tree, const Name &oldName, const Name &newName)
 Rename an attribute in a VDB tree. More...
 
template<typename PointDataTreeT >
void compactAttributes (PointDataTreeT &tree)
 Compact attributes in a VDB tree (if possible). More...
 
template<typename PointDataTreeT >
void bloscCompressAttribute (PointDataTreeT &tree, const Name &name)
 Apply Blosc compression to one attribute in the VDB tree. More...
 
template<typename CompressionT , typename PointDataGridT , typename PositionArrayT , typename PointIndexGridT >
PointDataGridT::Ptr createPointDataGrid (const PointIndexGridT &pointIndexGrid, const PositionArrayT &positions, const math::Transform &xform, Metadata::Ptr positionDefaultValue=Metadata::Ptr())
 Localises points with position into a PointDataGrid into two stages: allocation of the leaf attribute data and population of the positions. More...
 
template<typename CompressionT , typename PointDataGridT , typename ValueT >
PointDataGridT::Ptr createPointDataGrid (const std::vector< ValueT > &positions, const math::Transform &xform, Metadata::Ptr positionDefaultValue=Metadata::Ptr())
 Convenience method to create a PointDataGrid from a std::vector of point positions. More...
 
template<typename PointDataTreeT , typename PointIndexTreeT , typename PointArrayT >
void populateAttribute (PointDataTreeT &tree, const PointIndexTreeT &pointIndexTree, const openvdb::Name &attributeName, const PointArrayT &data, const Index stride=1, const bool insertMetadata=true)
 Stores point attribute data in an existing PointDataGrid attribute. More...
 
template<typename PositionAttribute , typename PointDataGridT , typename FilterT = NullFilter>
void convertPointDataGridPosition (PositionAttribute &positionAttribute, const PointDataGridT &grid, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const FilterT &filter=NullFilter(), const bool inCoreOnly=false)
 Convert the position attribute from a Point Data Grid. More...
 
template<typename TypedAttribute , typename PointDataTreeT , typename FilterT = NullFilter>
void convertPointDataGridAttribute (TypedAttribute &attribute, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const unsigned arrayIndex, const Index stride=1, const FilterT &filter=NullFilter(), const bool inCoreOnly=false)
 Convert the attribute from a PointDataGrid. More...
 
template<typename Group , typename PointDataTreeT , typename FilterT = NullFilter>
void convertPointDataGridGroup (Group &group, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const AttributeSet::Descriptor::GroupIndex index, const FilterT &filter=NullFilter(), const bool inCoreOnly=false)
 Convert the group from a PointDataGrid. More...
 
template<typename PositionWrapper , typename InterrupterT = openvdb::util::NullInterrupter>
float computeVoxelSize (const PositionWrapper &positions, const uint32_t pointsPerVoxel, const math::Mat4d transform=math::Mat4d::identity(), const Index decimalPlaces=5, InterrupterT *const interrupter=nullptr)
 
template<typename PositionAttribute , typename PointDataGridT >
OPENVDB_DEPRECATED void convertPointDataGridPosition (PositionAttribute &positionAttribute, const PointDataGridT &grid, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups, const bool inCoreOnly=false)
 
template<typename TypedAttribute , typename PointDataTreeT >
OPENVDB_DEPRECATED void convertPointDataGridAttribute (TypedAttribute &attribute, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const unsigned arrayIndex, const Index stride, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups, const bool inCoreOnly=false)
 
template<typename Group , typename PointDataTreeT >
OPENVDB_DEPRECATED void convertPointDataGridGroup (Group &group, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const AttributeSet::Descriptor::GroupIndex index, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups, const bool inCoreOnly=false)
 
template<typename PointDataTreeT , typename FilterT = NullFilter>
Index64 pointCount (const PointDataTreeT &tree, const FilterT &filter=NullFilter(), const bool inCoreOnly=false, const bool threaded=true)
 Count the total number of points in a PointDataTree. More...
 
template<typename PointDataTreeT , typename FilterT = NullFilter>
Index64 pointOffsets (std::vector< Index64 > &pointOffsets, const PointDataTreeT &tree, const FilterT &filter=NullFilter(), const bool inCoreOnly=false, const bool threaded=true)
 Populate an array of cumulative point offsets per leaf node. More...
 
template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type, typename FilterT = NullFilter>
GridT::Ptr pointCountGrid (const PointDataGridT &grid, const FilterT &filter=NullFilter())
 Generate a new grid with voxel values to store the number of points per voxel. More...
 
template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type, typename FilterT = NullFilter>
GridT::Ptr pointCountGrid (const PointDataGridT &grid, const openvdb::math::Transform &transform, const FilterT &filter=NullFilter())
 Generate a new grid that uses the supplied transform with voxel values to store the number of points per voxel. More...
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 pointCount (const PointDataTreeT &tree, const bool inCoreOnly)
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 activePointCount (const PointDataTreeT &tree, const bool inCoreOnly=true)
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 inactivePointCount (const PointDataTreeT &tree, const bool inCoreOnly=true)
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 groupPointCount (const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=true)
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 activeGroupPointCount (const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=true)
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 inactiveGroupPointCount (const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=true)
 
template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 getPointOffsets (std::vector< Index64 > &offsets, const PointDataTreeT &tree, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups, const bool inCoreOnly=false)
 
template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type>
OPENVDB_DEPRECATED GridT::Ptr pointCountGrid (const PointDataGridT &grid, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups)
 
template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type>
OPENVDB_DEPRECATED GridT::Ptr pointCountGrid (const PointDataGridT &grid, const openvdb::math::Transform &transform, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups)
 
template<typename PointDataTreeT >
AttributeSet::Descriptor::Ptr makeDescriptorUnique (PointDataTreeT &tree)
 Deep copy the descriptor across all leaf nodes. More...
 
template<typename PointDataTreeT >
void setStreamingMode (PointDataTreeT &tree, bool on=true)
 Toggle the streaming mode on all attributes in the tree to collapse the attributes after deconstructing a bound AttributeHandle to each array. This results in better memory efficiency when the data is streamed into another data structure (typically for rendering). More...
 
template<typename PointDataTreeT >
void prefetch (PointDataTreeT &tree, bool position=true, bool otherAttributes=true)
 Sequentially pre-fetch all delayed-load voxel and attribute data from disk in order to accelerate subsequent random access. More...
 
template<typename PointDataTreeT >
void deleteFromGroups (PointDataTreeT &pointTree, const std::vector< std::string > &groups, bool invert=false, bool drop=true)
 Delete points that are members of specific groups. More...
 
template<typename PointDataTreeT >
void deleteFromGroup (PointDataTreeT &pointTree, const std::string &group, bool invert=false, bool drop=true)
 Delete points that are members of a group. More...
 
void deleteMissingPointGroups (std::vector< std::string > &groups, const AttributeSet::Descriptor &descriptor)
 Delete any group that is not present in the Descriptor. More...
 
template<typename PointDataTree >
void appendGroup (PointDataTree &tree, const Name &group)
 Appends a new empty group to the VDB tree. More...
 
template<typename PointDataTree >
void appendGroups (PointDataTree &tree, const std::vector< Name > &groups)
 Appends new empty groups to the VDB tree. More...
 
template<typename PointDataTree >
void dropGroup (PointDataTree &tree, const Name &group, const bool compact=true)
 Drops an existing group from the VDB tree. More...
 
template<typename PointDataTree >
void dropGroups (PointDataTree &tree, const std::vector< Name > &groups)
 Drops existing groups from the VDB tree, the tree is compacted after dropping. More...
 
template<typename PointDataTree >
void dropGroups (PointDataTree &tree)
 Drops all existing groups from the VDB tree, the tree is compacted after dropping. More...
 
template<typename PointDataTree >
void compactGroups (PointDataTree &tree)
 Compacts existing groups of a VDB Tree to use less memory if possible. More...
 
template<typename PointDataTree , typename PointIndexTree >
void setGroup (PointDataTree &tree, const PointIndexTree &indexTree, const std::vector< short > &membership, const Name &group, const bool remove=false)
 Sets group membership from a PointIndexTree-ordered vector. More...
 
template<typename PointDataTree >
void setGroup (PointDataTree &tree, const Name &group, const bool member=true)
 Sets membership for the specified group for all points (on/off). More...
 
template<typename PointDataTree , typename FilterT >
void setGroupByFilter (PointDataTree &tree, const Name &group, const FilterT &filter)
 Sets group membership based on a provided filter. More...
 
template<typename PointDataTree >
void setGroupByRandomTarget (PointDataTree &tree, const Name &group, const Index64 targetPoints, const unsigned int seed=0)
 
template<typename PointDataTree >
void setGroupByRandomPercentage (PointDataTree &tree, const Name &group, const float percentage=10.0f, const unsigned int seed=0)
 
template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type, typename FilterT = NullFilter>
std::enable_if< std::is_same
< typename MaskT::ValueType,
bool >::value, typename
MaskT::Ptr >::type 
convertPointsToMask (const PointDataGridT &grid, const FilterT &filter=NullFilter(), bool threaded=true)
 Extract a Mask Grid from a Point Data Grid. More...
 
template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type, typename FilterT = NullFilter>
std::enable_if< std::is_same
< typename MaskT::ValueType,
bool >::value, typename
MaskT::Ptr >::type 
convertPointsToMask (const PointDataGridT &grid, const openvdb::math::Transform &transform, const FilterT &filter=NullFilter(), bool threaded=true)
 Extract a Mask Grid from a Point Data Grid using a new transform. More...
 
template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type>
OPENVDB_DEPRECATED
std::enable_if< std::is_same
< typename MaskT::ValueType,
bool >::value, typename
MaskT::Ptr >::type 
convertPointsToMask (const PointDataGridT &grid, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups)
 
template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type>
OPENVDB_DEPRECATED
std::enable_if< std::is_same
< typename MaskT::ValueType,
bool >::value, typename
MaskT::Ptr >::type 
convertPointsToMask (const PointDataGridT &grid, const openvdb::math::Transform &transform, const std::vector< Name > &includeGroups, const std::vector< Name > &excludeGroups)
 
template<typename PointDataGridT , typename DeformerT , typename FilterT = NullFilter>
void movePoints (PointDataGridT &points, DeformerT &deformer, const FilterT &filter=NullFilter(), future::Advect *objectNotInUse=nullptr, bool threaded=true)
 Move points in a PointDataGrid using a custom deformer. More...
 
template<typename PointDataGridT , typename DeformerT , typename FilterT = NullFilter>
void movePoints (PointDataGridT &points, const math::Transform &transform, DeformerT &deformer, const FilterT &filter=NullFilter(), future::Advect *objectNotInUse=nullptr, bool threaded=true)
 Move points in a PointDataGrid using a custom deformer and a new transform. More...
 
template<typename PointDataGridT , typename SourceGridT , typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void pointSample (PointDataGridT &points, const SourceGridT &sourceGrid, const Name &targetAttribute="", const FilterT &filter=NullFilter(), InterrupterT *const interrupter=nullptr)
 Performs closest point sampling from a VDB grid onto a VDB Points attribute. More...
 
template<typename PointDataGridT , typename SourceGridT , typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void boxSample (PointDataGridT &points, const SourceGridT &sourceGrid, const Name &targetAttribute="", const FilterT &filter=NullFilter(), InterrupterT *const interrupter=nullptr)
 Performs tri-linear sampling from a VDB grid onto a VDB Points attribute. More...
 
template<typename PointDataGridT , typename SourceGridT , typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void quadraticSample (PointDataGridT &points, const SourceGridT &sourceGrid, const Name &targetAttribute="", const FilterT &filter=NullFilter(), InterrupterT *const interrupter=nullptr)
 Performs tri-quadratic sampling from a VDB grid onto a VDB Points attribute. More...
 
template<typename PointDataGridT , typename SourceGridT , typename TargetValueT = DummySampleType, typename SamplerT = SampleWithRounding, typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void sampleGrid (size_t order, PointDataGridT &points, const SourceGridT &sourceGrid, const Name &targetAttribute, const FilterT &filter=NullFilter(), const SamplerT &sampler=SampleWithRounding(), InterrupterT *const interrupter=nullptr, const bool threaded=true)
 Performs sampling and conversion from a VDB grid onto a VDB Points attribute. More...
 
template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr uniformPointScatter (const GridT &grid, const Index64 count, const unsigned int seed=0, const float spread=1.0f, InterrupterT *interrupter=nullptr)
 The free functions depend on the following class: More...
 
template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr denseUniformPointScatter (const GridT &grid, const float pointsPerVoxel, const unsigned int seed=0, const float spread=1.0f, InterrupterT *interrupter=nullptr)
 Uniformly scatter a fixed number of points per active voxel. If the pointsPerVoxel value provided is a fractional value, each voxel calculates a delta value of how likely it is to contain an extra point. More...
 
template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr nonUniformPointScatter (const GridT &grid, const float pointsPerVoxel, const unsigned int seed=0, const float spread=1.0f, InterrupterT *interrupter=nullptr)
 Non uniformly scatter points per active voxel. The pointsPerVoxel value is used to weight each grids cell value to compute a fixed number of points for every active voxel. If the computed result is a fractional value, each voxel calculates a delta value of how likely it is to contain an extra point. More...
 

Typedef Documentation

Definition at line 156 of file IndexFilter.h.

Definition at line 50 of file AttributeGroup.h.

Definition at line 157 of file IndexFilter.h.

Point data grid.

Definition at line 220 of file PointDataGrid.h.

Point index tree configured to match the default VDB configurations.

Definition at line 216 of file PointDataGrid.h.

Definition at line 53 of file AttributeArrayString.h.

Function Documentation

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::activeGroupPointCount ( const PointDataTreeT &  tree,
const Name name,
const bool  inCoreOnly = true 
)
inline

Definition at line 276 of file PointCount.h.

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::activePointCount ( const PointDataTreeT &  tree,
const bool  inCoreOnly = true 
)
inline

Definition at line 244 of file PointCount.h.

template<typename PointDataGridT , typename VelGridT , typename AdvectFilterT = NullFilter, typename FilterT = NullFilter>
void openvdb::OPENVDB_VERSION_NAME::points::advectPoints ( PointDataGridT &  points,
const VelGridT &  velocity,
const Index  integrationOrder,
const double  dt,
const Index  timeSteps,
const AdvectFilterT &  advectFilter = NullFilter(),
const FilterT &  filter = NullFilter(),
const bool  cached = true 
)
inline

Advect points in a PointDataGrid through a velocity grid.

Parameters
pointsthe PointDataGrid containing the points to be advected.
velocitya velocity grid to be sampled.
integrationOrderthe integration scheme to use (1 is forward euler, 4 is runge-kutta 4th)
dtdelta time.
timeStepsnumber of advection steps to perform.
advectFilteran optional advection index filter (moves a subset of the points)
filteran optional index filter (deletes a subset of the points)
cachedcaches velocity interpolation for faster performance, disable to use less memory (default is on).

Definition at line 243 of file PointAdvect.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::appendAttribute ( PointDataTreeT &  tree,
const Name name,
const NamePair &  type,
const Index  strideOrTotalSize = 1,
const bool  constantStride = true,
Metadata::Ptr  metaDefaultValue = Metadata::Ptr(),
const bool  hidden = false,
const bool  transient = false 
)
inline

Appends a new attribute to the VDB tree (this method does not require a templated AttributeType)

Parameters
treethe PointDataTree to be appended to.
namename for the new attribute.
typethe type of the attibute.
strideOrTotalSizethe stride of the attribute
constantStrideif false, stride is interpreted as total size of the array
metaDefaultValuemetadata default attribute value
hiddenmark attribute as hidden
transientmark attribute as transient

Definition at line 447 of file PointAttribute.h.

template<typename ValueType , typename CodecType = NullCodec, typename PointDataTreeT = PointDataTree>
void openvdb::OPENVDB_VERSION_NAME::points::appendAttribute ( PointDataTreeT &  tree,
const std::string name,
const ValueType &  uniformValue = point_attribute_internal::Default<ValueType>::value(),
const Index  strideOrTotalSize = 1,
const bool  constantStride = true,
Metadata::Ptr  metaDefaultValue = Metadata::Ptr(),
const bool  hidden = false,
const bool  transient = false 
)
inline

Appends a new attribute to the VDB tree.

Parameters
treethe PointDataTree to be appended to.
namename for the new attribute
uniformValuethe initial value of the attribute
strideOrTotalSizethe stride of the attribute
constantStrideif false, stride is interpreted as total size of the array
metaDefaultValuemetadata default attribute value
hiddenmark attribute as hidden
transientmark attribute as transient

Definition at line 501 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::appendGroup ( PointDataTree &  tree,
const Name group 
)
inline

Appends a new empty group to the VDB tree.

Parameters
treethe PointDataTree to be appended to.
groupname of the new group.

Definition at line 454 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::appendGroups ( PointDataTree &  tree,
const std::vector< Name > &  groups 
)
inline

Appends new empty groups to the VDB tree.

Parameters
treethe PointDataTree to be appended to.
groupsnames of the new groups.

Definition at line 529 of file PointGroup.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::bloscCompressAttribute ( PointDataTreeT &  tree,
const Name name 
)
inline

Apply Blosc compression to one attribute in the VDB tree.

Parameters
treethe PointDataTree.
namename of the attribute to compress.

Definition at line 733 of file PointAttribute.h.

template<typename PointDataGridT , typename SourceGridT , typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void openvdb::OPENVDB_VERSION_NAME::points::boxSample ( PointDataGridT &  points,
const SourceGridT &  sourceGrid,
const Name targetAttribute = "",
const FilterT &  filter = NullFilter(),
InterrupterT *const  interrupter = nullptr 
)
inline

Performs tri-linear sampling from a VDB grid onto a VDB Points attribute.

Parameters
pointsthe PointDataGrid whose points will be sampled on to
sourceGridVDB grid which will be sampled
targetAttributea target attribute on the points which will hold samples. This attribute will be created with the source grid type if it does not exist, and with the source grid name if the name is empty
filteran optional index filter
interrupteran optional interrupter
Note
The target attribute may exist provided it can be cast to the SourceGridT ValueType

Definition at line 540 of file PointSample.h.

template<typename ValueType , typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::collapseAttribute ( PointDataTreeT &  tree,
const Name name,
const ValueType &  uniformValue = point_attribute_internal::Default<ValueType>::value() 
)
inline

Collapse the attribute into a uniform value.

Parameters
treethe PointDataTree in which to collapse the attribute.
namename for the attribute.
uniformValuevalue of the attribute

Definition at line 531 of file PointAttribute.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::compactAttributes ( PointDataTreeT &  tree)
inline

Compact attributes in a VDB tree (if possible).

Parameters
treethe PointDataTree.

Definition at line 715 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::compactGroups ( PointDataTree &  tree)
inline

Compacts existing groups of a VDB Tree to use less memory if possible.

Parameters
treethe PointDataTree to be compacted.

Definition at line 629 of file PointGroup.h.

template<typename PositionWrapper , typename InterrupterT = openvdb::util::NullInterrupter>
float openvdb::OPENVDB_VERSION_NAME::points::computeVoxelSize ( const PositionWrapper &  positions,
const uint32_t  pointsPerVoxel,
const math::Mat4d  transform = math::Mat4d::identity(),
const Index  decimalPlaces = 5,
InterrupterT *const  interrupter = nullptr 
)
inline

@ brief Given a container of world space positions and a target points per voxel, compute a uniform voxel size that would best represent the storage of the points in a grid. This voxel size is typically used for conversion of the points into a PointDataGrid.

Parameters
positionsarray of world space positions
pointsPerVoxelthe target number of points per voxel, must be positive and non-zero
transformvoxel size will be computed using this optional transform if provided
decimalPlacesfor readability, truncate voxel size to this number of decimals
interrupteran optional interrupter
Note
if none or one point provided in positions, the default voxel size of 0.1 will be returned

Definition at line 948 of file PointConversion.h.

template<typename TypedAttribute , typename PointDataTreeT , typename FilterT = NullFilter>
void openvdb::OPENVDB_VERSION_NAME::points::convertPointDataGridAttribute ( TypedAttribute attribute,
const PointDataTreeT &  tree,
const std::vector< Index64 > &  pointOffsets,
const Index64  startOffset,
const unsigned  arrayIndex,
const Index  stride = 1,
const FilterT &  filter = NullFilter(),
const bool  inCoreOnly = false 
)
inline

Convert the attribute from a PointDataGrid.

Parameters
attributethe attribute to be populated.
treethe PointDataTree to be converted.
pointOffsetsa vector of cumulative point offsets for each leaf.
startOffseta value to shift all the point offsets by
arrayIndexthe index in the Descriptor of the array to be converted.
stridethe stride of the attribute
filteran index filter
inCoreOnlytrue if out-of-core leaf nodes are to be ignored

Definition at line 888 of file PointConversion.h.

template<typename TypedAttribute , typename PointDataTreeT >
OPENVDB_DEPRECATED void openvdb::OPENVDB_VERSION_NAME::points::convertPointDataGridAttribute ( TypedAttribute attribute,
const PointDataTreeT &  tree,
const std::vector< Index64 > &  pointOffsets,
const Index64  startOffset,
const unsigned  arrayIndex,
const Index  stride,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups,
const bool  inCoreOnly = false 
)
inline

Definition at line 1143 of file PointConversion.h.

template<typename Group , typename PointDataTreeT , typename FilterT = NullFilter>
void openvdb::OPENVDB_VERSION_NAME::points::convertPointDataGridGroup ( Group &  group,
const PointDataTreeT &  tree,
const std::vector< Index64 > &  pointOffsets,
const Index64  startOffset,
const AttributeSet::Descriptor::GroupIndex  index,
const FilterT &  filter = NullFilter(),
const bool  inCoreOnly = false 
)
inline

Convert the group from a PointDataGrid.

Parameters
groupthe group to be populated.
treethe PointDataTree to be converted.
pointOffsetsa vector of cumulative point offsets for each leaf
startOffseta value to shift all the point offsets by
indexthe group index to be converted.
filteran index filter
inCoreOnlytrue if out-of-core leaf nodes are to be ignored

Definition at line 920 of file PointConversion.h.

template<typename Group , typename PointDataTreeT >
OPENVDB_DEPRECATED void openvdb::OPENVDB_VERSION_NAME::points::convertPointDataGridGroup ( Group &  group,
const PointDataTreeT &  tree,
const std::vector< Index64 > &  pointOffsets,
const Index64  startOffset,
const AttributeSet::Descriptor::GroupIndex  index,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups,
const bool  inCoreOnly = false 
)
inline

Definition at line 1164 of file PointConversion.h.

template<typename PositionAttribute , typename PointDataGridT , typename FilterT = NullFilter>
void openvdb::OPENVDB_VERSION_NAME::points::convertPointDataGridPosition ( PositionAttribute &  positionAttribute,
const PointDataGridT &  grid,
const std::vector< Index64 > &  pointOffsets,
const Index64  startOffset,
const FilterT &  filter = NullFilter(),
const bool  inCoreOnly = false 
)
inline

Convert the position attribute from a Point Data Grid.

Parameters
positionAttributethe position attribute to be populated.
gridthe PointDataGrid to be converted.
pointOffsetsa vector of cumulative point offsets for each leaf
startOffseta value to shift all the point offsets by
filteran index filter
inCoreOnlytrue if out-of-core leaf nodes are to be ignored

Definition at line 854 of file PointConversion.h.

template<typename PositionAttribute , typename PointDataGridT >
OPENVDB_DEPRECATED void openvdb::OPENVDB_VERSION_NAME::points::convertPointDataGridPosition ( PositionAttribute &  positionAttribute,
const PointDataGridT &  grid,
const std::vector< Index64 > &  pointOffsets,
const Index64  startOffset,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups,
const bool  inCoreOnly = false 
)
inline

Definition at line 1124 of file PointConversion.h.

template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type, typename FilterT = NullFilter>
std::enable_if< std::is_same< typename MaskT::ValueType, bool >::value, typename MaskT::Ptr >::type openvdb::OPENVDB_VERSION_NAME::points::convertPointsToMask ( const PointDataGridT &  grid,
const FilterT &  filter = NullFilter(),
bool  threaded = true 
)
inline

Extract a Mask Grid from a Point Data Grid.

Parameters
gridthe PointDataGrid to extract the mask from.
filteran optional index filter
threadedenable or disable threading (threading is enabled by default)
Note
this method is only available for Bool Grids and Mask Grids

Definition at line 390 of file PointMask.h.

template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type, typename FilterT = NullFilter>
std::enable_if< std::is_same< typename MaskT::ValueType, bool >::value, typename MaskT::Ptr >::type openvdb::OPENVDB_VERSION_NAME::points::convertPointsToMask ( const PointDataGridT &  grid,
const openvdb::math::Transform &  transform,
const FilterT &  filter = NullFilter(),
bool  threaded = true 
)
inline

Extract a Mask Grid from a Point Data Grid using a new transform.

Parameters
gridthe PointDataGrid to extract the mask from.
transformtarget transform for the mask.
filteran optional index filter
threadedenable or disable threading (threading is enabled by default)
Note
this method is only available for Bool Grids and Mask Grids

Definition at line 403 of file PointMask.h.

template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type>
OPENVDB_DEPRECATED std::enable_if<std::is_same<typename MaskT::ValueType, bool>::value, typename MaskT::Ptr>::type openvdb::OPENVDB_VERSION_NAME::points::convertPointsToMask ( const PointDataGridT &  grid,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups 
)
inline

Definition at line 430 of file PointMask.h.

template<typename PointDataGridT , typename MaskT = typename PointDataGridT::template ValueConverter<bool>::Type>
OPENVDB_DEPRECATED std::enable_if<std::is_same<typename MaskT::ValueType, bool>::value, typename MaskT::Ptr>::type openvdb::OPENVDB_VERSION_NAME::points::convertPointsToMask ( const PointDataGridT &  grid,
const openvdb::math::Transform &  transform,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups 
)
inline

Definition at line 446 of file PointMask.h.

template<typename CompressionT , typename PointDataGridT , typename PositionArrayT , typename PointIndexGridT >
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::createPointDataGrid ( const PointIndexGridT &  pointIndexGrid,
const PositionArrayT &  positions,
const math::Transform &  xform,
Metadata::Ptr  positionDefaultValue = Metadata::Ptr() 
)
inline

Localises points with position into a PointDataGrid into two stages: allocation of the leaf attribute data and population of the positions.

Parameters
pointIndexGrida PointIndexGrid into the points.
positionslist of world space point positions.
xformworld to index space transform.
positionDefaultValuemetadata default position value
Note
The position data must be supplied in a Point-Partitioner compatible data structure. A convenience PointAttributeVector class is offered.
The position data is populated separately to perform world space to voxel space conversion and apply quantisation.
A PointIndexGrid to the points must be supplied to perform this operation. Typically this is built implicitly by the PointDataGrid constructor.

Definition at line 744 of file PointConversion.h.

template<typename CompressionT , typename PointDataGridT , typename ValueT >
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::createPointDataGrid ( const std::vector< ValueT > &  positions,
const math::Transform &  xform,
Metadata::Ptr  positionDefaultValue = Metadata::Ptr() 
)
inline

Convenience method to create a PointDataGrid from a std::vector of point positions.

Parameters
positionslist of world space point positions.
xformworld to index space transform.
positionDefaultValuemetadata default position value
Note
This method implicitly wraps the std::vector for a Point-Partitioner compatible data structure and creates the required PointIndexGrid to the points.

Definition at line 801 of file PointConversion.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::deleteFromGroup ( PointDataTreeT &  pointTree,
const std::string group,
bool  invert = false,
bool  drop = true 
)
inline

Delete points that are members of a group.

This method will delete points which are members of the supplied group and will optionally drop the group from the tree. An invert flag can be used to delete points that belong to none of the groups.

Parameters
pointTreethe point tree with the group to delete
groupthe name of the group to delete
invertif enabled, points not belonging to any of the groups will be deleted
dropif enabled and invert is disabled, the group will be dropped from the tree
Note
If the invert flag is true, the group will not be dropped after deleting points regardless of the value of the drop parameter.

Definition at line 247 of file PointDelete.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::deleteFromGroups ( PointDataTreeT &  pointTree,
const std::vector< std::string > &  groups,
bool  invert = false,
bool  drop = true 
)
inline

Delete points that are members of specific groups.

This method will delete points which are members of any of the supplied groups and will optionally drop the groups from the tree. An invert flag can be used to delete points that belong to none of the groups.

Parameters
pointTreethe point tree
groupsthe groups from which to delete points
invertif enabled, points not belonging to any of the groups will be deleted
dropif enabled and invert is disabled, the groups will be dropped from the tree
Note
If the invert flag is true, none of the groups will be dropped after deleting points regardless of the value of the drop parameter.

Definition at line 198 of file PointDelete.h.

void openvdb::OPENVDB_VERSION_NAME::points::deleteMissingPointGroups ( std::vector< std::string > &  groups,
const AttributeSet::Descriptor &  descriptor 
)
inline

Delete any group that is not present in the Descriptor.

Parameters
groupsthe vector of group names.
descriptorthe descriptor that holds the group map.

Definition at line 440 of file PointGroup.h.

template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::denseUniformPointScatter ( const GridT &  grid,
const float  pointsPerVoxel,
const unsigned int  seed = 0,
const float  spread = 1.0f,
InterrupterT *  interrupter = nullptr 
)
inline

Uniformly scatter a fixed number of points per active voxel. If the pointsPerVoxel value provided is a fractional value, each voxel calculates a delta value of how likely it is to contain an extra point.

Parameters
gridA source grid. The resulting PointDataGrid will copy this grids transform and scatter in its active voxelized topology.
pointsPerVoxelThe number of points to scatter per voxel
seedA seed for the RandGenT
spreadThe spread of points as a scale from each voxels center. A value of 1.0f indicates points can be placed anywhere within the voxel, where as a value of 0.0f will force all points to be created exactly at the centers of each voxel.
interrupterAn optional interrupter
Note
returns the scattered PointDataGrid

Definition at line 421 of file PointScatter.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttribute ( PointDataTreeT &  tree,
const size_t &  index 
)
inline

Drop one attribute from the VDB tree (convenience method).

Parameters
treethe PointDataTree to be dropped from.
indexindex of the attribute to drop.

Definition at line 635 of file PointAttribute.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttribute ( PointDataTreeT &  tree,
const Name name 
)
inline

Drop one attribute from the VDB tree (convenience method).

Parameters
treethe PointDataTree to be dropped from.
namename of the attribute to drop.

Definition at line 644 of file PointAttribute.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttributes ( PointDataTreeT &  tree,
const std::vector< size_t > &  indices 
)
inline

Drops attributes from the VDB tree.

Parameters
treethe PointDataTree to be dropped from.
indicesindices of the attributes to drop.

Definition at line 567 of file PointAttribute.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttributes ( PointDataTreeT &  tree,
const std::vector< Name > &  names 
)
inline

Drops attributes from the VDB tree.

Parameters
treethe PointDataTree to be dropped from.
namesnames of the attributes to drop.

Definition at line 603 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropGroup ( PointDataTree &  tree,
const Name group,
const bool  compact = true 
)
inline

Drops an existing group from the VDB tree.

Parameters
treethe PointDataTree to be dropped from.
groupname of the group.
compactcompact attributes if possible to reduce memory - if dropping more than one group, compacting once at the end will be faster

Definition at line 545 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropGroups ( PointDataTree &  tree,
const std::vector< Name > &  groups 
)
inline

Drops existing groups from the VDB tree, the tree is compacted after dropping.

Parameters
treethe PointDataTree to be dropped from.
groupsnames of the groups.

Definition at line 578 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropGroups ( PointDataTree &  tree)
inline

Drops all existing groups from the VDB tree, the tree is compacted after dropping.

Parameters
treethe PointDataTree to be dropped from.

Definition at line 595 of file PointGroup.h.

template<typename FloatT , typename IntegerT >
FloatT openvdb::OPENVDB_VERSION_NAME::points::fixedPointToFloatingPoint ( const IntegerT  s)
inline

Definition at line 87 of file AttributeArray.h.

template<typename FloatVectorT , typename IntegerT >
FloatVectorT openvdb::OPENVDB_VERSION_NAME::points::fixedPointToFloatingPoint ( const math::Vec3< IntegerT > &  v)
inline

Definition at line 105 of file AttributeArray.h.

template<typename IntegerT , typename FloatT >
IntegerT openvdb::OPENVDB_VERSION_NAME::points::floatingPointToFixedPoint ( const FloatT  s)
inline

Definition at line 76 of file AttributeArray.h.

template<typename IntegerVectorT , typename FloatT >
IntegerVectorT openvdb::OPENVDB_VERSION_NAME::points::floatingPointToFixedPoint ( const math::Vec3< FloatT > &  v)
inline

Definition at line 95 of file AttributeArray.h.

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::getPointOffsets ( std::vector< Index64 > &  offsets,
const PointDataTreeT &  tree,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups,
const bool  inCoreOnly = false 
)
inline

Definition at line 304 of file PointCount.h.

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::groupPointCount ( const PointDataTreeT &  tree,
const Name name,
const bool  inCoreOnly = true 
)
inline

Definition at line 262 of file PointCount.h.

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::inactiveGroupPointCount ( const PointDataTreeT &  tree,
const Name name,
const bool  inCoreOnly = true 
)
inline

Definition at line 290 of file PointCount.h.

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::inactivePointCount ( const PointDataTreeT &  tree,
const bool  inCoreOnly = true 
)
inline

Definition at line 253 of file PointCount.h.

bool openvdb::OPENVDB_VERSION_NAME::points::isGroup ( const AttributeArray &  array)
inline

Definition at line 93 of file AttributeGroup.h.

bool openvdb::OPENVDB_VERSION_NAME::points::isString ( const AttributeArray &  array)
inline

Definition at line 125 of file AttributeArrayString.h.

template<typename IterT >
Index64 openvdb::OPENVDB_VERSION_NAME::points::iterCount ( const IterT &  iter)
inline

Count up the number of times the iterator can iterate.

Parameters
iterthe iterator.
Note
counting by iteration only performed where a dynamic filter is in use,

Definition at line 341 of file IndexIterator.h.

template<typename PointDataTreeT >
AttributeSet::Descriptor::Ptr openvdb::OPENVDB_VERSION_NAME::points::makeDescriptorUnique ( PointDataTreeT &  tree)
inline

Deep copy the descriptor across all leaf nodes.

Parameters
treethe PointDataTree.
Returns
the new descriptor.
Note
This method will fail if the Descriptors in the tree are not all identical.

Definition at line 1604 of file PointDataGrid.h.

template<typename PointDataGridT , typename DeformerT , typename FilterT = NullFilter>
void openvdb::OPENVDB_VERSION_NAME::points::movePoints ( PointDataGridT &  points,
DeformerT &  deformer,
const FilterT &  filter = NullFilter(),
future::Advect *  objectNotInUse = nullptr,
bool  threaded = true 
)
inline

Move points in a PointDataGrid using a custom deformer.

Parameters
pointsthe PointDataGrid containing the points to be moved.
deformera custom deformer that defines how to move the points.
filteran optional index filter
objectNotInUsefor future use, this object is currently ignored
threadedenable or disable threading (threading is enabled by default)

Definition at line 819 of file PointMove.h.

template<typename PointDataGridT , typename DeformerT , typename FilterT = NullFilter>
void openvdb::OPENVDB_VERSION_NAME::points::movePoints ( PointDataGridT &  points,
const math::Transform &  transform,
DeformerT &  deformer,
const FilterT &  filter = NullFilter(),
future::Advect *  objectNotInUse = nullptr,
bool  threaded = true 
)
inline

Move points in a PointDataGrid using a custom deformer and a new transform.

Parameters
pointsthe PointDataGrid containing the points to be moved.
transformtarget transform to use for the resulting points.
deformera custom deformer that defines how to move the points.
filteran optional index filter
objectNotInUsefor future use, this object is currently ignored
threadedenable or disable threading (threading is enabled by default)

Definition at line 676 of file PointMove.h.

template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::nonUniformPointScatter ( const GridT &  grid,
const float  pointsPerVoxel,
const unsigned int  seed = 0,
const float  spread = 1.0f,
InterrupterT *  interrupter = nullptr 
)
inline

Non uniformly scatter points per active voxel. The pointsPerVoxel value is used to weight each grids cell value to compute a fixed number of points for every active voxel. If the computed result is a fractional value, each voxel calculates a delta value of how likely it is to contain an extra point.

Parameters
gridA source grid. The resulting PointDataGrid will copy this grids transform, voxelized topology and use its values to compute a target points per voxel. The grids ValueType must be convertible to a scalar value. Only active and larger than zero values will contain points.
pointsPerVoxelThe number of points to scatter per voxel
seedA seed for the RandGenT
spreadThe spread of points as a scale from each voxels center. A value of 1.0f indicates points can be placed anywhere within the voxel, where as a value of 0.0f will force all points to be created exactly at the centers of each voxel.
interrupterAn optional interrupter
Note
returns the scattered PointDataGrid

Definition at line 503 of file PointScatter.h.

template<typename PointDataTreeT , typename FilterT = NullFilter>
Index64 openvdb::OPENVDB_VERSION_NAME::points::pointCount ( const PointDataTreeT &  tree,
const FilterT &  filter = NullFilter(),
const bool  inCoreOnly = false,
const bool  threaded = true 
)
inline

Count the total number of points in a PointDataTree.

Parameters
treethe PointDataTree in which to count the points
filteran optional index filter
inCoreOnlyif true, points in out-of-core leaf nodes are not counted
threadedenable or disable threading (threading is enabled by default)

Definition at line 115 of file PointCount.h.

template<typename PointDataTreeT >
OPENVDB_DEPRECATED Index64 openvdb::OPENVDB_VERSION_NAME::points::pointCount ( const PointDataTreeT &  tree,
const bool  inCoreOnly 
)
inline

Definition at line 235 of file PointCount.h.

template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type, typename FilterT = NullFilter>
GridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::pointCountGrid ( const PointDataGridT &  grid,
const FilterT &  filter = NullFilter() 
)
inline

Generate a new grid with voxel values to store the number of points per voxel.

Parameters
gridthe PointDataGrid to use to compute the count grid
filteran optional index filter
Note
The return type of the grid must be an integer or floating-point scalar grid.

Definition at line 191 of file PointCount.h.

template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type, typename FilterT = NullFilter>
GridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::pointCountGrid ( const PointDataGridT &  grid,
const openvdb::math::Transform &  transform,
const FilterT &  filter = NullFilter() 
)
inline

Generate a new grid that uses the supplied transform with voxel values to store the number of points per voxel.

Parameters
gridthe PointDataGrid to use to compute the count grid
transformthe transform to use to compute the count grid
filteran optional index filter
Note
The return type of the grid must be an integer or floating-point scalar grid.

Definition at line 209 of file PointCount.h.

template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type>
OPENVDB_DEPRECATED GridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::pointCountGrid ( const PointDataGridT &  grid,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups 
)
inline

Definition at line 318 of file PointCount.h.

template<typename PointDataGridT , typename GridT = typename PointDataGridT::template ValueConverter<Int32>::Type>
OPENVDB_DEPRECATED GridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::pointCountGrid ( const PointDataGridT &  grid,
const openvdb::math::Transform &  transform,
const std::vector< Name > &  includeGroups,
const std::vector< Name > &  excludeGroups 
)
inline

Definition at line 333 of file PointCount.h.

template<typename PointDataTreeT , typename FilterT = NullFilter>
Index64 openvdb::OPENVDB_VERSION_NAME::points::pointOffsets ( std::vector< Index64 > &  pointOffsets,
const PointDataTreeT &  tree,
const FilterT &  filter = NullFilter(),
const bool  inCoreOnly = false,
const bool  threaded = true 
)
inline

Populate an array of cumulative point offsets per leaf node.

Parameters
pointOffsetsarray of offsets to be populated
treethe PointDataTree from which to populate the offsets
filteran optional index filter
inCoreOnlyif true, points in out-of-core leaf nodes are ignored
threadedenable or disable threading (threading is enabled by default)
Returns
The final cumulative point offset.

Definition at line 149 of file PointCount.h.

template<typename PointDataGridT , typename SourceGridT , typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void openvdb::OPENVDB_VERSION_NAME::points::pointSample ( PointDataGridT &  points,
const SourceGridT &  sourceGrid,
const Name targetAttribute = "",
const FilterT &  filter = NullFilter(),
InterrupterT *const  interrupter = nullptr 
)
inline

Performs closest point sampling from a VDB grid onto a VDB Points attribute.

Parameters
pointsthe PointDataGrid whose points will be sampled on to
sourceGridVDB grid which will be sampled
targetAttributea target attribute on the points which will hold samples. This attribute will be created with the source grid type if it does not exist, and with the source grid name if the name is empty
filteran optional index filter
interrupteran optional interrupter
Note
The target attribute may exist provided it can be cast to the SourceGridT ValueType

Definition at line 529 of file PointSample.h.

template<typename PointDataTreeT , typename PointIndexTreeT , typename PointArrayT >
void openvdb::OPENVDB_VERSION_NAME::points::populateAttribute ( PointDataTreeT &  tree,
const PointIndexTreeT &  pointIndexTree,
const openvdb::Name &  attributeName,
const PointArrayT &  data,
const Index  stride = 1,
const bool  insertMetadata = true 
)
inline

Stores point attribute data in an existing PointDataGrid attribute.

Parameters
treethe PointDataGrid to be populated.
pointIndexTreea PointIndexTree into the points.
attributeNamethe name of the VDB Points attribute to be populated.
dataa wrapper to the attribute data.
stridethe stride of the attribute
insertMetadatatrue if strings are to be automatically inserted as metadata.
Note
A PointIndexGrid to the points must be supplied to perform this operation. This is required to ensure the same point index ordering.

Definition at line 817 of file PointConversion.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::prefetch ( PointDataTreeT &  tree,
bool  position = true,
bool  otherAttributes = true 
)
inline

Sequentially pre-fetch all delayed-load voxel and attribute data from disk in order to accelerate subsequent random access.

Parameters
treethe PointDataTree.
positionif enabled, prefetch the position attribute (default is on)
otherAttributesif enabled, prefetch all other attributes (default is on)

Definition at line 1634 of file PointDataGrid.h.

template<typename PointDataGridT , typename SourceGridT , typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void openvdb::OPENVDB_VERSION_NAME::points::quadraticSample ( PointDataGridT &  points,
const SourceGridT &  sourceGrid,
const Name targetAttribute = "",
const FilterT &  filter = NullFilter(),
InterrupterT *const  interrupter = nullptr 
)
inline

Performs tri-quadratic sampling from a VDB grid onto a VDB Points attribute.

Parameters
pointsthe PointDataGrid whose points will be sampled on to
sourceGridVDB grid which will be sampled
targetAttributea target attribute on the points which will hold samples. This attribute will be created with the source grid type if it does not exist, and with the source grid name if the name is empty
filteran optional index filter
interrupteran optional interrupter
Note
The target attribute may exist provided it can be cast to the SourceGridT ValueType

Definition at line 551 of file PointSample.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::renameAttribute ( PointDataTreeT &  tree,
const Name oldName,
const Name newName 
)
inline

Rename an attribute in a VDB tree.

Parameters
treethe PointDataTree.
oldNamethe old attribute name to rename from.
newNamethe new attribute name to rename to.
Note
newName must not already exist and must not be a group attribute.

Definition at line 703 of file PointAttribute.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::renameAttributes ( PointDataTreeT &  tree,
const std::vector< Name > &  oldNames,
const std::vector< Name > &  newNames 
)
inline

Rename attributes in a VDB tree.

Parameters
treethe PointDataTree.
oldNamesa list of old attribute names to rename from.
newNamesa list of new attribute names to rename to.
Note
Number of oldNames must match the number of newNames.
Duplicate names and renaming group attributes are not allowed.

Definition at line 656 of file PointAttribute.h.

template<typename PointDataGridT , typename SourceGridT , typename TargetValueT = DummySampleType, typename SamplerT = SampleWithRounding, typename FilterT = NullFilter, typename InterrupterT = util::NullInterrupter>
void openvdb::OPENVDB_VERSION_NAME::points::sampleGrid ( size_t  order,
PointDataGridT &  points,
const SourceGridT &  sourceGrid,
const Name targetAttribute,
const FilterT &  filter = NullFilter(),
const SamplerT &  sampler = SampleWithRounding(),
InterrupterT *const  interrupter = nullptr,
const bool  threaded = true 
)
inline

Performs sampling and conversion from a VDB grid onto a VDB Points attribute.

Parameters
orderthe sampling order - 0 = closest-point, 1 = trilinear, 2 = triquadratic
pointsthe PointDataGrid whose points will be sampled on to
sourceGridVDB grid which will be sampled
targetAttributea target attribute on the points which will hold samples. This attribute will be created with the source grid type if it does not exist, and with the source grid name if the name is empty
filteran optional index filter
samplerhandles sampling and conversion into the target attribute type, which by default this uses the SampleWithRounding struct.
interrupteran optional interrupter
threadedenable or disable threading (threading is enabled by default)
Note
The target attribute may exist provided it can be cast to the SourceGridT ValueType

Definition at line 433 of file PointSample.h.

template<typename PointDataTree , typename PointIndexTree >
void openvdb::OPENVDB_VERSION_NAME::points::setGroup ( PointDataTree &  tree,
const PointIndexTree &  indexTree,
const std::vector< short > &  membership,
const Name group,
const bool  remove = false 
)
inline

Sets group membership from a PointIndexTree-ordered vector.

Parameters
treethe PointDataTree.
indexTreethe PointIndexTree.
membership1 if the point is in the group, 0 otherwise.
groupthe name of the group.
removeif true also perform removal of points from the group.
Note
vector<bool> is not thread-safe on concurrent write, so use vector<short> instead

Definition at line 691 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::setGroup ( PointDataTree &  tree,
const Name group,
const bool  member = true 
)
inline

Sets membership for the specified group for all points (on/off).

Parameters
treethe PointDataTree.
groupthe name of the group.
membertrue / false for membership of the group.

Definition at line 739 of file PointGroup.h.

template<typename PointDataTree , typename FilterT >
void openvdb::OPENVDB_VERSION_NAME::points::setGroupByFilter ( PointDataTree &  tree,
const Name group,
const FilterT &  filter 
)
inline

Sets group membership based on a provided filter.

Parameters
treethe PointDataTree.
groupthe name of the group.
filterfilter data that is used to create a per-leaf filter

Definition at line 773 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::setGroupByRandomPercentage ( PointDataTree &  tree,
const Name group,
const float  percentage = 10.0f,
const unsigned int  seed = 0 
)
inline

Definition at line 825 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::setGroupByRandomTarget ( PointDataTree &  tree,
const Name group,
const Index64  targetPoints,
const unsigned int  seed = 0 
)
inline

Definition at line 808 of file PointGroup.h.

template<typename PointDataTreeT >
void openvdb::OPENVDB_VERSION_NAME::points::setStreamingMode ( PointDataTreeT &  tree,
bool  on = true 
)
inline

Toggle the streaming mode on all attributes in the tree to collapse the attributes after deconstructing a bound AttributeHandle to each array. This results in better memory efficiency when the data is streamed into another data structure (typically for rendering).

Parameters
treethe PointDataTree.
ontrue to enable streaming
Note
Multiple threads cannot safely access the same AttributeArray when using streaming.

Definition at line 1621 of file PointDataGrid.h.

template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::uniformPointScatter ( const GridT &  grid,
const Index64  count,
const unsigned int  seed = 0,
const float  spread = 1.0f,
InterrupterT *  interrupter = nullptr 
)
inline

The free functions depend on the following class:

The InterrupterT template argument below refers to any class with the following interface:

class Interrupter {
...
public:
void start(const char* name = nullptr) // called when computations begin
void end() // called when computations end
bool wasInterrupted(int percent=-1) // return true to break computation
};
Note
If no template argument is provided for this InterrupterT the util::NullInterrupter is used which implies that all interrupter calls are no-ops (i.e. incurs no computational overhead). Uniformly scatter a total amount of points in active regions
Parameters
gridA source grid. The resulting PointDataGrid will copy this grids transform and scatter in its active voxelized topology.
countThe total number of points to scatter
seedA seed for the RandGenT
spreadThe spread of points as a scale from each voxels center. A value of 1.0f indicates points can be placed anywhere within the voxel, where as a value of 0.0f will force all points to be created exactly at the centers of each voxel.
interrupterAn optional interrupter
Note
returns the scattered PointDataGrid

Get the prefixed voxel counts for each leaf node with an additional value to represent the end voxel count. See also LeafManager::getPrefixSum()

Get the prefixed voxel counts for each leaf node with an additional value to represent the end voxel count. See also LeafManager::getPrefixSum()

Definition at line 249 of file PointScatter.h.