OpenVDB  3.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
PointPartitioner< PointIndexT, Log2Dim > Class Template Reference

Partitions points into Log2Dim aligned buckets. More...

#include <PointPartitioner.h>

Classes

class  IndexIterator
 

Public Types

enum  { LOG2DIM = Log2Dim }
 
typedef boost::shared_ptr< PointPartitionerPtr
 
typedef boost::shared_ptr< const PointPartitionerConstPtr
 
typedef PointIndexT IndexType
 
typedef boost::int_t< 1+(3 *Log2Dim)>::least VoxelOffsetType
 
typedef boost::scoped_array< VoxelOffsetTypeVoxelOffsetArray
 

Public Member Functions

 PointPartitioner ()
 
template<typename PointArray >
void construct (const PointArray &points, const math::Transform &xform, bool voxelOrder=false, bool recordVoxelOffsets=false)
 Partitions point indices into Log2Dim 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...
 

Static Public Member Functions

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

Detailed Description

template<typename PointIndexT = uint32_t, Index Log2Dim = 3>
class openvdb::v3_0_0::tools::PointPartitioner< PointIndexT, Log2Dim >

Partitions points into Log2Dim aligned buckets.

Note
This tool is deterministic; partitioning the same point sequence will produce the same result each time. Log2Dim defines the bucket coordinate dimensions, i.e. Log2Dim = 3 corresponds to a bucket that spans a (2^3)^3 = 8^3 voxel region.

Member Typedef Documentation

typedef boost::shared_ptr<const PointPartitioner> ConstPtr
typedef PointIndexT IndexType
typedef boost::shared_ptr<PointPartitioner> Ptr
typedef boost::scoped_array<VoxelOffsetType> VoxelOffsetArray
typedef boost::int_t<1 + (3 * Log2Dim)>::least VoxelOffsetType

Member Enumeration Documentation

anonymous enum
Enumerator
LOG2DIM 

Constructor & Destructor Documentation

PointPartitioner ( )
inline

Member Function Documentation

void clear ( )
inline

Removes all data and frees up memory.

void construct ( const PointArray points,
const math::Transform xform,
bool  voxelOrder = false,
bool  recordVoxelOffsets = false 
)
inline

Partitions point indices into Log2Dim aligned buckets.

Parameters
pointslist of world space points.
xformworld to index space transform.
voxelOrdersort point indices by local voxel offsets.
recordVoxelOffsetsconstruct local voxel offsets
PointPartitioner< PointIndexT, Log2Dim >::Ptr create ( const PointArray points,
const math::Transform xform,
bool  voxelOrder = false,
bool  recordVoxelOffsets = false 
)
inlinestatic

Partitions point indices into Log2Dim aligned buckets.

Parameters
pointslist of world space points.
xformworld to index space transform.
voxelOrdersort point indices by local voxel offsets.
recordVoxelOffsetsconstruct local voxel offsets
bool empty ( ) const
inline

true if the container size is 0, false otherwise.

CoordBBox getBBox ( size_t  n) const
inline

Returns the coordinate-aligned bounding box for bucket n.

PointPartitioner< PointIndexT, Log2Dim >::IndexIterator indices ( size_t  n) const
inline

Returns the point indices for bucket n.

const Coord& origin ( size_t  n) const
inline

Returns the origin coordinate for bucket n.

size_t size ( ) const
inline

Returns the number of buckets.

void swap ( PointPartitioner< PointIndexT, Log2Dim > &  rhs)
inline

Exchanges the content of the container by another.

const VoxelOffsetArray& voxelOffsets ( ) const
inline

Returns a list of LeafNode voxel offsets for the points.

Note
The list is optionally constructed.

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