HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PointConversion.h File Reference

Convert points and attributes to and from VDB Point Data grids. More...

#include <openvdb/math/Transform.h>
#include <openvdb/tools/PointIndexGrid.h>
#include <openvdb/tools/PointsToMask.h>
#include <openvdb/util/NullInterrupter.h>
#include "AttributeArrayString.h"
#include "AttributeSet.h"
#include "IndexFilter.h"
#include "PointAttribute.h"
#include "PointDataGrid.h"
#include "PointGroup.h"
#include <tbb/parallel_reduce.h>
#include <type_traits>
+ Include dependency graph for PointConversion.h:

Go to the source code of this file.

Classes

class  openvdb::OPENVDB_VERSION_NAME::points::PointAttributeVector< ValueType >
 Point-partitioner compatible STL vector attribute wrapper for convenience. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::ConversionTraits< T >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::ConversionTraits< openvdb::Name >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::InitialiseAttributesOp< PointDataTreeType, PointIndexTreeType >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::PopulatePositionAttributeOp< PointDataTreeType, PointIndexTreeType, PositionListType >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::PopulateAttributeOp< PointDataTreeType, PointIndexTreeType, AttributeListType >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::ConvertPointDataGridPositionOp< PointDataTreeType, Attribute >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::ConvertPointDataGridAttributeOp< PointDataTreeType, Attribute >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::ConvertPointDataGridGroupOp< PointDataTreeType, Group >
 
struct  openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal::CalculatePositionBounds< PositionArrayT >
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::points
 
 openvdb::OPENVDB_VERSION_NAME::points::point_conversion_internal
 

Functions

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())
 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 openvdb::OPENVDB_VERSION_NAME::points::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 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)
 Stores point attribute data in an existing PointDataGrid attribute. More...
 
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)
 Convert the position attribute from a Point Data Grid. More...
 
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)
 Convert the attribute from a PointDataGrid. More...
 
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)
 Convert the group from a PointDataGrid. More...
 
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)
 

Detailed Description

Convert points and attributes to and from VDB Point Data grids.

Author
Dan Bailey, Nick Avramoussis

Definition in file PointConversion.h.