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

Public Member Functions

auto assign_from_another (_other:meshlib::Owned< meshlib::AABBTree >) -> &mut meshlib::AABBTree
auto nodes () const -> &meshlib::Vector_MR_AABBTreeWideNode_MR_NodeId
auto get_bounding_box () const -> meshlib::Box3f
auto leaf_tris () const -> &meshlib::Vector_MR_AABBTreeWideLeafTri
auto leaf_boxes () const -> &meshlib::Vector_MR_Box3f
auto heap_bytes () const -> usize
auto get_subtrees (minNum:core::ffi::c_int) const -> meshlib::Owned< meshlib::std_vector_MR_NodeId >
auto get_subtree_faces (subtreeRoot:meshlib::NodeId) const -> meshlib::Owned< meshlib::FaceBitSet >
auto get_nodes_from_faces (faces:&meshlib::FaceBitSet) const -> meshlib::Owned< meshlib::NodeBitSet >
void get_leaf_order (faceMap:&mut meshlib::FaceBMap) const
void renumber (faceMap:&meshlib::FaceBMap, vertMap:&meshlib::VertBMap)
void flip_orientation (region:Option<&meshlib::FaceBitSet >)
void refit (mesh:&meshlib::Mesh, changedVerts:Option<&meshlib::VertBitSet >)
void 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)

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)

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.

Generated from class MR::AABBTree. Heap-allocated instances are held in Owned<AABBTree>.

Member Function Documentation

◆ add_split_faces()

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().

◆ assign_from_another()

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.

◆ construct()

auto meshlib::AABBTree::construct ( mp:&meshlib::MeshPart ) -> meshlib::Owned< meshlib::AABBTree >
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.

◆ construct_from_another()

auto meshlib::AABBTree::construct_from_another ( _other:meshlib::Owned< meshlib::AABBTree > ) -> meshlib::Owned< meshlib::AABBTree >
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.

◆ flip_orientation()

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().

◆ get_bounding_box()

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().

◆ get_leaf_order()

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().

◆ get_nodes_from_faces()

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().

◆ get_subtree_faces()

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().

◆ get_subtrees()

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().

◆ heap_bytes()

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().

◆ leaf_boxes()

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().

◆ leaf_tris()

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().

◆ max_children()

auto meshlib::AABBTree::max_children ( ) -> *const core::ffi::c_int
static

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

Calls MR_AABBTree_Get_MaxChildren().

◆ max_depth()

auto meshlib::AABBTree::max_depth ( ) -> *const core::ffi::c_int
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().

◆ max_leaf_tris()

auto meshlib::AABBTree::max_leaf_tris ( ) -> *const core::ffi::c_int
static

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

Calls MR_AABBTree_Get_MaxLeafTris().

◆ new()

auto meshlib::AABBTree::new ( ) -> meshlib::Owned< meshlib::AABBTree >
static

Constructs an empty (default-constructed) instance.

Calls MR_AABBTree_DefaultConstruct().

◆ nodes()

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().

◆ refit()

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)

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 ( 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().


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