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) | |
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.
| 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.
| meshlib.AABBTree.AABBTree | ( | ) |
Constructs an empty (default-constructed) instance.
Calls MR_AABBTree_DefaultConstruct().
| 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().
| 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().
| void meshlib.AABBTree.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 ) |
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)
| mesh | same mesh for which this tree was constructed, but after the splits |
| new2Old | maps 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| long meshlib.AABBTree.heapBytes | ( | ) |
returns the amount of memory this object occupies on heap Generated from method MR::AABBTree::heapBytes.
Calls MR_AABBTree_heapBytes().
| 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().
| 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().
|
static |
Returns a pointer to a member variable of class MR::AABBTree named MaxChildren.
Calls MR_AABBTree_Get_MaxChildren().
|
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().
|
static |
Returns a pointer to a member variable of class MR::AABBTree named MaxLeafTris.
Calls MR_AABBTree_Get_MaxLeafTris().
| meshlib.Vector_MR_AABBTreeWideNode_MR_NodeId meshlib.AABBTree.nodes | ( | ) |
the root is the first node, if any Generated from method MR::AABBTree::nodes.
Calls MR_AABBTree_nodes().
| 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)
| mesh | same mesh for which this tree was constructed but with updated coordinates; |
| changedVerts | vertex ids with modified coordinates (since tree construction or last refit), nullptr means all vertices Generated from method MR::AABBTree::refit. |
Calls MR_AABBTree_refit().
| 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().