OpenVDB  5.2.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
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 boost::int_t< 1+(3 *BucketLog2Dim)>::least
 
using VoxelOffsetArray = boost::scoped_array< 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...
 

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...
 

Member Typedef Documentation

using IndexType = PointIndexType
using VoxelOffsetArray = boost::scoped_array<VoxelOffsetType>
using VoxelOffsetType = typename boost::int_t<1 + (3 * BucketLog2Dim)>::least

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,
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.
PointPartitioner< PointIndexType, BucketLog2Dim >::Ptr create ( const PointArray points,
const math::Transform xform,
bool  voxelOrder = false,
bool  recordVoxelOffsets = false,
bool  cellCenteredTransform = true 
)
inlinestatic

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.
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< PointIndexType, BucketLog2Dim >::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< PointIndexType, BucketLog2Dim > &  rhs)
inline

Exchanges the content of the container by another.

bool usingCellCenteredTransform ( ) const
inline

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

Note
Cell-centered interpretation is the default behavior.
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: