OpenVDB 11.0.0

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
PointPartitioner< PointIndexType, BucketLog2Dim > Class Template Reference

`#include <openvdb/tools/PointPartitioner.h>`

## Classes
class | IndexIterator

## Public Types
enum | { LOG2DIM = BucketLog2Dim }
using | Ptr = SharedPtr<PointPartitioner>
using | ConstPtr = SharedPtr<const PointPartitioner>
using | IndexType = PointIndexType
using | VoxelOffsetType
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.
size_t | size () const
| Returns the number of buckets.
bool | empty () const
| true if the container size is 0, false otherwise.
void | clear ()
| Removes all data and frees up memory.
void | swap (PointPartitioner &)
| Exchanges the content of the container by another.
IndexIterator | indices (size_t n) const
| Returns the point indices for bucket n.
CoordBBox | getBBox (size_t n) const
| Returns the coordinate-aligned bounding box for bucket n.
const Coord & | origin (size_t n) const
| Returns the origin coordinate for bucket n.
const VoxelOffsetArray & | voxelOffsets () const
| Returns a list of `LeafNode` voxel offsets for the points.
bool | usingCellCenteredTransform () const
| Returns `true` if this point partitioning was constructed using a cell-centered transform.

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

## Static Public Attributes
static constexpr Index | bits = 1 + (3 * BucketLog2Dim)

## Member Typedef Documentation

## ◆ ConstPtr

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

using ConstPtr = SharedPtr<const PointPartitioner>

## ◆ IndexType

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

using IndexType = PointIndexType

## ◆ Ptr

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

using Ptr = SharedPtr<PointPartitioner>

## ◆ VoxelOffsetArray

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

using VoxelOffsetArray = std::unique_ptr<VoxelOffsetType[]>

## ◆ VoxelOffsetType

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

using VoxelOffsetType

Initial value:
typename std::conditional<(bits < 16),
int16_t, typename std::conditional<(bits < 32), int32_t, int64_t>::type>::type
openvdb::v11_0::tools::PointPartitioner::bits
static constexpr Index bits
Definition PointPartitioner.h:86

## Member Enumeration Documentation

## ◆ anonymous enum

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

anonymous enum

Enumerator
LOG2DIM |

## Constructor & Destructor Documentation

## ◆ PointPartitioner()

template<typename PointIndexType , Index BucketLog2Dim>

PointPartitioner | ( |  | ) |
| inline

## Member Function Documentation

## ◆ clear()

template<typename PointIndexType , Index BucketLog2Dim>

void clear | ( |  | ) |
| inline

Removes all data and frees up memory.

## ◆ construct()

template<typename PointIndexType , Index BucketLog2Dim>
template<typename PointArray >

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

  points | list of world space points.
  xform | world to index space transform.
  voxelOrder | sort point indices by local voxel offsets.
  recordVoxelOffsets | construct local voxel offsets
  cellCenteredTransform | toggle 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.

## ◆ create()

template<typename PointIndexType , Index BucketLog2Dim>
template<typename PointArray >

PointPartitioner< PointIndexType, BucketLog2Dim >::Ptr create | ( | const PointArray & | points,
|  | const math::Transform & | xform,
|  | bool | voxelOrder = false,
|  | bool | recordVoxelOffsets = false,
|  | bool | cellCenteredTransform = true )
| inline static

Partitions point indices into `BucketLog2Dim` aligned buckets.

Parameters

  points | list of world space points.
  xform | world to index space transform.
  voxelOrder | sort point indices by local voxel offsets.
  recordVoxelOffsets | construct local voxel offsets
  cellCenteredTransform | toggle 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.

## ◆ empty()

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

bool empty | ( |  | ) | const
| inline

true if the container size is 0, false otherwise.

## ◆ getBBox()

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

CoordBBox getBBox | ( | size_t | n | ) | const
| inline

Returns the coordinate-aligned bounding box for bucket n.

## ◆ indices()

template<typename PointIndexType , Index BucketLog2Dim>

PointPartitioner< PointIndexType, BucketLog2Dim >::IndexIterator indices | ( | size_t | n | ) | const
| inline

Returns the point indices for bucket n.

## ◆ origin()

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

const Coord & origin | ( | size_t | n | ) | const
| inline

Returns the origin coordinate for bucket n.

## ◆ size()

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

size_t size | ( |  | ) | const
| inline

Returns the number of buckets.

## ◆ swap()

template<typename PointIndexType , Index BucketLog2Dim>

void swap | ( | PointPartitioner< PointIndexType, BucketLog2Dim > & | rhs | ) |
| inline

Exchanges the content of the container by another.

## ◆ usingCellCenteredTransform()

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

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.

## ◆ voxelOffsets()

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

const VoxelOffsetArray & voxelOffsets | ( |  | ) | const
| inline

Returns a list of `LeafNode` voxel offsets for the points.

Note
  The list is optionally constructed.

## Member Data Documentation

## ◆ bits

template<typename PointIndexType = uint32_t, Index BucketLog2Dim = 3>

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