MeshLib C++ Docs
Loading...
Searching...
No Matches

bounding volume hierarchy for point cloud structure More...

#include <MRMesh/MRAABBTreePoints.h>

Classes

struct  Node
struct  Point

Public Types

using NodeVec = Vector<Node, NodeId>
using NodeBitSet = TaggedBitSet<NodeTag>

Public Member Functions

const NodeVecnodes () const
const Nodeoperator[] (NodeId nid) const
Box3f getBoundingBox () const
 returns the root node bounding box
const std::vector< Point > & orderedPoints () const
 AABBTreePoints (const PointCloud &pointCloud)
 creates tree for given point cloud
 AABBTreePoints (const Mesh &mesh)
 creates tree for vertices of given mesh
 AABBTreePoints (const VertCoords &points, const VertBitSet *validPoints=nullptr)
 creates tree from given valid points
MR_BIND_IGNORE AABBTreePoints (const VertCoords &points, const VertBitSet &validPoints)
 AABBTreePoints (AABBTreePoints &&) noexcept=default
AABBTreePointsoperator= (AABBTreePoints &&) noexcept=default
void getLeafOrder (VertBMap &vertMap) const
void getLeafOrderAndReset (VertBMap &vertMap)
size_t heapBytes () const
 returns the amount of memory this object occupies on heap
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 >

Detailed Description

bounding volume hierarchy for point cloud structure

Member Typedef Documentation

◆ NodeBitSet

◆ NodeVec

Constructor & Destructor Documentation

◆ AABBTreePoints() [1/5]

MR::AABBTreePoints::AABBTreePoints ( const PointCloud & pointCloud)

creates tree for given point cloud

◆ AABBTreePoints() [2/5]

MR::AABBTreePoints::AABBTreePoints ( const Mesh & mesh)

creates tree for vertices of given mesh

◆ AABBTreePoints() [3/5]

MR::AABBTreePoints::AABBTreePoints ( const VertCoords & points,
const VertBitSet * validPoints = nullptr )

creates tree from given valid points

◆ AABBTreePoints() [4/5]

MR_BIND_IGNORE MR::AABBTreePoints::AABBTreePoints ( const VertCoords & points,
const VertBitSet & validPoints )
inline

creates tree from given valid points This is skipped in the bindings because it conflicts with the overload taking a pointer in C#. Since that overload is strictly more useful, we're keeping that one.

◆ AABBTreePoints() [5/5]

MR::AABBTreePoints::AABBTreePoints ( AABBTreePoints && )
defaultnoexcept

Member Function Documentation

◆ getBoundingBox()

Box3f MR::AABBTreePoints::getBoundingBox ( ) const
inlinenodiscard

returns the root node bounding box

◆ getLeafOrder()

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

◆ getLeafOrderAndReset()

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

◆ heapBytes()

size_t MR::AABBTreePoints::heapBytes ( ) const
nodiscard

returns the amount of memory this object occupies on heap

◆ nodes()

const NodeVec & MR::AABBTreePoints::nodes ( ) const
inlinenodiscard

◆ operator=()

AABBTreePoints & MR::AABBTreePoints::operator= ( AABBTreePoints && )
defaultnoexcept

◆ operator[]()

const Node & MR::AABBTreePoints::operator[] ( NodeId nid) const
inlinenodiscard

◆ orderedPoints()

const std::vector< Point > & MR::AABBTreePoints::orderedPoints ( ) const
inlinenodiscard

◆ refit()

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)

Parameters
newCoordscoordinates of all vertices including changed ones;
changedVertsvertex ids with modified coordinates (since tree construction or last refit)

◆ rootNodeId()

NodeId MR::AABBTreePoints::rootNodeId ( )
inlinestaticnodiscard

◆ SharedThreadSafeOwner< AABBTreePoints >

friend class SharedThreadSafeOwner< AABBTreePoints >
friend

◆ UniqueThreadSafeOwner< AABBTreePoints >

friend class UniqueThreadSafeOwner< AABBTreePoints >
friend

Member Data Documentation

◆ MaxNumPointsInLeaf

int MR::AABBTreePoints::MaxNumPointsInLeaf = 16
staticconstexpr

maximum number of points in leaf node of tree (all of leafs should have this number of points except last one)


The documentation for this class was generated from the following file: