base class for most AABB-trees (except for AABBTreePoints) More...
#include <MRAABBTreeBase.h>
Public Types | |
using | Traits = T |
using | Node = AABBTreeNode<Traits> |
using | NodeVec = Vector<Node, NodeId> |
using | LeafTag = typename T::LeafTag |
using | LeafId = typename T::LeafId |
using | LeafBitSet = TaggedBitSet<LeafTag> |
using | LeafBMap = BMap<LeafId, LeafId> |
using | BoxT = typename T::BoxT |
Public Member Functions | |
const NodeVec & | nodes () const |
const-access to all nodes | |
const Node & | operator[] (NodeId nid) const |
const-access to any node | |
BoxT | getBoundingBox () const |
returns the root node bounding box | |
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) |
Static Public Member Functions | |
static NodeId | rootNodeId () |
returns root node id | |
Protected Attributes | |
NodeVec | nodes_ |
base class for most AABB-trees (except for AABBTreePoints)
using MR::AABBTreeBase< T >::BoxT = typename T::BoxT |
using MR::AABBTreeBase< T >::LeafBitSet = TaggedBitSet<LeafTag> |
using MR::AABBTreeBase< T >::LeafBMap = BMap<LeafId, LeafId> |
using MR::AABBTreeBase< T >::LeafId = typename T::LeafId |
using MR::AABBTreeBase< T >::LeafTag = typename T::LeafTag |
using MR::AABBTreeBase< T >::Node = AABBTreeNode<Traits> |
using MR::AABBTreeBase< T >::NodeVec = Vector<Node, NodeId> |
using MR::AABBTreeBase< T >::Traits = T |
|
inlinenodiscard |
returns the root node bounding box
MRMESH_API void MR::AABBTreeBase< T >::getLeafOrder | ( | LeafBMap & | leafMap | ) | const |
fills map: LeafId -> leaf#; buffer in leafMap must be resized before the call, and caller is responsible for filling missing leaf elements
MRMESH_API void MR::AABBTreeBase< T >::getLeafOrderAndReset | ( | LeafBMap & | leafMap | ) |
fills map: LeafId -> leaf#, then resets leaf order to 0,1,2,...; buffer in leafMap must be resized before the call, and caller is responsible for filling missing leaf elements
|
nodiscard |
returns set of nodes containing among direct or indirect children given leaves
|
nodiscard |
returns all leaves in the subtree with given root
|
nodiscard |
returns at least given number of top-level not-intersecting subtrees, union of which contain all tree leaves
|
inlinenodiscard |
returns the amount of memory this object occupies on heap
|
inlinenodiscard |
const-access to all nodes
|
inlinenodiscard |
returns the number of leaves in whole tree
|
inlinenodiscard |
const-access to any node
|
inlinestaticnodiscard |
returns root node id
|
protected |