21 using BoxT =
typename T::BoxT;
28 [[nodiscard]]
const Node &
operator[]( NodeId nid )
const {
return nodes_[nid]; }
31 [[nodiscard]]
static NodeId
rootNodeId() {
return NodeId{ 0 }; }
37 [[nodiscard]]
size_t heapBytes()
const {
return nodes_.heapBytes(); }
40 [[nodiscard]]
size_t numLeaves()
const {
return nodes_.empty() ? 0 : ( nodes_.size() + 1 ) / 2; }
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
base class for most AABB-trees (except for AABBTreePoints)
Definition MRAABBTreeBase.h:12
NodeVec nodes_
Definition MRAABBTreeBase.h:60
typename T::BoxT BoxT
Definition MRAABBTreeBase.h:21
size_t numLeaves() const
returns the number of leaves in whole tree
Definition MRAABBTreeBase.h:40
const NodeVec & nodes() const
const-access to all nodes
Definition MRAABBTreeBase.h:25
T Traits
Definition MRAABBTreeBase.h:14
MRMESH_API void getLeafOrderAndReset(LeafBMap &leafMap)
typename T::LeafTag LeafTag
Definition MRAABBTreeBase.h:17
MRMESH_API void getLeafOrder(LeafBMap &leafMap) const
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...
BoxT getBoundingBox() const
returns the root node bounding box
Definition MRAABBTreeBase.h:34
static NodeId rootNodeId()
returns root node id
Definition MRAABBTreeBase.h:31
MRMESH_API LeafBitSet getSubtreeLeaves(NodeId subtreeRoot) const
returns all leaves in the subtree with given root
const Node & operator[](NodeId nid) const
const-access to any node
Definition MRAABBTreeBase.h:28
MRMESH_API NodeBitSet getNodesFromLeaves(const LeafBitSet &leaves) const
returns set of nodes containing among direct or indirect children given leaves
size_t heapBytes() const
returns the amount of memory this object occupies on heap
Definition MRAABBTreeBase.h:37
typename T::LeafId LeafId
Definition MRAABBTreeBase.h:18
container of bits representing specific indices (faces, verts or edges)
Definition MRMesh/MRBitSet.h:127
Definition MRCameraOrientationPlugin.h:8
Definition MRAABBTreeNode.h:31
flat map: I -> T
Definition MRBuffer.h:143