MeshLib Java Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib.AABBTree:

Public Member Functions

 AABBTree (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 AABBTree ()
 AABBTree (meshlib.AABBTree _other)
 AABBTree (meshlib.MeshPart mp)
meshlib.AABBTree assignFromAnother (meshlib.AABBTree _other)
meshlib.Vector_MR_AABBTreeWideNode_MR_NodeId nodes ()
meshlib.Box3f getBoundingBox ()
meshlib.Vector_MR_AABBTreeWideLeafTri leafTris ()
meshlib.Vector_MR_Box3f leafBoxes ()
long heapBytes ()
meshlib.std_vector_MR_NodeId getSubtrees (int minNum)
meshlib.FaceBitSet getSubtreeFaces (meshlib.NodeId subtreeRoot)
meshlib.NodeBitSet getNodesFromFaces (meshlib.FaceBitSet faces)
void getLeafOrder (meshlib.FaceBMap faceMap)
void renumber (meshlib.FaceBMap faceMap, meshlib.VertBMap vertMap)
void flipOrientation (meshlib.FaceBitSet region)
void refit (meshlib.Mesh mesh, meshlib.VertBitSet changedVerts)
void addSplitFaces (meshlib.Mesh mesh, meshlib.phmap.phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_st__dda91c58 new2Old)
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Static Public Member Functions

static int MaxChildren ()
static int MaxLeafTris ()
static int MaxDepth ()

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

Detailed Description

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 Generated from class MR::AABBTree.

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ AABBTree() [1/4]

meshlib.AABBTree.AABBTree ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ AABBTree() [2/4]

meshlib.AABBTree.AABBTree ( )

Constructs an empty (default-constructed) instance.

Calls MR_AABBTree_DefaultConstruct().

◆ AABBTree() [3/4]

meshlib.AABBTree.AABBTree ( meshlib.AABBTree _other)

Generated from constructor MR::AABBTree::AABBTree. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

Calls MR_AABBTree_ConstructFromAnother().

◆ AABBTree() [4/4]

meshlib.AABBTree.AABBTree ( meshlib.MeshPart mp)

creates tree for given mesh or its part Generated from constructor MR::AABBTree::AABBTree. The reference to the parameter mp might be preserved in the constructed object.

Calls MR_AABBTree_Construct().

Member Function Documentation

◆ addSplitFaces()

adds to the tree the faces that appeared after splitting some of its faces into parts (e.g. by Mesh.splitFace or Mesh.splitEdge): the leaf of each split face gets a subtree with its old triangles and the new parts; this is a faster alternative to full tree rebuild (but the tree after the update might be less efficient)

Parameters
meshsame mesh for which this tree was constructed, but after the splits
new2Oldmaps every new face (not present in the tree) to the face of this tree it was split from; it must contain only the splits made since the tree was built or last updated Generated from method MR::AABBTree::addSplitFaces.

Calls MR_AABBTree_addSplitFaces().

◆ assignFromAnother()

meshlib.AABBTree meshlib.AABBTree.assignFromAnother ( meshlib.AABBTree _other)

Generated from method MR::AABBTree::operator=. The reference to things referred to by the parameter _other (if any) might be preserved in this object. The reference to this object might be preserved in the return value.

Calls MR_AABBTree_AssignFromAnother().

◆ flipOrientation()

void meshlib.AABBTree.flipOrientation ( meshlib.FaceBitSet region)

changes the order of the vertices of the triangles of given faces (all if nullptr) as MeshTopology.flipOrientation() does; shall be called after MeshTopology.flipOrientation() if this tree is kept Generated from method MR::AABBTree::flipOrientation.

Calls MR_AABBTree_flipOrientation().

◆ getBoundingBox()

meshlib.Box3f meshlib.AABBTree.getBoundingBox ( )

returns the bounding box of the whole tree (empty for an empty tree) Generated from method MR::AABBTree::getBoundingBox.

Calls MR_AABBTree_getBoundingBox().

◆ getLeafOrder()

void meshlib.AABBTree.getLeafOrder ( meshlib.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 Generated from method MR::AABBTree::getLeafOrder.

Calls MR_AABBTree_getLeafOrder().

◆ getNodesFromFaces()

meshlib.NodeBitSet meshlib.AABBTree.getNodesFromFaces ( meshlib.FaceBitSet faces)

returns the nodes having at least one of given triangles in their subtrees Generated from method MR::AABBTree::getNodesFromFaces.

Calls MR_AABBTree_getNodesFromFaces().

◆ getSubtreeFaces()

meshlib.FaceBitSet meshlib.AABBTree.getSubtreeFaces ( meshlib.NodeId subtreeRoot)

returns all triangles in the subtree with given root Generated from method MR::AABBTree::getSubtreeFaces.

Calls MR_AABBTree_getSubtreeFaces().

◆ getSubtrees()

meshlib.std_vector_MR_NodeId meshlib.AABBTree.getSubtrees ( int minNum)

returns at least given number of top-level not-intersecting subtrees, union of which contain all tree leaves Generated from method MR::AABBTree::getSubtrees.

Calls MR_AABBTree_getSubtrees().

◆ heapBytes()

long meshlib.AABBTree.heapBytes ( )

returns the amount of memory this object occupies on heap Generated from method MR::AABBTree::heapBytes.

Calls MR_AABBTree_heapBytes().

◆ leafBoxes()

meshlib.Vector_MR_Box3f meshlib.AABBTree.leafBoxes ( )

the bounding boxes of the triangles in the order of leafTris(), slightly expanded for robust searches Generated from method MR::AABBTree::leafBoxes.

Calls MR_AABBTree_leafBoxes().

◆ leafTris()

meshlib.Vector_MR_AABBTreeWideLeafTri meshlib.AABBTree.leafTris ( )

triangles of all leaves, the triangles of each leaf are contiguous Generated from method MR::AABBTree::leafTris.

Calls MR_AABBTree_leafTris().

◆ MaxChildren()

int meshlib.AABBTree.MaxChildren ( )
static

Returns a pointer to a member variable of class MR::AABBTree named MaxChildren.

Calls MR_AABBTree_Get_MaxChildren().

◆ MaxDepth()

int meshlib.AABBTree.MaxDepth ( )
static

the deepest level of a node (the root is at 0): the stacks of the traversals are sized for it, and addSplitFaces rebuilds a deeper tree Returns a pointer to a member variable of class MR::AABBTree named MaxDepth.

Calls MR_AABBTree_Get_MaxDepth().

◆ MaxLeafTris()

int meshlib.AABBTree.MaxLeafTris ( )
static

Returns a pointer to a member variable of class MR::AABBTree named MaxLeafTris.

Calls MR_AABBTree_Get_MaxLeafTris().

◆ nodes()

the root is the first node, if any Generated from method MR::AABBTree::nodes.

Calls MR_AABBTree_nodes().

◆ refit()

void meshlib.AABBTree.refit ( meshlib.Mesh mesh,
meshlib.VertBitSet changedVerts )

updates the boxes of the triangles with changed vertices and of their ancestors; this is a faster alternative to full tree rebuild (but the tree after refit might be less efficient)

Parameters
meshsame mesh for which this tree was constructed but with updated coordinates;
changedVertsvertex ids with modified coordinates (since tree construction or last refit), nullptr means all vertices Generated from method MR::AABBTree::refit.

Calls MR_AABBTree_refit().

◆ renumber()

void meshlib.AABBTree.renumber ( meshlib.FaceBMap faceMap,
meshlib.VertBMap vertMap )

renumbers the triangles and their vertices after the mesh was packed with given maps from old to new ids Generated from method MR::AABBTree::renumber.

Calls MR_AABBTree_renumber().


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