bounding volume hierarchy for point cloud structure More...
#include <MRAABBTreePoints.h>
Classes | |
| struct | Node |
| struct | Point |
Public Types | |
| using | NodeVec = Vector<Node, NodeId> |
| using | NodeBitSet = TaggedBitSet<NodeTag> |
Public Member Functions | |
| const NodeVec & | nodes () const |
| const Node & | operator[] (NodeId nid) const |
| Box3f | getBoundingBox () const |
| returns the root node bounding box | |
| const std::vector< Point > & | orderedPoints () const |
| MRMESH_API | AABBTreePoints (const PointCloud &pointCloud) |
| creates tree for given point cloud | |
| MRMESH_API | AABBTreePoints (const Mesh &mesh) |
| creates tree for vertices of given mesh | |
| MRMESH_API | AABBTreePoints (const VertCoords &points, const VertBitSet *validPoints=nullptr) |
| creates tree from given valid points | |
| AABBTreePoints (const VertCoords &points, const VertBitSet &validPoints) | |
| creates tree from given valid points | |
| AABBTreePoints (AABBTreePoints &&) noexcept=default | |
| AABBTreePoints & | operator= (AABBTreePoints &&) noexcept=default |
| MRMESH_API void | getLeafOrder (VertBMap &vertMap) const |
| MRMESH_API void | getLeafOrderAndReset (VertBMap &vertMap) |
| MRMESH_API size_t | heapBytes () const |
| returns the amount of memory this object occupies on heap | |
| MRMESH_API void | refit (const VertCoords &newCoords, const VertBitSet &changedVerts) |
Static Public Member Functions | |
| static NodeId | rootNodeId () |
Static Public Attributes | |
| static constexpr int | MaxNumPointsInLeaf = 16 |
| maximum number of points in leaf node of tree (all of leafs should have this number of points except last one) | |
Friends | |
| class | UniqueThreadSafeOwner< AABBTreePoints > |
| class | SharedThreadSafeOwner< AABBTreePoints > |
bounding volume hierarchy for point cloud structure
| using MR::AABBTreePoints::NodeBitSet = TaggedBitSet<NodeTag> |
| using MR::AABBTreePoints::NodeVec = Vector<Node, NodeId> |
| MRMESH_API MR::AABBTreePoints::AABBTreePoints | ( | const PointCloud & | pointCloud | ) |
creates tree for given point cloud
| MRMESH_API MR::AABBTreePoints::AABBTreePoints | ( | const Mesh & | mesh | ) |
creates tree for vertices of given mesh
| MRMESH_API MR::AABBTreePoints::AABBTreePoints | ( | const VertCoords & | points, |
| const VertBitSet * | validPoints = nullptr ) |
creates tree from given valid points
|
inline |
creates tree from given valid points
|
defaultnoexcept |
|
inlinenodiscard |
returns the root node bounding box
| MRMESH_API void MR::AABBTreePoints::getLeafOrder | ( | VertBMap & | vertMap | ) | const |
returns the mapping original VertId to new id following the points order in the tree; buffer in vertMap must be resized before the call, and caller is responsible for filling missing vertex elements
| MRMESH_API void MR::AABBTreePoints::getLeafOrderAndReset | ( | VertBMap & | vertMap | ) |
returns the mapping original VertId to new id following the points order in the tree; then resets leaf order as if the points were renumberd following the mapping; buffer in vertMap must be resized before the call, and caller is responsible for filling missing vertex elements
|
nodiscard |
returns the amount of memory this object occupies on heap
|
inlinenodiscard |
|
defaultnoexcept |
|
inlinenodiscard |
|
inlinenodiscard |
| MRMESH_API void MR::AABBTreePoints::refit | ( | const VertCoords & | newCoords, |
| const VertBitSet & | changedVerts ) |
updates bounding boxes of the nodes containing changed vertices; this is a faster alternative to full tree rebuild (but the tree after refit might be less efficient)
| newCoords | coordinates of all vertices including changed ones; |
| changedVerts | vertex ids with modified coordinates (since tree construction or last refit) |
|
inlinestaticnodiscard |
|
friend |
|
friend |
|
staticconstexpr |
maximum number of points in leaf node of tree (all of leafs should have this number of points except last one)