HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim > Class Template Reference

#include <PointPartitioner.h>

Classes

class  IndexIterator
 

Public Types

enum  { LOG2DIM = BucketLog2Dim }
 
using Ptr = SharedPtr< PointPartitioner >
 
using ConstPtr = SharedPtr< const PointPartitioner >
 
using IndexType = PointIndexType
 
using VoxelOffsetType = typename std::conditional<(bits< 16), int16_t, typename std::conditional<(bits< 32), int32_t, int64_t >::type >::type
 
using VoxelOffsetArray = std::unique_ptr< VoxelOffsetType[]>
 

Public Member Functions

 PointPartitioner ()
 
template<typename PointArray >
void construct (const PointArray &points, const math::Transform &xform, bool voxelOrder=false, bool recordVoxelOffsets=false, bool cellCenteredTransform=true)
 Partitions point indices into BucketLog2Dim aligned buckets. More...
 
size_t size () const
 Returns the number of buckets. More...
 
bool empty () const
 true if the container size is 0, false otherwise. More...
 
void clear ()
 Removes all data and frees up memory. More...
 
void swap (PointPartitioner &)
 Exchanges the content of the container by another. More...
 
IndexIterator indices (size_t n) const
 Returns the point indices for bucket n. More...
 
CoordBBox getBBox (size_t n) const
 Returns the coordinate-aligned bounding box for bucket n. More...
 
const Coord & origin (size_t n) const
 Returns the origin coordinate for bucket n. More...
 
const VoxelOffsetArrayvoxelOffsets () const
 Returns a list of LeafNode voxel offsets for the points. More...
 
bool usingCellCenteredTransform () const
 Returns true if this point partitioning was constructed using a cell-centered transform. More...
 
template<typename PointArray >
PointPartitioner
< PointIndexType,
BucketLog2Dim >::Ptr 
create (const PointArray &points, const math::Transform &xform, bool voxelOrder, bool recordVoxelOffsets, bool cellCenteredTransform)
 

Static Public Member Functions

template<typename PointArray >
static Ptr create (const PointArray &points, const math::Transform &xform, bool voxelOrder=false, bool recordVoxelOffsets=false, bool cellCenteredTransform=true)
 Partitions point indices into BucketLog2Dim aligned buckets. More...
 

Static Public Attributes

static constexpr Index bits = 1 + (3 * BucketLog2Dim)
 

Detailed Description

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
class openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >

Definition at line 76 of file PointPartitioner.h.

Member Typedef Documentation

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
using openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::ConstPtr = SharedPtr<const PointPartitioner>

Definition at line 82 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
using openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::IndexType = PointIndexType

Definition at line 84 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
using openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::Ptr = SharedPtr<PointPartitioner>

Definition at line 81 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
using openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::VoxelOffsetArray = std::unique_ptr<VoxelOffsetType[]>

Definition at line 91 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
using openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::VoxelOffsetType = typename std::conditional<(bits < 16), int16_t, typename std::conditional<(bits < 32), int32_t, int64_t>::type>::type

Definition at line 89 of file PointPartitioner.h.

Member Enumeration Documentation

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
anonymous enum
Enumerator
LOG2DIM 

Definition at line 79 of file PointPartitioner.h.

Constructor & Destructor Documentation

template<typename PointIndexType , Index BucketLog2Dim>
openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::PointPartitioner ( )
inline

Definition at line 942 of file PointPartitioner.h.

Member Function Documentation

template<typename PointIndexType , Index BucketLog2Dim>
void openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::clear ( void  )
inline

Removes all data and frees up memory.

Definition at line 955 of file PointPartitioner.h.

template<typename PointIndexType , Index BucketLog2Dim>
template<typename PointArray >
void openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::construct ( const PointArray points,
const math::Transform xform,
bool  voxelOrder = false,
bool  recordVoxelOffsets = false,
bool  cellCenteredTransform = true 
)
inline

Partitions point indices into BucketLog2Dim aligned buckets.

Parameters
pointslist of world space points.
xformworld to index space transform.
voxelOrdersort point indices by local voxel offsets.
recordVoxelOffsetsconstruct local voxel offsets
cellCenteredTransformtoggle the cell-centered interpretation that imagines world space as divided into discrete cells (e.g., cubes) centered on the image of the index-space lattice points.

Definition at line 999 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
template<typename PointArray >
static Ptr openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::create ( const PointArray points,
const math::Transform xform,
bool  voxelOrder = false,
bool  recordVoxelOffsets = false,
bool  cellCenteredTransform = true 
)
static

Partitions point indices into BucketLog2Dim aligned buckets.

Parameters
pointslist of world space points.
xformworld to index space transform.
voxelOrdersort point indices by local voxel offsets.
recordVoxelOffsetsconstruct local voxel offsets
cellCenteredTransformtoggle the cell-centered interpretation that imagines world space as divided into discrete cells (e.g., cubes) centered on the image of the index-space lattice points.
template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
template<typename PointArray >
PointPartitioner<PointIndexType, BucketLog2Dim>::Ptr openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::create ( const PointArray points,
const math::Transform xform,
bool  voxelOrder,
bool  recordVoxelOffsets,
bool  cellCenteredTransform 
)
inline

Definition at line 1028 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
bool openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::empty ( void  ) const
inline

true if the container size is 0, false otherwise.

Definition at line 133 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
CoordBBox openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::getBBox ( size_t  n) const
inline

Returns the coordinate-aligned bounding box for bucket n.

Definition at line 145 of file PointPartitioner.h.

template<typename PointIndexType , Index BucketLog2Dim>
PointPartitioner< PointIndexType, BucketLog2Dim >::IndexIterator openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::indices ( size_t  n) const
inline

Returns the point indices for bucket n.

Definition at line 987 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
const Coord& openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::origin ( size_t  n) const
inline

Returns the origin coordinate for bucket n.

Definition at line 150 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
size_t openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::size ( void  ) const
inline

Returns the number of buckets.

Definition at line 130 of file PointPartitioner.h.

template<typename PointIndexType , Index BucketLog2Dim>
void openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::swap ( PointPartitioner< PointIndexType, BucketLog2Dim > &  rhs)
inline

Exchanges the content of the container by another.

Definition at line 968 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
bool openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::usingCellCenteredTransform ( ) const
inline

Returns true if this point partitioning was constructed using a cell-centered transform.

Note
Cell-centered interpretation is the default behavior.

Definition at line 159 of file PointPartitioner.h.

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
const VoxelOffsetArray& openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::voxelOffsets ( ) const
inline

Returns a list of LeafNode voxel offsets for the points.

Note
The list is optionally constructed.

Definition at line 154 of file PointPartitioner.h.

Member Data Documentation

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>
constexpr Index openvdb::OPENVDB_VERSION_NAME::tools::PointPartitioner< PointIndexType, BucketLog2Dim >::bits = 1 + (3 * BucketLog2Dim)
static

Definition at line 86 of file PointPartitioner.h.


The documentation for this class was generated from the following file: