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

Namespaces

 attribute_traits
 
 index_filter_internal
 
 point_attribute_internal
 
 point_conversion_internal
 
 point_count_internal
 
 point_group_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  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
 

Typedefs

using StringIndexType = uint32_t
 
using StringAttributeArray = TypedAttributeArray< StringIndexType, StringCodec< false >>
 
using GroupType = uint8_t
 
using GroupAttributeArray = TypedAttributeArray< GroupType, GroupCodec >
 
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 PointDataTree >
void appendAttribute (PointDataTree &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 , typename PointDataTree >
void appendAttribute (PointDataTree &tree, const std::string &name, const ValueType &uniformValue=point_attribute_internal::defaultValue< ValueType >(), 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 PointDataTree >
void appendAttribute (PointDataTree &tree, const std::string &name, const ValueType &uniformValue=point_attribute_internal::defaultValue< ValueType >(), 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 PointDataTree >
void collapseAttribute (PointDataTree &tree, const Name &name, const ValueType &uniformValue=point_attribute_internal::defaultValue< ValueType >())
 Collapse the attribute into a uniform value. More...
 
template<typename PointDataTree >
void dropAttributes (PointDataTree &tree, const std::vector< size_t > &indices)
 Drops attributes from the VDB tree. More...
 
template<typename PointDataTree >
void dropAttributes (PointDataTree &tree, const std::vector< Name > &names)
 Drops attributes from the VDB tree. More...
 
template<typename PointDataTree >
void dropAttribute (PointDataTree &tree, const size_t &index)
 Drop one attribute from the VDB tree (convenience method). More...
 
template<typename PointDataTree >
void dropAttribute (PointDataTree &tree, const Name &name)
 Drop one attribute from the VDB tree (convenience method). More...
 
template<typename PointDataTree >
void renameAttributes (PointDataTree &tree, const std::vector< Name > &oldNames, const std::vector< Name > &newNames)
 Rename attributes in a VDB tree. More...
 
template<typename PointDataTree >
void renameAttribute (PointDataTree &tree, const Name &oldName, const Name &newName)
 Rename an attribute in a VDB tree. More...
 
template<typename PointDataTree >
void compactAttributes (PointDataTree &tree)
 Compact attributes in a VDB tree (if possible). More...
 
template<typename PointDataTree >
void bloscCompressAttribute (PointDataTree &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 >
void convertPointDataGridPosition (PositionAttribute &positionAttribute, const PointDataGridT &grid, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const std::vector< Name > &includeGroups=std::vector< Name >(), const std::vector< Name > &excludeGroups=std::vector< Name >(), const bool inCoreOnly=false)
 Convert the position attribute from a Point Data Grid. More...
 
template<typename TypedAttribute , typename PointDataTreeT >
void convertPointDataGridAttribute (TypedAttribute &attribute, const PointDataTreeT &tree, const std::vector< Index64 > &pointOffsets, const Index64 startOffset, const unsigned arrayIndex, const Index stride=1, const std::vector< Name > &includeGroups=std::vector< Name >(), const std::vector< Name > &excludeGroups=std::vector< Name >(), const bool inCoreOnly=false)
 Convert the attribute from a PointDataGrid. More...
 
template<typename Group , typename PointDataTreeT >
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=std::vector< Name >(), const std::vector< Name > &excludeGroups=std::vector< Name >(), 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 PointDataTreeT >
Index64 pointCount (const PointDataTreeT &tree, const bool inCoreOnly=false)
 Total points in the PointDataTree. More...
 
template<typename PointDataTreeT >
Index64 activePointCount (const PointDataTreeT &tree, const bool inCoreOnly=false)
 Total active points in the PointDataTree. More...
 
template<typename PointDataTreeT >
Index64 inactivePointCount (const PointDataTreeT &tree, const bool inCoreOnly=false)
 Total inactive points in the PointDataTree. More...
 
template<typename PointDataTreeT >
Index64 getPointOffsets (std::vector< Index64 > &pointOffsets, const PointDataTreeT &tree, const std::vector< Name > &includeGroups=std::vector< Name >(), const std::vector< Name > &excludeGroups=std::vector< Name >(), const bool inCoreOnly=false)
 Populate an array of cumulative point offsets per leaf node. More...
 
template<typename PointDataTreeT >
Index64 groupPointCount (const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=false)
 Total points in the group in the PointDataTree. More...
 
template<typename PointDataTreeT >
Index64 activeGroupPointCount (const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=false)
 Total active points in the group in the PointDataTree. More...
 
template<typename PointDataTreeT >
Index64 inactiveGroupPointCount (const PointDataTreeT &tree, const Name &name, const bool inCoreOnly=false)
 Total inactive points in the group in the PointDataTree. More...
 
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...
 
void initialize ()
 Global registration of point data-related types. More...
 
void uninitialize ()
 Global deregistration of point data-related types. 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)
 

Typedef Documentation

Definition at line 49 of file AttributeGroup.h.

Point data grid.

Definition at line 211 of file PointDataGrid.h.

Point index tree configured to match the default VDB configurations.

Definition at line 207 of file PointDataGrid.h.

Definition at line 53 of file AttributeArrayString.h.

Function Documentation

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

Total active points in the group in the PointDataTree.

Parameters
treePointDataTree.
namegroup name.
inCoreOnlyif true, points in out-of-core leaf nodes are not counted

Definition at line 245 of file PointCount.h.

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

Total active points in the PointDataTree.

Parameters
treePointDataTree.
inCoreOnlyif true, points in out-of-core leaf nodes are not counted

Definition at line 211 of file PointCount.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::appendAttribute ( PointDataTree &  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 463 of file PointAttribute.h.

template<typename ValueType , typename CodecType , typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::appendAttribute ( PointDataTree &  tree,
const std::string name,
const ValueType &  uniformValue = point_attribute_internal::defaultValue<ValueType>(),
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 517 of file PointAttribute.h.

template<typename ValueType , typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::appendAttribute ( PointDataTree &  tree,
const std::string name,
const ValueType &  uniformValue = point_attribute_internal::defaultValue<ValueType>(),
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 547 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 448 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 513 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::bloscCompressAttribute ( PointDataTree &  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 767 of file PointAttribute.h.

template<typename ValueType , typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::collapseAttribute ( PointDataTree &  tree,
const Name name,
const ValueType &  uniformValue = point_attribute_internal::defaultValue<ValueType>() 
)
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 568 of file PointAttribute.h.

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

Compact attributes in a VDB tree (if possible).

Parameters
treethe PointDataTree.

Definition at line 750 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 613 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 1027 of file PointConversion.h.

template<typename TypedAttribute , typename PointDataTreeT >
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 std::vector< Name > &  includeGroups = std::vector<Name>(),
const std::vector< Name > &  excludeGroups = std::vector<Name>(),
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
includeGroupsa vector of VDB Points groups to be included (default is all)
excludeGroupsa vector of VDB Points groups to be excluded (default is none)
inCoreOnlytrue if out-of-core leaf nodes are to be ignored

Definition at line 942 of file PointConversion.h.

template<typename Group , typename PointDataTreeT >
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 = std::vector<Name>(),
const std::vector< Name > &  excludeGroups = std::vector<Name>(),
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.
includeGroupsa vector of VDB Points groups to be included (default is all)
excludeGroupsa vector of VDB Points groups to be excluded (default is none)
inCoreOnlytrue if out-of-core leaf nodes are to be ignored

Definition at line 986 of file PointConversion.h.

template<typename PositionAttribute , typename PointDataGridT >
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 = std::vector<Name>(),
const std::vector< Name > &  excludeGroups = std::vector<Name>(),
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
includeGroupsa vector of VDB Points groups to be included (default is all)
excludeGroupsa vector of VDB Points groups to be excluded (default is none)
inCoreOnlytrue if out-of-core leaf nodes are to be ignored

Definition at line 896 of file PointConversion.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 786 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 843 of file PointConversion.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 434 of file PointGroup.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttribute ( PointDataTree &  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 670 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttribute ( PointDataTree &  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 679 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttributes ( PointDataTree &  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 604 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::dropAttributes ( PointDataTree &  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 638 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 529 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 562 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 579 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 >
Index64 openvdb::OPENVDB_VERSION_NAME::points::getPointOffsets ( std::vector< Index64 > &  pointOffsets,
const PointDataTreeT &  tree,
const std::vector< Name > &  includeGroups = std::vector<Name>(),
const std::vector< Name > &  excludeGroups = std::vector<Name>(),
const bool  inCoreOnly = false 
)

Populate an array of cumulative point offsets per leaf node.

Parameters
pointOffsetsarray of offsets to be populated.
treePointDataTree from which to populate the offsets.
includeGroupsthe group of names to include.
excludeGroupsthe group of names to exclude.
inCoreOnlyif true, points in out-of-core leaf nodes are ignored
Note
returns the final cumulative point offset.

Definition at line 261 of file PointCount.h.

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

Total points in the group in the PointDataTree.

Parameters
treePointDataTree.
namegroup name.
inCoreOnlyif true, points in out-of-core leaf nodes are not counted

Definition at line 237 of file PointCount.h.

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

Total inactive points in the group in the PointDataTree.

Parameters
treePointDataTree.
namegroup name.
inCoreOnlyif true, points in out-of-core leaf nodes are not counted

Definition at line 253 of file PointCount.h.

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

Total inactive points in the PointDataTree.

Parameters
treePointDataTree.
inCoreOnlyif true, points in out-of-core leaf nodes are not counted

Definition at line 224 of file PointCount.h.

void openvdb::OPENVDB_VERSION_NAME::points::initialize ( )
inline

Global registration of point data-related types.

Global registration of point data-related types.

Definition at line 316 of file logging.h.

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

Definition at line 92 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 313 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 1550 of file PointDataGrid.h.

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

Total points in the PointDataTree.

Parameters
treePointDataTree.
inCoreOnlyif true, points in out-of-core leaf nodes are not counted

Definition at line 198 of file PointCount.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 859 of file PointConversion.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::renameAttribute ( PointDataTree &  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 738 of file PointAttribute.h.

template<typename PointDataTree >
void openvdb::OPENVDB_VERSION_NAME::points::renameAttributes ( PointDataTree &  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 691 of file PointAttribute.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 673 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 720 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 753 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 803 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 786 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 1567 of file PointDataGrid.h.

void openvdb::OPENVDB_VERSION_NAME::points::uninitialize ( )

Global deregistration of point data-related types.