MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::polyline_components Namespace Reference

Classes

struct  LargeByLengthComponentsSettings

Functions

auto get_num_components (topology:&meshlib::PolylineTopology) -> usize
auto get_component (topology:&meshlib::PolylineTopology, id:meshlib::UndirectedEdgeId) -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >
auto get_all_components_1 (topology:&meshlib::PolylineTopology) -> meshlib::Owned< meshlib::std_vector_MR_UndirectedEdgeBitSet >
auto get_all_components_2 (topology:&meshlib::PolylineTopology, maxComponentCount:core::ffi::c_int) -> meshlib::Owned< meshlib::std_pair_std_vector_MR_UndirectedEdgeBitSet_int >
auto get_n_large_by_length_components_mr_vector2f (polyline:&meshlib::Polyline2, settings:&meshlib::polyline_components::LargeByLengthComponentsSettings) -> meshlib::Owned< meshlib::std_vector_MR_UndirectedEdgeBitSet >
auto get_n_large_by_length_components_mr_vector3f (polyline:&meshlib::Polyline3, settings:&meshlib::polyline_components::LargeByLengthComponentsSettings) -> meshlib::Owned< meshlib::std_vector_MR_UndirectedEdgeBitSet >
auto get_union_find_structure (topology:&meshlib::PolylineTopology) -> meshlib::Owned< meshlib::UnionFind_MR_UndirectedEdgeId >
auto get_largest_component_mr_vector2f (polyline:&meshlib::Polyline2, minLength:Option< f32 >, numSmallerComponents:Option<&mut core::ffi::c_int >) -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >
auto get_largest_component_mr_vector3f (polyline:&meshlib::Polyline3, minLength:Option< f32 >, numSmallerComponents:Option<&mut core::ffi::c_int >) -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >

Function Documentation

◆ get_all_components_1()

auto meshlib::polyline_components::get_all_components_1 ( topology:&meshlib::PolylineTopology ) -> meshlib::Owned< meshlib::std_vector_MR_UndirectedEdgeBitSet >

gets all connected components of polyline topology

Note
be careful, if mesh is large enough and has many components, the memory overflow will occur Generated from function MR::PolylineComponents::getAllComponents.

Calls MR_PolylineComponents_getAllComponents_1().

◆ get_all_components_2()

auto meshlib::polyline_components::get_all_components_2 ( topology:&meshlib::PolylineTopology ,
maxComponentCount:core::ffi::c_int  ) -> meshlib::Owned< meshlib::std_pair_std_vector_MR_UndirectedEdgeBitSet_int >

gets all connected components of polyline topology

if components number more than the maxComponentCount, they will be combined into groups of the same size

Parameters
maxComponentCountshould be more than 1
Returns
pair components bitsets vector and number components in one group if components number more than maxComponentCount Generated from function MR::PolylineComponents::getAllComponents.

Calls MR_PolylineComponents_getAllComponents_2().

◆ get_component()

auto meshlib::polyline_components::get_component ( topology:&meshlib::PolylineTopology ,
id:meshlib::UndirectedEdgeId  ) -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >

returns one connected component containing given undirected edge id, not effective to call more than once, if several components are needed use getAllComponents Generated from function MR::PolylineComponents::getComponent.

Calls MR_PolylineComponents_getComponent().

◆ get_largest_component_mr_vector2f()

auto meshlib::polyline_components::get_largest_component_mr_vector2f ( polyline:&meshlib::Polyline2 ,
minLength:Option< f32 > ,
numSmallerComponents:Option<&mut core::ffi::c_int >  ) -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >

returns largest by length component Generated from function MR::PolylineComponents::getLargestComponent<MR::Vector2f>.

Calls MR_PolylineComponents_getLargestComponent_MR_Vector2f().

◆ get_largest_component_mr_vector3f()

auto meshlib::polyline_components::get_largest_component_mr_vector3f ( polyline:&meshlib::Polyline3 ,
minLength:Option< f32 > ,
numSmallerComponents:Option<&mut core::ffi::c_int >  ) -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >

returns largest by length component Generated from function MR::PolylineComponents::getLargestComponent<MR::Vector3f>.

Calls MR_PolylineComponents_getLargestComponent_MR_Vector3f().

◆ get_n_large_by_length_components_mr_vector2f()

auto meshlib::polyline_components::get_n_large_by_length_components_mr_vector2f ( polyline:&meshlib::Polyline2 ,
settings:&meshlib::polyline_components::LargeByLengthComponentsSettings  ) -> meshlib::Owned< meshlib::std_vector_MR_UndirectedEdgeBitSet >

returns requested number of largest by length connected components in descending by length order Generated from function MR::PolylineComponents::getNLargeByLengthComponents<MR::Vector2f>.

Calls MR_PolylineComponents_getNLargeByLengthComponents_MR_Vector2f().

◆ get_n_large_by_length_components_mr_vector3f()

auto meshlib::polyline_components::get_n_large_by_length_components_mr_vector3f ( polyline:&meshlib::Polyline3 ,
settings:&meshlib::polyline_components::LargeByLengthComponentsSettings  ) -> meshlib::Owned< meshlib::std_vector_MR_UndirectedEdgeBitSet >

returns requested number of largest by length connected components in descending by length order Generated from function MR::PolylineComponents::getNLargeByLengthComponents<MR::Vector3f>.

Calls MR_PolylineComponents_getNLargeByLengthComponents_MR_Vector3f().

◆ get_num_components()

auto meshlib::polyline_components::get_num_components ( topology:&meshlib::PolylineTopology ) -> usize

returns the number of connected components in polyline Generated from function MR::PolylineComponents::getNumComponents.

Calls MR_PolylineComponents_getNumComponents().

◆ get_union_find_structure()

auto meshlib::polyline_components::get_union_find_structure ( topology:&meshlib::PolylineTopology ) -> meshlib::Owned< meshlib::UnionFind_MR_UndirectedEdgeId >

gets union-find structure for given polyline Generated from function MR::PolylineComponents::getUnionFindStructure.

Calls MR_PolylineComponents_getUnionFindStructure().