OpenVDB  5.2.0
Classes | Namespaces | Macros | Typedefs | Functions
PointIndexGrid.h File Reference

Space-partitioning acceleration structure for points. Partitions the points into voxels to accelerate range and nearest neighbor searches. More...

#include "PointPartitioner.h"
#include <openvdb/version.h>
#include <openvdb/Exceptions.h>
#include <openvdb/Grid.h>
#include <openvdb/Types.h>
#include <openvdb/math/Transform.h>
#include <openvdb/tree/LeafManager.h>
#include <openvdb/tree/LeafNode.h>
#include <openvdb/tree/Tree.h>
#include <tbb/atomic.h>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  SameLeafConfig< Dim1, NodeT2 >
 
struct  PointIndexLeafNode< T, Log2Dim >
 
struct  PointIndexIterator< TreeType >
 Accelerated range and nearest-neighbor searches for point index grids. More...
 
struct  PointIndexFilter< PointArray, TreeType >
 
struct  ValidPartitioningOp< PointArrayT >
 
struct  PopulateLeafNodesOp< LeafNodeT >
 
struct  BBoxFilter< PointArray, IndexT >
 
struct  RadialRangeFilter< PointArray, IndexT >
 
struct  PointIndexLeafNode< T, Log2Dim >
 
struct  SameLeafConfig< Dim1, openvdb::tools::PointIndexLeafNode< T2, Dim1 > >
 

Namespaces

 openvdb
 
 openvdb::v5_2
 
 openvdb::v5_2::tree
 
 openvdb::v5_2::tools
 
 openvdb::v5_2::tools::point_index_grid_internal
 

Macros

#define VMASK_   this->getValueMask()
 

Typedefs

using PointIndexTree = tree::Tree< tree::RootNode< tree::InternalNode< tree::InternalNode< PointIndexLeafNode< PointIndex32, 3 >, 4 >, 5 >>>
 Point index tree configured to match the default OpenVDB tree configuration. More...
 
using PointIndexGrid = Grid< PointIndexTree >
 Point index grid. More...
 

Functions

template<typename GridT , typename PointArrayT >
GridT::Ptr createPointIndexGrid (const PointArrayT &points, double voxelSize)
 Partition points into a point index grid to accelerate range and nearest-neighbor searches. More...
 
template<typename GridT , typename PointArrayT >
GridT::Ptr createPointIndexGrid (const PointArrayT &points, const math::Transform &xform)
 Partition points into a point index grid to accelerate range and nearest-neighbor searches. More...
 
template<typename PointArrayT , typename GridT >
bool isValidPartition (const PointArrayT &points, const GridT &grid)
 Return true if the given point index grid represents a valid partitioning of the given point array. More...
 
template<typename GridT , typename PointArrayT >
GridT::ConstPtr getValidPointIndexGrid (const PointArrayT &points, const typename GridT::ConstPtr &grid)
 Repartition the points if needed, otherwise return the input grid. More...
 
template<typename GridT , typename PointArrayT >
GridT::Ptr getValidPointIndexGrid (const PointArrayT &points, const typename GridT::Ptr &grid)
 Repartition the points if needed, otherwise return the input grid. More...
 
template<typename TreeType , typename PointArray >
void constructPointTree (TreeType &tree, const math::Transform &xform, const PointArray &points)
 Construct a PointIndexTree. More...
 
template<typename T >
void dequeToArray (const std::deque< T > &d, std::unique_ptr< T[]> &a, size_t &size)
 
void constructExclusiveRegions (std::vector< CoordBBox > &regions, const CoordBBox &bbox, const CoordBBox &ibox)
 
template<typename RangeFilterType , typename LeafNodeType >
void filteredPointIndexSearchVoxels (RangeFilterType &filter, const LeafNodeType &leaf, const Coord &min, const Coord &max)
 
template<typename RangeFilterType , typename ConstAccessor >
void filteredPointIndexSearch (RangeFilterType &filter, ConstAccessor &acc, const CoordBBox &bbox)
 
template<typename RangeDeque , typename LeafNodeType >
void pointIndexSearchVoxels (RangeDeque &rangeList, const LeafNodeType &leaf, const Coord &min, const Coord &max)
 
template<typename RangeDeque , typename ConstAccessor >
void pointIndexSearch (RangeDeque &rangeList, ConstAccessor &acc, const CoordBBox &bbox)
 

Detailed Description

Space-partitioning acceleration structure for points. Partitions the points into voxels to accelerate range and nearest neighbor searches.

Note
Leaf nodes store a single point-index array and the voxels are only integer offsets into that array. The actual points are never stored in the acceleration structure, only offsets into an external array.
Author
Mihai Alden

Macro Definition Documentation

#define VMASK_   this->getValueMask()