Static Public Member Functions | |
| static auto | new () -> meshlib::Owned< meshlib::AABBTree > |
| static auto | construct_from_another (_other:meshlib::Owned< meshlib::AABBTree >) -> meshlib::Owned< meshlib::AABBTree > |
| static auto | construct (mp:&meshlib::MeshPart) -> meshlib::Owned< meshlib::AABBTree > |
| static auto | max_children () -> *const core::ffi::c_int |
| static auto | max_leaf_tris () -> *const core::ffi::c_int |
| static auto | max_depth () -> *const core::ffi::c_int |
| Static Public Member Functions inherited from meshlib::CppClass | |
| static void | destroy (ptr:*mut Self) |
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.
Generated from class MR::AABBTree. Heap-allocated instances are held in Owned<AABBTree>.
| void meshlib::AABBTree::add_split_faces | ( | mesh:&meshlib::Mesh | , |
| new2Old:&meshlib::phmap::phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId | ) |
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().
| auto meshlib::AABBTree::assign_from_another | ( | _other:meshlib::Owned< meshlib::AABBTree > | ) | -> &mut meshlib::AABBTree |
Generated from method MR::AABBTree::operator=.
Calls MR_AABBTree_AssignFromAnother(). 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.
|
static |
creates tree for given mesh or its part Generated from constructor MR::AABBTree::AABBTree.
Calls MR_AABBTree_Construct(). The reference to the parameter mp might be preserved in the constructed object.
|
static |
Generated from constructor MR::AABBTree::AABBTree.
Calls MR_AABBTree_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.
| void meshlib::AABBTree::flip_orientation | ( | region:Option<&meshlib::FaceBitSet > | ) |
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().
| auto meshlib::AABBTree::get_bounding_box | ( | ) | const -> meshlib::Box3f |
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::get_leaf_order | ( | faceMap:&mut meshlib::FaceBMap | ) | const |
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().
| auto meshlib::AABBTree::get_nodes_from_faces | ( | faces:&meshlib::FaceBitSet | ) | const -> meshlib::Owned< meshlib::NodeBitSet > |
returns the nodes having at least one of given triangles in their subtrees Generated from method MR::AABBTree::getNodesFromFaces.
Calls MR_AABBTree_getNodesFromFaces().
| auto meshlib::AABBTree::get_subtree_faces | ( | subtreeRoot:meshlib::NodeId | ) | const -> meshlib::Owned< meshlib::FaceBitSet > |
returns all triangles in the subtree with given root Generated from method MR::AABBTree::getSubtreeFaces.
Calls MR_AABBTree_getSubtreeFaces().
| auto meshlib::AABBTree::get_subtrees | ( | minNum:core::ffi::c_int | ) | const -> meshlib::Owned< meshlib::std_vector_MR_NodeId > |
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().
| auto meshlib::AABBTree::heap_bytes | ( | ) | const -> usize |
returns the amount of memory this object occupies on heap Generated from method MR::AABBTree::heapBytes.
Calls MR_AABBTree_heapBytes().
| auto meshlib::AABBTree::leaf_boxes | ( | ) | const -> &meshlib::Vector_MR_Box3f |
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().
| auto meshlib::AABBTree::leaf_tris | ( | ) | const -> &meshlib::Vector_MR_AABBTreeWideLeafTri |
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().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_AABBTree_DefaultConstruct().
| auto meshlib::AABBTree::nodes | ( | ) | const -> &meshlib::Vector_MR_AABBTreeWideNode_MR_NodeId |
the root is the first node, if any Generated from method MR::AABBTree::nodes.
Calls MR_AABBTree_nodes().
| void meshlib::AABBTree::refit | ( | mesh:&meshlib::Mesh | , |
| changedVerts:Option<&meshlib::VertBitSet > | ) |
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 | ( | faceMap:&meshlib::FaceBMap | , |
| vertMap:&meshlib::VertBMap | ) |
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().