Static Public Member Functions | |
| static auto | new () -> meshlib::Owned< meshlib::Polyline2 > |
| static auto | construct_from_another (_other:&meshlib::Polyline2) -> meshlib::Owned< meshlib::Polyline2 > |
| static auto | construct_1_std_vector_mr_vector2f (contour:&meshlib::std_vector_MR_Vector2f) -> meshlib::Owned< meshlib::Polyline2 > |
| static auto | construct_1_std_vector_std_vector_mr_vector2f (contours:&meshlib::std_vector_std_vector_MR_Vector2f) -> meshlib::Owned< meshlib::Polyline2 > |
| static auto | construct_2 (comp2firstVert:&meshlib::std_vector_MR_VertId, ps:&meshlib::VertCoords2) -> meshlib::Owned< meshlib::Polyline2 > |
| 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 |
polyline that stores points of type V Generated from class MR::Polyline2.
Generated from class MR::Polyline2. Heap-allocated instances are held in Owned<Polyline2>.
| auto meshlib::Polyline2::add_from_edge_path | ( | mesh:&meshlib::Mesh | , |
| path:&meshlib::std_vector_MR_EdgeId | ) -> meshlib::EdgeId |
adds path to this polyline
Calls MR_Polyline2_addFromEdgePath().
| auto meshlib::Polyline2::add_from_general_surface_path | ( | mesh:&meshlib::Mesh | , |
| start:&meshlib::MeshTriPoint | , | ||
| path:&meshlib::std_vector_MR_EdgePoint | , | ||
| end:&meshlib::MeshTriPoint | ) -> meshlib::EdgeId |
adds general path = start-path-end (where both start and end are optional) to this polyline
Calls MR_Polyline2_addFromGeneralSurfacePath().
| auto meshlib::Polyline2::add_from_points_2 | ( | vs:Option<&meshlib::Vector2f > | , |
| num:usize | ) -> meshlib::EdgeId |
adds connected line in this, passing progressively via points *[vs, vs+num)
if num > 2 && vs[0] == vs[num-1] then a closed line is created
Calls MR_Polyline2_addFromPoints_2().
| auto meshlib::Polyline2::add_from_points_3 | ( | vs:Option<&meshlib::Vector2f > | , |
| num:usize | , | ||
| closed:bool | ) -> meshlib::EdgeId |
adds connected line in this, passing progressively via points *[vs, vs+num)
if closed argument is true then the last and the first points will be additionally connected
Calls MR_Polyline2_addFromPoints_3().
| auto meshlib::Polyline2::add_from_surface_path | ( | mesh:&meshlib::Mesh | , |
| path:&meshlib::std_vector_MR_EdgePoint | ) -> meshlib::EdgeId |
adds path to this polyline
Calls MR_Polyline2_addFromSurfacePath().
| void meshlib::Polyline2::add_part | ( | from:&meshlib::Polyline2 | , |
| outVmap:Option<&mut meshlib::VertMap > | , | ||
| outEmap:Option<&mut meshlib::WholeEdgeMap > | ) |
appends polyline (from) in addition to this polyline: creates new edges, verts and points;
| outVmap,outEmap | (optionally) returns mappings: from.id -> this.id Generated from method MR::Polyline2::addPart. |
Calls MR_Polyline2_addPart().
| void meshlib::Polyline2::add_part_by_mask | ( | from:&meshlib::Polyline2 | , |
| mask:&meshlib::UndirectedEdgeBitSet | , | ||
| outVmap:Option<&mut meshlib::VertMap > | , | ||
| outEmap:Option<&mut meshlib::EdgeMap > | ) |
appends polyline (from) in addition to this polyline: creates new edges, verts and points Generated from method MR::Polyline2::addPartByMask.
Calls MR_Polyline2_addPartByMask().
| auto meshlib::Polyline2::assign_from_another | ( | _other:&meshlib::Polyline2 | ) | -> &mut meshlib::Polyline2 |
Generated from method MR::Polyline2::operator=.
Calls MR_Polyline2_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.
| auto meshlib::Polyline2::average_edge_length | ( | ) | const -> f32 |
returns average edge length in the polyline Generated from method MR::Polyline2::averageEdgeLength.
Calls MR_Polyline2_averageEdgeLength().
| auto meshlib::Polyline2::compute_bounding_box | ( | toWorld:Option<&meshlib::AffineXf2f > | ) | const -> meshlib::Box2f |
passes through all valid points and finds the minimal bounding box containing all of them
if toWorld transformation is given then returns minimal bounding box in world space Generated from method MR::Polyline2::computeBoundingBox.
Calls MR_Polyline2_computeBoundingBox().
|
static |
creates polyline from one contour (open or closed) Generated from constructor MR::Polyline2::Polyline2.
Calls MR_Polyline2_Construct_1_std_vector_MR_Vector2f(). The reference to the parameter contour might be preserved in the constructed object.
|
static |
creates polyline from several contours (each can be open or closed) Generated from constructor MR::Polyline2::Polyline2.
Calls MR_Polyline2_Construct_1_std_vector_std_vector_MR_Vector2f(). The reference to the parameter contours might be preserved in the constructed object.
|
static |
creates comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in
| comp2firstVert | defines vertex range of a polyline [a,b) |
| ps | point coordinates Generated from constructor MR::Polyline2::Polyline2. |
Calls MR_Polyline2_Construct_2(). The reference to the parameter comp2firstVert might be preserved in the constructed object. The reference to the parameter ps might be preserved in the constructed object.
|
static |
Generated from constructor MR::Polyline2::Polyline2.
Calls MR_Polyline2_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.
| auto meshlib::Polyline2::contours | ( | vertMap:Option<&mut meshlib::std_vector_std_vector_MR_VertId > | ) | const -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector2f > |
convert Polyline to simple contour structures with vector of points inside
if all even edges are consistently oriented, then the output contours will be oriented the same
| vertMap | optional output map for for each contour point to corresponding VertId Generated from method MR::Polyline2::contours. |
Calls MR_Polyline2_contours().
| auto meshlib::Polyline2::dest_pnt | ( | e:meshlib::EdgeId | ) | const -> meshlib::Vector2f |
returns coordinates of the edge destination Generated from method MR::Polyline2::destPnt.
Calls MR_Polyline2_destPnt().
| auto meshlib::Polyline2::edge_center | ( | e:meshlib::EdgeId | ) | const -> meshlib::Vector2f |
returns edge's centroid Generated from method MR::Polyline2::edgeCenter.
Calls MR_Polyline2_edgeCenter().
| auto meshlib::Polyline2::edge_length | ( | e:meshlib::EdgeId | ) | const -> f32 |
returns Euclidean length of the edge Generated from method MR::Polyline2::edgeLength.
Calls MR_Polyline2_edgeLength().
| auto meshlib::Polyline2::edge_length_sq | ( | e:meshlib::EdgeId | ) | const -> f32 |
returns squared Euclidean length of the edge (faster to compute than length) Generated from method MR::Polyline2::edgeLengthSq.
Calls MR_Polyline2_edgeLengthSq().
| auto meshlib::Polyline2::edge_point_1 | ( | ep:&meshlib::EdgePoint | ) | const -> meshlib::Vector2f |
computes coordinates of point given as edge and relative position on it Generated from method MR::Polyline2::edgePoint.
Calls MR_Polyline2_edgePoint_1().
| auto meshlib::Polyline2::edge_point_2 | ( | e:meshlib::EdgeId | , |
| f:f32 | ) const -> meshlib::Vector2f |
returns a point on the edge: origin point for f=0 and destination point for f=1 Generated from method MR::Polyline2::edgePoint.
Calls MR_Polyline2_edgePoint_2().
| auto meshlib::Polyline2::edge_segment | ( | e:meshlib::EdgeId | ) | const -> meshlib::Owned< meshlib::LineSegm2f > |
returns line segment of given edge Generated from method MR::Polyline2::edgeSegment.
Calls MR_Polyline2_edgeSegment().
| auto meshlib::Polyline2::edge_vector | ( | e:meshlib::EdgeId | ) | const -> meshlib::Vector2f |
returns vector equal to edge destination point minus edge origin point Generated from method MR::Polyline2::edgeVector.
Calls MR_Polyline2_edgeVector().
| auto meshlib::Polyline2::find_center_from_points | ( | ) | const -> meshlib::Vector2f |
computes average position of all valid polyline vertices Generated from method MR::Polyline2::findCenterFromPoints.
Calls MR_Polyline2_findCenterFromPoints().
| auto meshlib::Polyline2::get_aabb_tree | ( | ) | const -> &meshlib::AABBTreePolyline2 |
returns cached aabb-tree for this polyline, creating it if it did not exist in a thread-safe manner Generated from method MR::Polyline2::getAABBTree.
Calls MR_Polyline2_getAABBTree().
| auto meshlib::Polyline2::get_aabb_tree_not_create | ( | ) | const -> Option<&meshlib::AABBTreePolyline2 > |
returns cached aabb-tree for this polyline, but does not create it if it did not exist Generated from method MR::Polyline2::getAABBTreeNotCreate.
Calls MR_Polyline2_getAABBTreeNotCreate().
| auto meshlib::Polyline2::get_bounding_box | ( | ) | const -> meshlib::Box2f |
returns the minimal bounding box containing all valid vertices (implemented via getAABBTree()) Generated from method MR::Polyline2::getBoundingBox.
Calls MR_Polyline2_getBoundingBox().
| auto meshlib::Polyline2::heap_bytes | ( | ) | const -> usize |
returns the amount of memory this object occupies on heap Generated from method MR::Polyline2::heapBytes.
Calls MR_Polyline2_heapBytes().
| void meshlib::Polyline2::invalidate_caches | ( | ) |
Invalidates caches (e.g. aabb-tree) after a change in polyline Generated from method MR::Polyline2::invalidateCaches.
Calls MR_Polyline2_invalidateCaches().
| auto meshlib::Polyline2::loop_dir_area | ( | e:meshlib::EdgeId | ) | const -> meshlib::Vector3f |
calculates directed loop area if iterating in e direction .z = FLT_MAX if e does not represent a loop Generated from method MR::Polyline2::loopDirArea.
Calls MR_Polyline2_loopDirArea().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_Polyline2_DefaultConstruct().
| auto meshlib::Polyline2::org_pnt | ( | e:meshlib::EdgeId | ) | const -> meshlib::Vector2f |
returns coordinates of the edge origin Generated from method MR::Polyline2::orgPnt.
Calls MR_Polyline2_orgPnt().
| void meshlib::Polyline2::pack | ( | outVmap:Option<&mut meshlib::VertMap > | , |
| outEmap:Option<&mut meshlib::WholeEdgeMap > | ) |
tightly packs all arrays eliminating lone edges and invalid verts and points, optionally returns mappings: old.id -> new.id Generated from method MR::Polyline2::pack.
Calls MR_Polyline2_pack().
| auto meshlib::Polyline2::points | ( | ) | const -> &meshlib::VertCoords2 |
Returns a pointer to a member variable of class MR::Polyline2 named points.
Calls MR_Polyline2_Get_points(). The reference to this object might be preserved as the return value.
| auto meshlib::Polyline2::points_mut | ( | ) | -> &mut meshlib::VertCoords2 |
Returns a mutable pointer to a member variable of class MR::Polyline2 named points.
Calls MR_Polyline2_GetMutable_points(). The reference to this object might be preserved as the return value.
| void meshlib::Polyline2::set_points | ( | value:&meshlib::VertCoords2 | ) |
Modifies a member variable of class MR::Polyline2 named points.
Calls MR_Polyline2_Set_points(). The reference to the parameter value might be preserved in this object in element points.
| void meshlib::Polyline2::set_topology | ( | value:&meshlib::PolylineTopology | ) |
Modifies a member variable of class MR::Polyline2 named topology.
Calls MR_Polyline2_Set_topology(). The reference to the parameter value might be preserved in this object in element topology.
| auto meshlib::Polyline2::split_edge_1 | ( | e:meshlib::EdgeId | ) | -> meshlib::EdgeId |
same, but split given edge on two equal parts Generated from method MR::Polyline2::splitEdge.
Calls MR_Polyline2_splitEdge_1().
| auto meshlib::Polyline2::split_edge_2 | ( | e:meshlib::EdgeId | , |
| newVertPos:&meshlib::Vector2f | ) -> 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::Polyline2::splitEdge.
Calls MR_Polyline2_splitEdge_2().
| auto meshlib::Polyline2::to_edge_point_1 | ( | v:meshlib::VertId | ) | const -> meshlib::Owned< meshlib::EdgePoint > |
converts vertex into edge-point representation Generated from method MR::Polyline2::toEdgePoint.
Calls MR_Polyline2_toEdgePoint_1().
| auto meshlib::Polyline2::to_edge_point_2 | ( | e:meshlib::EdgeId | , |
| p:&meshlib::Vector2f | ) const -> meshlib::Owned< meshlib::EdgePoint > |
converts edge and point's coordinates into edge-point representation Generated from method MR::Polyline2::toEdgePoint.
Calls MR_Polyline2_toEdgePoint_2().
| auto meshlib::Polyline2::topology | ( | ) | const -> &meshlib::PolylineTopology |
Returns a pointer to a member variable of class MR::Polyline2 named topology.
Calls MR_Polyline2_Get_topology(). The reference to this object might be preserved as the return value.
| auto meshlib::Polyline2::topology_mut | ( | ) | -> &mut meshlib::PolylineTopology |
Returns a mutable pointer to a member variable of class MR::Polyline2 named topology.
Calls MR_Polyline2_GetMutable_topology(). The reference to this object might be preserved as the return value.
| auto meshlib::Polyline2::total_length | ( | ) | const -> f32 |
returns total length of the polyline Generated from method MR::Polyline2::totalLength.
Calls MR_Polyline2_totalLength().
| void meshlib::Polyline2::transform | ( | xf:&meshlib::AffineXf2f | ) |
applies given transformation to all valid polyline vertices Generated from method MR::Polyline2::transform.
Calls MR_Polyline2_transform().