OpenVDB: PointPartitioner< PointIndexType, BucketLog2Dim >::IndexIterator Class Reference

OpenVDB 12.0.0 |

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

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

## Public Types
using | IndexType = PointIndexType
enum |
using | Ptr
using | ConstPtr
using | IndexType
using | VoxelOffsetType
using | VoxelOffsetArray

## Public Member Functions
| IndexIterator (IndexType *begin=nullptr, IndexType *end=nullptr)
void | reset ()
| Rewind to first item.
size_t | size () const
| Number of point indices in the iterator range.
IndexType & | operator* ()
| Returns the item to which this iterator is currently pointing.
const IndexType & | operator* () const
| operator bool () const
| Return `true` if this iterator is not yet exhausted.
bool | test () const
IndexIterator & | operator++ ()
| Advance to the next item.
bool | next ()
| Advance to the next item.
bool | increment ()
bool | operator== (const IndexIterator &other) const
| Equality operators.
bool | operator!= (const IndexIterator &other) const
| PointPartitioner ()
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
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

## Member Typedef Documentation

## ◆ ConstPtr

using ConstPtr

## ◆ IndexType [1/2]

using IndexType

## ◆ IndexType [2/2]

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

using IndexType = PointIndexType

## ◆ Ptr

using Ptr

## ◆ VoxelOffsetArray

using VoxelOffsetArray

## ◆ VoxelOffsetType

using VoxelOffsetType

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum

## Constructor & Destructor Documentation

## ◆ IndexIterator()

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

IndexIterator | ( | IndexType * | begin = nullptr,
|  | IndexType * | end = nullptr )
| inline

## Member Function Documentation

## ◆ clear()

void clear | ( |  | ) |
| inline

Removes all data and frees up memory.

## ◆ construct()

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()

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

  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()

bool empty | ( |  | ) | const
| inline

true if the container size is 0, false otherwise.

## ◆ getBBox()

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

Returns the coordinate-aligned bounding box for bucket n.

## ◆ increment()

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

bool increment | ( |  | ) |
| inline

## ◆ indices()

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

Returns the point indices for bucket n.

## ◆ next()

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

bool next | ( |  | ) |
| inline

Advance to the next item.

## ◆ operator bool()

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

operator bool | ( |  | ) | const
| inline

Return `true` if this iterator is not yet exhausted.

## ◆ operator!=()

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

bool operator!= | ( | const IndexIterator & | other | ) | const
| inline

## ◆ operator*() [1/2]

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

IndexType & operator* | ( |  | ) |
| inline

Returns the item to which this iterator is currently pointing.

## ◆ operator*() [2/2]

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

const IndexType & operator* | ( |  | ) | const
| inline

## ◆ operator++()

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

IndexIterator & operator++ | ( |  | ) |
| inline

Advance to the next item.

## ◆ operator==()

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

bool operator== | ( | const IndexIterator & | other | ) | const
| inline

Equality operators.

## ◆ origin()

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

Returns the origin coordinate for bucket n.

## ◆ PointPartitioner()

PointPartitioner | ( |  | ) |
| inline

## ◆ reset()

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

void reset | ( |  | ) |
| inline

Rewind to first item.

## ◆ size() [1/2]

size_t size | ( |  | ) | const
| inline

Returns the number of buckets.

## ◆ size() [2/2]

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

size_t size | ( |  | ) | const
| inline

Number of point indices in the iterator range.

## ◆ swap()

void swap | ( | PointPartitioner & | rhs | ) |
| inline

Exchanges the content of the container by another.

## ◆ test()

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

bool test | ( |  | ) | const
| inline

## ◆ usingCellCenteredTransform()

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()

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

Index bits
| staticconstexpr