24 using BoxT =
typename T::BoxT;
31 [[nodiscard]]
const Node &
operator[]( NodeId nid )
const {
return nodes_[nid]; }
34 [[nodiscard]]
static NodeId
rootNodeId() {
return NodeId{ 0 }; }
40 [[nodiscard]]
size_t heapBytes()
const {
return nodes_.heapBytes(); }
43 [[nodiscard]]
size_t numLeaves()
const {
return nodes_.empty() ? 0 : ( nodes_.size() + 1 ) / 2; }
46 [[nodiscard]] MRMESH_API std::vector<NodeId>
getSubtrees(
int minNum )
const;
base class for most AABB-trees (except for AABBTreePoints)
Definition MRAABBTreeBase.h:15
NodeVec nodes_
Definition MRAABBTreeBase.h:63
typename T::BoxT BoxT
Definition MRAABBTreeBase.h:24
size_t numLeaves() const
returns the number of leaves in whole tree
Definition MRAABBTreeBase.h:43
const NodeVec & nodes() const
const-access to all nodes
Definition MRAABBTreeBase.h:28
T Traits
Definition MRAABBTreeBase.h:17
MRMESH_API void getLeafOrderAndReset(LeafBMap &leafMap)
typename T::LeafTag LeafTag
Definition MRAABBTreeBase.h:20
MRMESH_API void getLeafOrder(LeafBMap &leafMap) const
TaggedBitSet< LeafTag > LeafBitSet
Definition MRAABBTreeBase.h:22
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:37
static NodeId rootNodeId()
returns root node id
Definition MRAABBTreeBase.h:34
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:31
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:40
typename T::LeafId LeafId
Definition MRAABBTreeBase.h:21
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRAABBTreeNode.h:31
flat map: I -> T
Definition MRBuffer.h:147