OpenVDB 11.0.0

Loading...
Searching...
No Matches
PointArray Interface Reference

Partitions points into `BucketLog2Dim` aligned buckets using a parallel radix-based sorting algorithm. More...

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

## Detailed Description

Partitions points into `BucketLog2Dim` aligned buckets using a parallel radix-based sorting algorithm.

Expected interface for the PointArray container:

template<typename VectorType>
struct PointArray
{
// The type used to represent world-space point positions
using PosType = VectorType;
// Return the number of points in the array
size_t size() const;
// Return the world-space position of the nth point in the array.
void getPos(size_t n, PosType& xyz) const;
};
PointArray
Partitions points into BucketLog2Dim aligned buckets using a parallel radix-based sorting algorithm.

Expected interface for the PointArray container:

template<typename VectorType>
struct PointArray
{
// The type used to represent world-space point positions
using PosType = VectorType;
// Return the number of points in the array
size_t size() const;
// Return the world-space position of the nth point in the array.
void getPos(size_t n, PosType& xyz) const;
};

Performs a stable deterministic sort; partitioning the same point sequence will produce the same result each time.

The algorithm is unbounded meaning that points may be distributed anywhere in index space.

The actual points are never stored in the tool, only offsets into an external array.

`BucketLog2Dim` defines the bucket coordinate dimensions, i.e. BucketLog2Dim = 3 corresponds to a bucket that spans a (2^3)^3 = 8^3 voxel region.