MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.ConstAABBTree Class Reference
Inheritance diagram for mrmeshpy.ConstAABBTree:

Public Member Functions

 __init__ (self, *args, **kwargs)
Box3f getBoundingBox (self)
None getLeafOrder (self, FaceBMap faceMap)
NodeBitSet getNodesFromFaces (self, ConstFaceBitSet faces)
FaceBitSet getSubtreeFaces (self, ConstNodeId subtreeRoot)
std_vector_Id_NodeTag getSubtrees (self, int minNum)
int heapBytes (self)
ConstVector_Box3f leafBoxes (self)
ConstVector_AABBTreeWideLeafTri leafTris (self)
ConstVector_AABBTreeWideNode_NodeId nodes (self)

Static Public Attributes

typing MaxChildren = 4
typing MaxDepth = 16
typing MaxLeafTris = 4
 ConstLeafTri = ConstAABBTreeWideLeafTri
 ConstNode = ConstAABBTreeWideNode
 LeafTri = AABBTreeWideLeafTri
 Node = AABBTreeWideNode

Detailed Description

Generated from:  MR::AABBTree

bounding volume hierarchy of mesh triangles with up to 4 children per node and up to 4 triangles per leaf;
the children of a node are stored contiguously, and every leaf keeps the vertices and the boxes of its triangles

Constructor & Destructor Documentation

◆ __init__()

mrmeshpy.ConstAABBTree.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrmeshpy.ConstAABBTree) -> None

2. __init__(self: meshlib.mrmeshpy.ConstAABBTree, mp: meshlib.mrmeshpy.ConstMeshPart) -> None

creates tree for given mesh or its part

3. __init__(self: meshlib.mrmeshpy.ConstAABBTree, tmesh: meshlib.mrmeshpy.ConstTriMesh, region: meshlib.mrmeshpy.ConstFaceBitSet = None) -> None

creates tree for the triangles of tmesh (all if region is nullptr), faster than from a mesh;
it is the tree of a mesh with tmesh.points and mesh.topology.getTriVerts( f ) == tmesh.tris[f] for all its triangles

Member Function Documentation

◆ getBoundingBox()

Box3f mrmeshpy.ConstAABBTree.getBoundingBox ( self)
returns the bounding box of the whole tree (empty for an empty tree)

◆ getLeafOrder()

None mrmeshpy.ConstAABBTree.getLeafOrder ( self,
FaceBMap faceMap )
fills map: FaceId -> its position in leafTris();
buffer in faceMap must be resized before the call, and caller is responsible for filling missing face elements

◆ getNodesFromFaces()

NodeBitSet mrmeshpy.ConstAABBTree.getNodesFromFaces ( self,
ConstFaceBitSet faces )
returns the nodes having at least one of given triangles in their subtrees

◆ getSubtreeFaces()

FaceBitSet mrmeshpy.ConstAABBTree.getSubtreeFaces ( self,
ConstNodeId subtreeRoot )
returns all triangles in the subtree with given root

◆ getSubtrees()

std_vector_Id_NodeTag mrmeshpy.ConstAABBTree.getSubtrees ( self,
int minNum )
returns at least given number of top-level not-intersecting subtrees, union of which contain all tree leaves

◆ heapBytes()

int mrmeshpy.ConstAABBTree.heapBytes ( self)
returns the amount of memory this object occupies on heap

◆ leafBoxes()

ConstVector_Box3f mrmeshpy.ConstAABBTree.leafBoxes ( self)
the bounding boxes of the triangles in the order of leafTris(), slightly expanded for robust searches

◆ leafTris()

ConstVector_AABBTreeWideLeafTri mrmeshpy.ConstAABBTree.leafTris ( self)
triangles of all leaves, the triangles of each leaf are contiguous

◆ nodes()

ConstVector_AABBTreeWideNode_NodeId mrmeshpy.ConstAABBTree.nodes ( self)
the root is the first node, if any

Member Data Documentation

◆ ConstLeafTri

mrmeshpy.ConstAABBTree.ConstLeafTri = ConstAABBTreeWideLeafTri
static

◆ ConstNode

mrmeshpy.ConstAABBTree.ConstNode = ConstAABBTreeWideNode
static

◆ LeafTri

mrmeshpy.ConstAABBTree.LeafTri = AABBTreeWideLeafTri
static

◆ MaxChildren

typing mrmeshpy.ConstAABBTree.MaxChildren = 4
static

◆ MaxDepth

typing mrmeshpy.ConstAABBTree.MaxDepth = 16
static

◆ MaxLeafTris

typing mrmeshpy.ConstAABBTree.MaxLeafTris = 4
static

◆ Node

mrmeshpy.ConstAABBTree.Node = AABBTreeWideNode
static

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