MeshLib Documentation
Loading...
Searching...
No Matches
MR::AABBTreeObjects Class Reference

#include <MRAABBTreeObjects.h>

+ Inheritance diagram for MR::AABBTreeObjects:

Public Member Functions

 AABBTreeObjects ()=default
 
MRMESH_API AABBTreeObjects (Vector< MeshOrPointsXf, ObjId > objs)
 creates tree for given set of objects each with its own transformation
 
const MeshOrPointsobj (ObjId oi) const
 gets object by its id
 
const AffineXf3f & toWorld (ObjId oi) const
 gets transformation from local space of given object to world space
 
const AffineXf3f & toLocal (ObjId oi) const
 gets transformation from world space to local space of given object
 
const Vector< AffineXf3f, ObjId > & toLocal () const
 gets mapping: objId -> its transformation from world space to local space
 
- Public Member Functions inherited from MR::AABBTreeBase< ObjTreeTraits >
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
 
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)
 

Additional Inherited Members

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

Detailed Description

tree containing world bounding boxes of individual objects having individual local-to-world transformations

Constructor & Destructor Documentation

◆ AABBTreeObjects() [1/2]

MR::AABBTreeObjects::AABBTreeObjects ( )
default

◆ AABBTreeObjects() [2/2]

MRMESH_API MR::AABBTreeObjects::AABBTreeObjects ( Vector< MeshOrPointsXf, ObjId > objs)
explicitnodiscard

creates tree for given set of objects each with its own transformation

Member Function Documentation

◆ obj()

const MeshOrPoints & MR::AABBTreeObjects::obj ( ObjId oi) const
inlinenodiscard

gets object by its id

◆ toLocal() [1/2]

const Vector< AffineXf3f, ObjId > & MR::AABBTreeObjects::toLocal ( ) const
inlinenodiscard

gets mapping: objId -> its transformation from world space to local space

◆ toLocal() [2/2]

const AffineXf3f & MR::AABBTreeObjects::toLocal ( ObjId oi) const
inlinenodiscard

gets transformation from world space to local space of given object

◆ toWorld()

const AffineXf3f & MR::AABBTreeObjects::toWorld ( ObjId oi) const
inlinenodiscard

gets transformation from local space of given object to world space


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