MeshLib
 
Loading...
Searching...
No Matches
MR::AABBTree Class Reference

#include <MRAABBTree.h>

+ Inheritance diagram for MR::AABBTree:

Public Member Functions

MRMESH_API AABBTree (const MeshPart &mp)
 creates tree for given mesh or its part
 
 AABBTree ()=default
 
 AABBTree (AABBTree &&) noexcept=default
 
AABBTreeoperator= (AABBTree &&) noexcept=default
 
MRMESH_API void refit (const Mesh &mesh, const VertBitSet &changedVerts)
 
- Public Member Functions inherited from MR::AABBTreeBase< FaceTreeTraits3 >
const NodeVecnodes () const
 const-access to all nodes
 
const Nodeoperator[] (NodeId nid) const
 const-access to any node
 
BoxT getBoundingBox () const
 returns the root node bounding box
 
MRMESH_API size_t heapBytes () const
 returns the amount of memory this object occupies on heap
 
size_t numLeaves () const
 returns the number of leaves in whole tree
 
MRMESH_API std::vector< NodeId > getSubtrees (int minNum) const
 returns at least given number of top-level not-intersecting subtrees, union of which contain all tree leaves
 
MRMESH_API LeafBitSet getSubtreeLeaves (NodeId subtreeRoot) const
 returns all leaves in the subtree with given root
 
MRMESH_API NodeBitSet getNodesFromLeaves (const LeafBitSet &leaves) const
 returns set of nodes containing among direct or indirect children given leaves
 
MRMESH_API void getLeafOrder (LeafBMap &leafMap) const
 
MRMESH_API void getLeafOrderAndReset (LeafBMap &leafMap)
 

Friends

class UniqueThreadSafeOwner< AABBTree >
 

Additional Inherited Members

- Public Types inherited from MR::AABBTreeBase< FaceTreeTraits3 >
using Traits
 
using Node
 
using NodeVec
 
using LeafTag
 
using LeafId
 
using LeafBitSet
 
using LeafBMap
 
using BoxT
 
- Static Public Member Functions inherited from MR::AABBTreeBase< FaceTreeTraits3 >
static NodeId rootNodeId ()
 returns root node id
 
- Protected Attributes inherited from MR::AABBTreeBase< FaceTreeTraits3 >
NodeVec nodes_
 

Detailed Description

bounding volume hierarchy

Constructor & Destructor Documentation

◆ AABBTree() [1/3]

MRMESH_API MR::AABBTree::AABBTree ( const MeshPart & mp)
explicitnodiscard

creates tree for given mesh or its part

◆ AABBTree() [2/3]

MR::AABBTree::AABBTree ( )
default

◆ AABBTree() [3/3]

MR::AABBTree::AABBTree ( AABBTree && )
defaultnoexcept

Member Function Documentation

◆ operator=()

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

◆ refit()

MRMESH_API void MR::AABBTree::refit ( const Mesh & mesh,
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
meshsame mesh for which this tree was constructed but with updated coordinates;
changedVertsvertex ids with modified coordinates (since tree construction or last refit)

Friends And Related Symbol Documentation

◆ UniqueThreadSafeOwner< AABBTree >

friend class UniqueThreadSafeOwner< AABBTree >
friend

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