Public Member Functions | |
| auto | assign_from_another (_other:&meshlib::PolylineTopology) -> &mut meshlib::PolylineTopology |
| void | build_open_lines (comp2firstVert:&meshlib::std_vector_MR_VertId) |
| auto | make_edge_0 () -> meshlib::EdgeId |
| auto | make_edge_3 (a:meshlib::VertId, b:meshlib::VertId, e:Option<&meshlib::EdgeId >) -> meshlib::EdgeId |
| auto | make_edges (edges:&meshlib::Edges) -> core::ffi::c_int |
| auto | is_lone_edge (a:meshlib::EdgeId) const -> bool |
| auto | last_not_lone_undirected_edge () const -> meshlib::UndirectedEdgeId |
| auto | last_not_lone_edge () const -> meshlib::EdgeId |
| auto | edge_size () const -> usize |
| auto | edge_capacity () const -> usize |
| auto | undirected_edge_size () const -> usize |
| auto | undirected_edge_capacity () const -> usize |
| auto | compute_not_lone_undirected_edges () const -> usize |
| void | edge_reserve (newCapacity:usize) |
| auto | has_edge (e:meshlib::EdgeId) const -> bool |
| void | delete_edge (ue:meshlib::UndirectedEdgeId) |
| void | delete_edges (es:&meshlib::UndirectedEdgeBitSet) |
| auto | heap_bytes () const -> usize |
| void | splice (a:meshlib::EdgeId, b:meshlib::EdgeId) |
| auto | next (he:meshlib::EdgeId) const -> meshlib::EdgeId |
| auto | org (he:meshlib::EdgeId) const -> meshlib::VertId |
| auto | dest (he:meshlib::EdgeId) const -> meshlib::VertId |
| void | set_org (a:meshlib::EdgeId, v:meshlib::VertId) |
| auto | edge_per_vertex () const -> &meshlib::Vector_MR_EdgeId_MR_VertId |
| auto | get_orgs () const -> meshlib::Owned< meshlib::Vector_MR_VertId_MR_EdgeId > |
| auto | edge_with_org (a:meshlib::VertId) const -> meshlib::EdgeId |
| auto | has_vert (a:meshlib::VertId) const -> bool |
| auto | get_vert_degree (a:meshlib::VertId) const -> core::ffi::c_int |
| auto | num_valid_verts () const -> core::ffi::c_int |
| auto | last_valid_vert () const -> meshlib::VertId |
| auto | add_vert_id () -> meshlib::VertId |
| void | vert_resize (newSize:usize) |
| void | vert_resize_with_reserve (newSize:usize) |
| void | vert_reserve (newCapacity:usize) |
| auto | vert_size () const -> usize |
| auto | vert_capacity () const -> usize |
| auto | get_valid_verts () const -> &meshlib::VertBitSet |
| auto | get_vert_ids (region:Option<&meshlib::VertBitSet >) const -> &meshlib::VertBitSet |
| auto | find_edge (o:meshlib::VertId, d:meshlib::VertId) const -> meshlib::EdgeId |
| auto | get_path_vertices (path:&meshlib::std_vector_MR_EdgeId) const -> meshlib::Owned< meshlib::VertBitSet > |
| auto | split_edge (e:meshlib::EdgeId) -> meshlib::EdgeId |
| auto | make_polyline (vs:Option<&meshlib::VertId >, num:usize) -> meshlib::EdgeId |
| void | add_part (from:&meshlib::PolylineTopology, outVmap:Option<&mut meshlib::VertMap >, outEmap:Option<&mut meshlib::WholeEdgeMap >) |
| void | add_part_by_mask (from:&meshlib::PolylineTopology, mask:&meshlib::UndirectedEdgeBitSet, outVmap:Option<&mut meshlib::VertMap >, outEmap:Option<&mut meshlib::EdgeMap >) |
| void | pack (outVmap:Option<&mut meshlib::VertMap >, outEmap:Option<&mut meshlib::WholeEdgeMap >) |
| void | write (s:&mut meshlib::std_ostream) const |
| auto | read (s:&mut meshlib::std_istream) -> bool |
| auto | op_equal (b:&meshlib::PolylineTopology) const -> bool |
| auto | op_not_equal (b:&meshlib::PolylineTopology) const -> bool |
| auto | is_consistently_oriented () const -> bool |
| void | flip () |
| auto | check_validity () const -> bool |
| void | compute_valids_from_edges () |
| auto | is_closed () const -> bool |
Static Public Member Functions | |
| static auto | new () -> meshlib::Owned< meshlib::PolylineTopology > |
| static auto | construct_from_another (_other:&meshlib::PolylineTopology) -> meshlib::Owned< meshlib::PolylineTopology > |
| Static Public Member Functions inherited from meshlib::CppClass | |
| static void | destroy (ptr:*mut Self) |
| Static Public Member Functions inherited from meshlib::CppCopy | |
| static auto | copy (ptr:*const Self) -> *mut Self |
topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines Generated from class MR::PolylineTopology.
Generated from class MR::PolylineTopology. Heap-allocated instances are held in Owned<PolylineTopology>.
| void meshlib::PolylineTopology::add_part | ( | from:&meshlib::PolylineTopology | , |
| outVmap:Option<&mut meshlib::VertMap > | , | ||
| outEmap:Option<&mut meshlib::WholeEdgeMap > | ) |
appends polyline topology (from) in addition to the current topology: creates new edges, verts;
| outVmap,outEmap | (optionally) returns mappings: from.id -> this.id Generated from method MR::PolylineTopology::addPart. |
Calls MR_PolylineTopology_addPart().
| void meshlib::PolylineTopology::add_part_by_mask | ( | from:&meshlib::PolylineTopology | , |
| mask:&meshlib::UndirectedEdgeBitSet | , | ||
| outVmap:Option<&mut meshlib::VertMap > | , | ||
| outEmap:Option<&mut meshlib::EdgeMap > | ) |
appends polyline topology (from) in addition to the current topology: creates new edges, verts; Generated from method MR::PolylineTopology::addPartByMask.
Calls MR_PolylineTopology_addPartByMask().
| auto meshlib::PolylineTopology::add_vert_id | ( | ) | -> meshlib::VertId |
creates new vert-id not associated with any edge yet Generated from method MR::PolylineTopology::addVertId.
Calls MR_PolylineTopology_addVertId().
| auto meshlib::PolylineTopology::assign_from_another | ( | _other:&meshlib::PolylineTopology | ) | -> &mut meshlib::PolylineTopology |
Generated from method MR::PolylineTopology::operator=.
Calls MR_PolylineTopology_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.
| void meshlib::PolylineTopology::build_open_lines | ( | comp2firstVert:&meshlib::std_vector_MR_VertId | ) |
build topology of comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in
| comp2firstVert | defines vertex range of a polyline [a,b) Generated from method MR::PolylineTopology::buildOpenLines. |
Calls MR_PolylineTopology_buildOpenLines().
| auto meshlib::PolylineTopology::check_validity | ( | ) | const -> bool |
verifies that all internal data structures are valid Generated from method MR::PolylineTopology::checkValidity.
Calls MR_PolylineTopology_checkValidity().
| auto meshlib::PolylineTopology::compute_not_lone_undirected_edges | ( | ) | const -> usize |
computes the number of not-lone (valid) undirected edges Generated from method MR::PolylineTopology::computeNotLoneUndirectedEdges.
Calls MR_PolylineTopology_computeNotLoneUndirectedEdges().
| void meshlib::PolylineTopology::compute_valids_from_edges | ( | ) |
computes numValidVerts_ and validVerts_ from edgePerVertex_ Generated from method MR::PolylineTopology::computeValidsFromEdges.
Calls MR_PolylineTopology_computeValidsFromEdges().
|
static |
Generated from constructor MR::PolylineTopology::PolylineTopology.
Calls MR_PolylineTopology_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.
| void meshlib::PolylineTopology::delete_edge | ( | ue:meshlib::UndirectedEdgeId | ) |
given edge becomes lone after the call, so it is un-spliced from connected edges, and if it was not connected at origin or destination, then that vertex is deleted as well Generated from method MR::PolylineTopology::deleteEdge.
Calls MR_PolylineTopology_deleteEdge().
| void meshlib::PolylineTopology::delete_edges | ( | es:&meshlib::UndirectedEdgeBitSet | ) |
calls deleteEdge for every set bit Generated from method MR::PolylineTopology::deleteEdges.
Calls MR_PolylineTopology_deleteEdges().
| auto meshlib::PolylineTopology::dest | ( | he:meshlib::EdgeId | ) | const -> meshlib::VertId |
returns destination vertex of half-edge Generated from method MR::PolylineTopology::dest.
Calls MR_PolylineTopology_dest().
| auto meshlib::PolylineTopology::edge_capacity | ( | ) | const -> usize |
returns the number of allocated edge records Generated from method MR::PolylineTopology::edgeCapacity.
Calls MR_PolylineTopology_edgeCapacity().
| auto meshlib::PolylineTopology::edge_per_vertex | ( | ) | const -> &meshlib::Vector_MR_EdgeId_MR_VertId |
for all valid vertices this vector contains an edge with the origin there Generated from method MR::PolylineTopology::edgePerVertex.
Calls MR_PolylineTopology_edgePerVertex().
| void meshlib::PolylineTopology::edge_reserve | ( | newCapacity:usize | ) |
sets the capacity of half-edges vector Generated from method MR::PolylineTopology::edgeReserve.
Calls MR_PolylineTopology_edgeReserve().
| auto meshlib::PolylineTopology::edge_size | ( | ) | const -> usize |
returns the number of half-edge records including lone ones Generated from method MR::PolylineTopology::edgeSize.
Calls MR_PolylineTopology_edgeSize().
| auto meshlib::PolylineTopology::edge_with_org | ( | a:meshlib::VertId | ) | const -> meshlib::EdgeId |
returns valid edge if given vertex is present in the mesh Generated from method MR::PolylineTopology::edgeWithOrg.
Calls MR_PolylineTopology_edgeWithOrg().
| auto meshlib::PolylineTopology::find_edge | ( | o:meshlib::VertId | , |
| d:meshlib::VertId | ) const -> meshlib::EdgeId |
finds and returns edge from o to d in the mesh; returns invalid edge otherwise Generated from method MR::PolylineTopology::findEdge.
Calls MR_PolylineTopology_findEdge().
| void meshlib::PolylineTopology::flip | ( | ) |
changes the orientation of all edges: every edge e is replaced with e.sym() Generated from method MR::PolylineTopology::flip.
Calls MR_PolylineTopology_flip().
| auto meshlib::PolylineTopology::get_orgs | ( | ) | const -> meshlib::Owned< meshlib::Vector_MR_VertId_MR_EdgeId > |
for all edges this vector contains its origin Generated from method MR::PolylineTopology::getOrgs.
Calls MR_PolylineTopology_getOrgs().
| auto meshlib::PolylineTopology::get_path_vertices | ( | path:&meshlib::std_vector_MR_EdgeId | ) | const -> meshlib::Owned< meshlib::VertBitSet > |
returns all vertices incident to path edges Generated from method MR::PolylineTopology::getPathVertices.
Calls MR_PolylineTopology_getPathVertices().
| auto meshlib::PolylineTopology::get_valid_verts | ( | ) | const -> &meshlib::VertBitSet |
returns cached set of all valid vertices Generated from method MR::PolylineTopology::getValidVerts.
Calls MR_PolylineTopology_getValidVerts().
| auto meshlib::PolylineTopology::get_vert_degree | ( | a:meshlib::VertId | ) | const -> core::ffi::c_int |
returns 0 if given vertex does not exist, 1 if it has one incident edge, and 2 if it has two incident edges Generated from method MR::PolylineTopology::getVertDegree.
Calls MR_PolylineTopology_getVertDegree().
| auto meshlib::PolylineTopology::get_vert_ids | ( | region:Option<&meshlib::VertBitSet > | ) | const -> &meshlib::VertBitSet |
if region pointer is not null then converts it in reference, otherwise returns all valid vertices in the mesh Generated from method MR::PolylineTopology::getVertIds.
Calls MR_PolylineTopology_getVertIds().
| auto meshlib::PolylineTopology::has_edge | ( | e:meshlib::EdgeId | ) | const -> bool |
returns true if given edge is within valid range and not-lone Generated from method MR::PolylineTopology::hasEdge.
Calls MR_PolylineTopology_hasEdge().
| auto meshlib::PolylineTopology::has_vert | ( | a:meshlib::VertId | ) | const -> bool |
returns true if given vertex is present in the mesh Generated from method MR::PolylineTopology::hasVert.
Calls MR_PolylineTopology_hasVert().
| auto meshlib::PolylineTopology::heap_bytes | ( | ) | const -> usize |
returns the amount of memory this object occupies on heap Generated from method MR::PolylineTopology::heapBytes.
Calls MR_PolylineTopology_heapBytes().
| auto meshlib::PolylineTopology::is_closed | ( | ) | const -> bool |
returns true if the polyline does not have any holes Generated from method MR::PolylineTopology::isClosed.
Calls MR_PolylineTopology_isClosed().
| auto meshlib::PolylineTopology::is_consistently_oriented | ( | ) | const -> bool |
returns true if for each edge e: e == e.next() || e.odd() == next( e ).sym().odd() Generated from method MR::PolylineTopology::isConsistentlyOriented.
Calls MR_PolylineTopology_isConsistentlyOriented().
| auto meshlib::PolylineTopology::is_lone_edge | ( | a:meshlib::EdgeId | ) | const -> bool |
checks whether the edge is disconnected from all other edges and disassociated from all vertices (as if after makeEdge) Generated from method MR::PolylineTopology::isLoneEdge.
Calls MR_PolylineTopology_isLoneEdge().
| auto meshlib::PolylineTopology::last_not_lone_edge | ( | ) | const -> meshlib::EdgeId |
returns last not lone edge id, or invalid id if no such edge exists Generated from method MR::PolylineTopology::lastNotLoneEdge.
Calls MR_PolylineTopology_lastNotLoneEdge().
| auto meshlib::PolylineTopology::last_not_lone_undirected_edge | ( | ) | const -> meshlib::UndirectedEdgeId |
returns last not lone undirected edge id, or invalid id if no such edge exists Generated from method MR::PolylineTopology::lastNotLoneUndirectedEdge.
Calls MR_PolylineTopology_lastNotLoneUndirectedEdge().
| auto meshlib::PolylineTopology::last_valid_vert | ( | ) | const -> meshlib::VertId |
returns last valid vertex id, or invalid id if no single valid vertex exists Generated from method MR::PolylineTopology::lastValidVert.
Calls MR_PolylineTopology_lastValidVert().
| auto meshlib::PolylineTopology::make_edge_0 | ( | ) | -> meshlib::EdgeId |
creates an edge not associated with any vertex Generated from method MR::PolylineTopology::makeEdge.
Calls MR_PolylineTopology_makeEdge_0().
| auto meshlib::PolylineTopology::make_edge_3 | ( | a:meshlib::VertId | , |
| b:meshlib::VertId | , | ||
| e:Option<&meshlib::EdgeId > | ) -> meshlib::EdgeId |
makes an edge connecting vertices a and b
| e | if valid then the function does not make new edge, but connects the vertices using given one (and returns it) |
if 1) any of the vertices is invalid or not within the vertSize(), 2) or a==b, 3) or either a or b already has 2 incident edges, 4) given edge e is not lone or not within the edgeSize() then makeEdge(a,b) does nothing and returns invalid edge Generated from method MR::PolylineTopology::makeEdge.
Calls MR_PolylineTopology_makeEdge_3().
| auto meshlib::PolylineTopology::make_edges | ( | edges:&meshlib::Edges | ) | -> core::ffi::c_int |
for every given edge[ue] calls makeEdge( edge[ue][0], edge[ue][1], ue ), making new edges so that edges.size() <= undirectedEdgeSize() at the end
Calls MR_PolylineTopology_makeEdges().
| auto meshlib::PolylineTopology::make_polyline | ( | vs:Option<&meshlib::VertId > | , |
| num:usize | ) -> meshlib::EdgeId |
adds polyline in this topology passing progressively via vertices *[vs, vs+num); if vs[0] == vs[num-1] then a closed polyline is created; return the edge from first to second vertex Generated from method MR::PolylineTopology::makePolyline.
Calls MR_PolylineTopology_makePolyline().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_PolylineTopology_DefaultConstruct().
| auto meshlib::PolylineTopology::next | ( | he:meshlib::EdgeId | ) | const -> meshlib::EdgeId |
next (counter clock wise) half-edge in the origin ring Generated from method MR::PolylineTopology::next.
Calls MR_PolylineTopology_next().
| auto meshlib::PolylineTopology::num_valid_verts | ( | ) | const -> core::ffi::c_int |
returns the number of valid vertices Generated from method MR::PolylineTopology::numValidVerts.
Calls MR_PolylineTopology_numValidVerts().
| auto meshlib::PolylineTopology::op_equal | ( | b:&meshlib::PolylineTopology | ) | const -> bool |
comparison via edges (all other members are considered as not important caches) Generated from method MR::PolylineTopology::operator==.
Calls MR_equal_MR_PolylineTopology().
| auto meshlib::PolylineTopology::op_not_equal | ( | b:&meshlib::PolylineTopology | ) | const -> bool |
Generated from method MR::PolylineTopology::operator!=.
Calls MR_not_equal_MR_PolylineTopology().
| auto meshlib::PolylineTopology::org | ( | he:meshlib::EdgeId | ) | const -> meshlib::VertId |
returns origin vertex of half-edge Generated from method MR::PolylineTopology::org.
Calls MR_PolylineTopology_org().
| void meshlib::PolylineTopology::pack | ( | outVmap:Option<&mut meshlib::VertMap > | , |
| outEmap:Option<&mut meshlib::WholeEdgeMap > | ) |
tightly packs all arrays eliminating lone edges and invalid vertices
| outVmap,outEmap | if given returns mappings: old.id -> new.id; Generated from method MR::PolylineTopology::pack. |
Calls MR_PolylineTopology_pack().
| auto meshlib::PolylineTopology::read | ( | s:&mut meshlib::std_istream | ) | -> bool |
loads this from binary stream Generated from method MR::PolylineTopology::read.
Calls MR_PolylineTopology_read().
| void meshlib::PolylineTopology::set_org | ( | a:meshlib::EdgeId | , |
| v:meshlib::VertId | ) |
sets new origin to the full origin ring including this edge
edgePerVertex_ table is updated accordingly Generated from method MR::PolylineTopology::setOrg.
Calls MR_PolylineTopology_setOrg().
| void meshlib::PolylineTopology::splice | ( | a:meshlib::EdgeId | , |
| b:meshlib::EdgeId | ) |
given two half edges do either of two:
1) if a and b were from distinct rings, puts them in one ring;
2) if a and b were from the same ring, puts them in separate rings;
the cut in rings in both cases is made after a and b Generated from method MR::PolylineTopology::splice.
Calls MR_PolylineTopology_splice().
| auto meshlib::PolylineTopology::split_edge | ( | e:meshlib::EdgeId | ) | -> meshlib::EdgeId |
split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split) Generated from method MR::PolylineTopology::splitEdge.
Calls MR_PolylineTopology_splitEdge().
| auto meshlib::PolylineTopology::undirected_edge_capacity | ( | ) | const -> usize |
returns the number of allocated undirected edges (pairs of half-edges) Generated from method MR::PolylineTopology::undirectedEdgeCapacity.
Calls MR_PolylineTopology_undirectedEdgeCapacity().
| auto meshlib::PolylineTopology::undirected_edge_size | ( | ) | const -> usize |
returns the number of undirected edges (pairs of half-edges) including lone ones Generated from method MR::PolylineTopology::undirectedEdgeSize.
Calls MR_PolylineTopology_undirectedEdgeSize().
| auto meshlib::PolylineTopology::vert_capacity | ( | ) | const -> usize |
returns the number of allocated vert records Generated from method MR::PolylineTopology::vertCapacity.
Calls MR_PolylineTopology_vertCapacity().
| void meshlib::PolylineTopology::vert_reserve | ( | newCapacity:usize | ) |
sets the capacity of vertices vector Generated from method MR::PolylineTopology::vertReserve.
Calls MR_PolylineTopology_vertReserve().
| void meshlib::PolylineTopology::vert_resize | ( | newSize:usize | ) |
explicitly increases the size of vertices vector Generated from method MR::PolylineTopology::vertResize.
Calls MR_PolylineTopology_vertResize().
| void meshlib::PolylineTopology::vert_resize_with_reserve | ( | newSize:usize | ) |
explicitly increases the size of vertices vector, doubling the current capacity if it was not enough Generated from method MR::PolylineTopology::vertResizeWithReserve.
Calls MR_PolylineTopology_vertResizeWithReserve().
| auto meshlib::PolylineTopology::vert_size | ( | ) | const -> usize |
returns the number of vertex records including invalid ones Generated from method MR::PolylineTopology::vertSize.
Calls MR_PolylineTopology_vertSize().
| void meshlib::PolylineTopology::write | ( | s:&mut meshlib::std_ostream | ) | const |
saves this in binary stream Generated from method MR::PolylineTopology::write.
Calls MR_PolylineTopology_write().