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

Public Member Functions

auto assign_from_another (_other:&meshlib::Polyline3) -> &mut meshlib::Polyline3
auto add_from_points_3 (vs:Option<&meshlib::Vector3f >, num:usize, closed:bool) -> meshlib::EdgeId
auto add_from_points_2 (vs:Option<&meshlib::Vector3f >, num:usize) -> meshlib::EdgeId
void add_part (from:&meshlib::Polyline3, outVmap:Option<&mut meshlib::VertMap >, outEmap:Option<&mut meshlib::WholeEdgeMap >)
void add_part_by_mask (from:&meshlib::Polyline3, 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 >)
auto org_pnt (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto dest_pnt (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto edge_point_2 (e:meshlib::EdgeId, f:f32) const -> meshlib::Vector3f
auto edge_point_1 (ep:&meshlib::EdgePoint) const -> meshlib::Vector3f
auto edge_center (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto edge_vector (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto edge_segment (e:meshlib::EdgeId) const -> meshlib::Owned< meshlib::LineSegm3f >
auto to_edge_point_1 (v:meshlib::VertId) const -> meshlib::Owned< meshlib::EdgePoint >
auto to_edge_point_2 (e:meshlib::EdgeId, p:&meshlib::Vector3f) const -> meshlib::Owned< meshlib::EdgePoint >
auto edge_length (e:meshlib::EdgeId) const -> f32
auto edge_length_sq (e:meshlib::EdgeId) const -> f32
auto loop_dir_area (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto total_length () const -> f32
auto average_edge_length () const -> f32
auto get_aabb_tree () const -> &meshlib::AABBTreePolyline3
auto get_aabb_tree_not_create () const -> Option<&meshlib::AABBTreePolyline3 >
auto get_bounding_box () const -> meshlib::Box3f
auto compute_bounding_box (toWorld:Option<&meshlib::AffineXf3f >) const -> meshlib::Box3f
auto find_center_from_points () const -> meshlib::Vector3f
void transform (xf:&meshlib::AffineXf3f)
auto split_edge_2 (e:meshlib::EdgeId, newVertPos:&meshlib::Vector3f) -> meshlib::EdgeId
auto split_edge_1 (e:meshlib::EdgeId) -> meshlib::EdgeId
void invalidate_caches ()
auto contours (vertMap:Option<&mut meshlib::std_vector_std_vector_MR_VertId >) const -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector3f >
auto add_from_edge_path (mesh:&meshlib::Mesh, path:&meshlib::std_vector_MR_EdgeId) -> meshlib::EdgeId
auto add_from_surface_path (mesh:&meshlib::Mesh, path:&meshlib::std_vector_MR_EdgePoint) -> meshlib::EdgeId
auto add_from_general_surface_path (mesh:&meshlib::Mesh, start:&meshlib::MeshTriPoint, path:&meshlib::std_vector_MR_EdgePoint, end:&meshlib::MeshTriPoint) -> meshlib::EdgeId
auto heap_bytes () const -> usize
auto topology () const -> &meshlib::PolylineTopology
auto topology_mut () -> &mut meshlib::PolylineTopology
void set_topology (value:&meshlib::PolylineTopology)
auto points () const -> &meshlib::VertCoords
auto points_mut () -> &mut meshlib::VertCoords
void set_points (value:&meshlib::VertCoords)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::Polyline3 >
static auto construct_from_another (_other:&meshlib::Polyline3) -> meshlib::Owned< meshlib::Polyline3 >
static auto construct_1_std_vector_mr_vector3f (contour:&meshlib::std_vector_MR_Vector3f) -> meshlib::Owned< meshlib::Polyline3 >
static auto construct_1_std_vector_std_vector_mr_vector3f (contours:&meshlib::std_vector_std_vector_MR_Vector3f) -> meshlib::Owned< meshlib::Polyline3 >
static auto construct_2 (comp2firstVert:&meshlib::std_vector_MR_VertId, ps:&meshlib::VertCoords) -> meshlib::Owned< meshlib::Polyline3 >
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

Detailed Description

polyline that stores points of type V Generated from class MR::Polyline3.

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

Member Function Documentation

◆ add_from_edge_path()

auto meshlib::Polyline3::add_from_edge_path ( mesh:&meshlib::Mesh ,
path:&meshlib::std_vector_MR_EdgeId  ) -> meshlib::EdgeId

adds path to this polyline

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromEdgePath.

Calls MR_Polyline3_addFromEdgePath().

◆ add_from_general_surface_path()

auto meshlib::Polyline3::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

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromGeneralSurfacePath.

Calls MR_Polyline3_addFromGeneralSurfacePath().

◆ add_from_points_2()

auto meshlib::Polyline3::add_from_points_2 ( vs:Option<&meshlib::Vector3f > ,
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

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromPoints.

Calls MR_Polyline3_addFromPoints_2().

◆ add_from_points_3()

auto meshlib::Polyline3::add_from_points_3 ( vs:Option<&meshlib::Vector3f > ,
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

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromPoints.

Calls MR_Polyline3_addFromPoints_3().

◆ add_from_surface_path()

auto meshlib::Polyline3::add_from_surface_path ( mesh:&meshlib::Mesh ,
path:&meshlib::std_vector_MR_EdgePoint  ) -> meshlib::EdgeId

adds path to this polyline

Returns
the edge from first new to second new vertex Generated from method MR::Polyline3::addFromSurfacePath.

Calls MR_Polyline3_addFromSurfacePath().

◆ add_part()

void meshlib::Polyline3::add_part ( from:&meshlib::Polyline3 ,
outVmap:Option<&mut meshlib::VertMap > ,
outEmap:Option<&mut meshlib::WholeEdgeMap >  )

appends polyline (from) in addition to this polyline: creates new edges, verts and points;

Parameters
outVmap,outEmap(optionally) returns mappings: from.id -> this.id Generated from method MR::Polyline3::addPart.

Calls MR_Polyline3_addPart().

◆ add_part_by_mask()

void meshlib::Polyline3::add_part_by_mask ( from:&meshlib::Polyline3 ,
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::Polyline3::addPartByMask.

Calls MR_Polyline3_addPartByMask().

◆ assign_from_another()

auto meshlib::Polyline3::assign_from_another ( _other:&meshlib::Polyline3 ) -> &mut meshlib::Polyline3

Generated from method MR::Polyline3::operator=.

Calls MR_Polyline3_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.

◆ average_edge_length()

auto meshlib::Polyline3::average_edge_length ( ) const -> f32

returns average edge length in the polyline Generated from method MR::Polyline3::averageEdgeLength.

Calls MR_Polyline3_averageEdgeLength().

◆ compute_bounding_box()

auto meshlib::Polyline3::compute_bounding_box ( toWorld:Option<&meshlib::AffineXf3f > ) const -> meshlib::Box3f

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::Polyline3::computeBoundingBox.

Calls MR_Polyline3_computeBoundingBox().

◆ construct_1_std_vector_mr_vector3f()

auto meshlib::Polyline3::construct_1_std_vector_mr_vector3f ( contour:&meshlib::std_vector_MR_Vector3f ) -> meshlib::Owned< meshlib::Polyline3 >
static

creates polyline from one contour (open or closed) Generated from constructor MR::Polyline3::Polyline3.

Calls MR_Polyline3_Construct_1_std_vector_MR_Vector3f(). The reference to the parameter contour might be preserved in the constructed object.

◆ construct_1_std_vector_std_vector_mr_vector3f()

auto meshlib::Polyline3::construct_1_std_vector_std_vector_mr_vector3f ( contours:&meshlib::std_vector_std_vector_MR_Vector3f ) -> meshlib::Owned< meshlib::Polyline3 >
static

creates polyline from several contours (each can be open or closed) Generated from constructor MR::Polyline3::Polyline3.

Calls MR_Polyline3_Construct_1_std_vector_std_vector_MR_Vector3f(). The reference to the parameter contours might be preserved in the constructed object.

◆ construct_2()

auto meshlib::Polyline3::construct_2 ( comp2firstVert:&meshlib::std_vector_MR_VertId ,
ps:&meshlib::VertCoords  ) -> meshlib::Owned< meshlib::Polyline3 >
static

creates comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in

Parameters
comp2firstVertdefines vertex range of a polyline [a,b)
pspoint coordinates Generated from constructor MR::Polyline3::Polyline3.

Calls MR_Polyline3_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.

◆ construct_from_another()

auto meshlib::Polyline3::construct_from_another ( _other:&meshlib::Polyline3 ) -> meshlib::Owned< meshlib::Polyline3 >
static

Generated from constructor MR::Polyline3::Polyline3.

Calls MR_Polyline3_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ contours()

auto meshlib::Polyline3::contours ( vertMap:Option<&mut meshlib::std_vector_std_vector_MR_VertId > ) const -> meshlib::Owned< meshlib::std_vector_std_vector_MR_Vector3f >

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

Parameters
vertMapoptional output map for for each contour point to corresponding VertId Generated from method MR::Polyline3::contours.

Calls MR_Polyline3_contours().

◆ dest_pnt()

auto meshlib::Polyline3::dest_pnt ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns coordinates of the edge destination Generated from method MR::Polyline3::destPnt.

Calls MR_Polyline3_destPnt().

◆ edge_center()

auto meshlib::Polyline3::edge_center ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns edge's centroid Generated from method MR::Polyline3::edgeCenter.

Calls MR_Polyline3_edgeCenter().

◆ edge_length()

auto meshlib::Polyline3::edge_length ( e:meshlib::EdgeId ) const -> f32

returns Euclidean length of the edge Generated from method MR::Polyline3::edgeLength.

Calls MR_Polyline3_edgeLength().

◆ edge_length_sq()

auto meshlib::Polyline3::edge_length_sq ( e:meshlib::EdgeId ) const -> f32

returns squared Euclidean length of the edge (faster to compute than length) Generated from method MR::Polyline3::edgeLengthSq.

Calls MR_Polyline3_edgeLengthSq().

◆ edge_point_1()

auto meshlib::Polyline3::edge_point_1 ( ep:&meshlib::EdgePoint ) const -> meshlib::Vector3f

computes coordinates of point given as edge and relative position on it Generated from method MR::Polyline3::edgePoint.

Calls MR_Polyline3_edgePoint_1().

◆ edge_point_2()

auto meshlib::Polyline3::edge_point_2 ( e:meshlib::EdgeId ,
f:f32  ) const -> meshlib::Vector3f

returns a point on the edge: origin point for f=0 and destination point for f=1 Generated from method MR::Polyline3::edgePoint.

Calls MR_Polyline3_edgePoint_2().

◆ edge_segment()

auto meshlib::Polyline3::edge_segment ( e:meshlib::EdgeId ) const -> meshlib::Owned< meshlib::LineSegm3f >

returns line segment of given edge Generated from method MR::Polyline3::edgeSegment.

Calls MR_Polyline3_edgeSegment().

◆ edge_vector()

auto meshlib::Polyline3::edge_vector ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns vector equal to edge destination point minus edge origin point Generated from method MR::Polyline3::edgeVector.

Calls MR_Polyline3_edgeVector().

◆ find_center_from_points()

auto meshlib::Polyline3::find_center_from_points ( ) const -> meshlib::Vector3f

computes average position of all valid polyline vertices Generated from method MR::Polyline3::findCenterFromPoints.

Calls MR_Polyline3_findCenterFromPoints().

◆ get_aabb_tree()

auto meshlib::Polyline3::get_aabb_tree ( ) const -> &meshlib::AABBTreePolyline3

returns cached aabb-tree for this polyline, creating it if it did not exist in a thread-safe manner Generated from method MR::Polyline3::getAABBTree.

Calls MR_Polyline3_getAABBTree().

◆ get_aabb_tree_not_create()

auto meshlib::Polyline3::get_aabb_tree_not_create ( ) const -> Option<&meshlib::AABBTreePolyline3 >

returns cached aabb-tree for this polyline, but does not create it if it did not exist Generated from method MR::Polyline3::getAABBTreeNotCreate.

Calls MR_Polyline3_getAABBTreeNotCreate().

◆ get_bounding_box()

auto meshlib::Polyline3::get_bounding_box ( ) const -> meshlib::Box3f

returns the minimal bounding box containing all valid vertices (implemented via getAABBTree()) Generated from method MR::Polyline3::getBoundingBox.

Calls MR_Polyline3_getBoundingBox().

◆ heap_bytes()

auto meshlib::Polyline3::heap_bytes ( ) const -> usize

returns the amount of memory this object occupies on heap Generated from method MR::Polyline3::heapBytes.

Calls MR_Polyline3_heapBytes().

◆ invalidate_caches()

void meshlib::Polyline3::invalidate_caches ( )

Invalidates caches (e.g. aabb-tree) after a change in polyline Generated from method MR::Polyline3::invalidateCaches.

Calls MR_Polyline3_invalidateCaches().

◆ loop_dir_area()

auto meshlib::Polyline3::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::Polyline3::loopDirArea.

Calls MR_Polyline3_loopDirArea().

◆ new()

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

Constructs an empty (default-constructed) instance.

Calls MR_Polyline3_DefaultConstruct().

◆ org_pnt()

auto meshlib::Polyline3::org_pnt ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns coordinates of the edge origin Generated from method MR::Polyline3::orgPnt.

Calls MR_Polyline3_orgPnt().

◆ pack()

void meshlib::Polyline3::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::Polyline3::pack.

Calls MR_Polyline3_pack().

◆ points()

auto meshlib::Polyline3::points ( ) const -> &meshlib::VertCoords

Returns a pointer to a member variable of class MR::Polyline3 named points.

Calls MR_Polyline3_Get_points(). The reference to this object might be preserved as the return value.

◆ points_mut()

auto meshlib::Polyline3::points_mut ( ) -> &mut meshlib::VertCoords

Returns a mutable pointer to a member variable of class MR::Polyline3 named points.

Calls MR_Polyline3_GetMutable_points(). The reference to this object might be preserved as the return value.

◆ set_points()

void meshlib::Polyline3::set_points ( value:&meshlib::VertCoords )

Modifies a member variable of class MR::Polyline3 named points.

Calls MR_Polyline3_Set_points(). The reference to the parameter value might be preserved in this object in element points.

◆ set_topology()

void meshlib::Polyline3::set_topology ( value:&meshlib::PolylineTopology )

Modifies a member variable of class MR::Polyline3 named topology.

Calls MR_Polyline3_Set_topology(). The reference to the parameter value might be preserved in this object in element topology.

◆ split_edge_1()

auto meshlib::Polyline3::split_edge_1 ( e:meshlib::EdgeId ) -> meshlib::EdgeId

same, but split given edge on two equal parts Generated from method MR::Polyline3::splitEdge.

Calls MR_Polyline3_splitEdge_1().

◆ split_edge_2()

auto meshlib::Polyline3::split_edge_2 ( e:meshlib::EdgeId ,
newVertPos:&meshlib::Vector3f  ) -> 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::Polyline3::splitEdge.

Calls MR_Polyline3_splitEdge_2().

◆ to_edge_point_1()

auto meshlib::Polyline3::to_edge_point_1 ( v:meshlib::VertId ) const -> meshlib::Owned< meshlib::EdgePoint >

converts vertex into edge-point representation Generated from method MR::Polyline3::toEdgePoint.

Calls MR_Polyline3_toEdgePoint_1().

◆ to_edge_point_2()

auto meshlib::Polyline3::to_edge_point_2 ( e:meshlib::EdgeId ,
p:&meshlib::Vector3f  ) const -> meshlib::Owned< meshlib::EdgePoint >

converts edge and point's coordinates into edge-point representation Generated from method MR::Polyline3::toEdgePoint.

Calls MR_Polyline3_toEdgePoint_2().

◆ topology()

auto meshlib::Polyline3::topology ( ) const -> &meshlib::PolylineTopology

Returns a pointer to a member variable of class MR::Polyline3 named topology.

Calls MR_Polyline3_Get_topology(). The reference to this object might be preserved as the return value.

◆ topology_mut()

auto meshlib::Polyline3::topology_mut ( ) -> &mut meshlib::PolylineTopology

Returns a mutable pointer to a member variable of class MR::Polyline3 named topology.

Calls MR_Polyline3_GetMutable_topology(). The reference to this object might be preserved as the return value.

◆ total_length()

auto meshlib::Polyline3::total_length ( ) const -> f32

returns total length of the polyline Generated from method MR::Polyline3::totalLength.

Calls MR_Polyline3_totalLength().

◆ transform()

void meshlib::Polyline3::transform ( xf:&meshlib::AffineXf3f )

applies given transformation to all valid polyline vertices Generated from method MR::Polyline3::transform.

Calls MR_Polyline3_transform().


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