MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::EdgeLengthMesh Struct Reference
Inheritance diagram for meshlib::EdgeLengthMesh:

Public Member Functions

auto assign_from_another (_other:&meshlib::EdgeLengthMesh) -> &mut meshlib::EdgeLengthMesh
auto left_cotan (e:meshlib::EdgeId) const -> f32
auto cotan (ue:meshlib::UndirectedEdgeId) const -> f32
auto is_delone (ue:meshlib::UndirectedEdgeId, threshold:Option< f32 >) const -> bool
auto edge_length_after_flip (e:meshlib::EdgeId) const -> meshlib::Owned< meshlib::std_optional_float >
auto flip_edge (e:meshlib::EdgeId) -> bool
auto topology () const -> &meshlib::MeshTopology
auto topology_mut () -> &mut meshlib::MeshTopology
void set_topology (value:&meshlib::MeshTopology)
auto edge_lengths () const -> &meshlib::UndirectedEdgeScalars
auto edge_lengths_mut () -> &mut meshlib::UndirectedEdgeScalars
void set_edge_lengths (value:&meshlib::UndirectedEdgeScalars)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::EdgeLengthMesh >
static auto construct_from (topology:&meshlib::MeshTopology, edgeLengths:&meshlib::UndirectedEdgeScalars) -> meshlib::Owned< meshlib::EdgeLengthMesh >
static auto construct_from_another (_other:&meshlib::EdgeLengthMesh) -> meshlib::Owned< meshlib::EdgeLengthMesh >
static auto from_mesh (mesh:&meshlib::Mesh) -> meshlib::Owned< meshlib::EdgeLengthMesh >
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

Unlike the classic mesh that stores coordinates of its vertices, this class stores the lengths of all edges. It can be used for construction of intrinsic Intrinsic Delaunay Triangulations. Generated from class MR::EdgeLengthMesh.

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

Member Function Documentation

◆ assign_from_another()

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

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

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

◆ construct_from()

auto meshlib::EdgeLengthMesh::construct_from ( topology:&meshlib::MeshTopology ,
edgeLengths:&meshlib::UndirectedEdgeScalars  ) -> meshlib::Owned< meshlib::EdgeLengthMesh >
static

Constructs MR::EdgeLengthMesh elementwise.

Calls MR_EdgeLengthMesh_ConstructFrom(). The reference to the parameter topology might be preserved in the constructed object. The reference to the parameter edgeLengths might be preserved in the constructed object.

◆ construct_from_another()

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

Generated from constructor MR::EdgeLengthMesh::EdgeLengthMesh.

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

◆ cotan()

auto meshlib::EdgeLengthMesh::cotan ( ue:meshlib::UndirectedEdgeId ) const -> f32

computes sum of cotangents of the angle in the left and right triangles opposite to given edge, consider cotangents zero for not existing triangles Generated from method MR::EdgeLengthMesh::cotan.

Calls MR_EdgeLengthMesh_cotan().

◆ edge_length_after_flip()

auto meshlib::EdgeLengthMesh::edge_length_after_flip ( e:meshlib::EdgeId ) const -> meshlib::Owned< meshlib::std_optional_float >

given the edge with left and right triangular faces, which form together a quadrangle, returns the length of geodesic line on original mesh between the vertices of the quadrangle opposite to given edge; returns std::nullopt if the geodesic line does not go fully inside the quadrangle Generated from method MR::EdgeLengthMesh::edgeLengthAfterFlip.

Calls MR_EdgeLengthMesh_edgeLengthAfterFlip().

◆ edge_lengths()

auto meshlib::EdgeLengthMesh::edge_lengths ( ) const -> &meshlib::UndirectedEdgeScalars

Returns a pointer to a member variable of class MR::EdgeLengthMesh named edgeLengths.

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

◆ edge_lengths_mut()

auto meshlib::EdgeLengthMesh::edge_lengths_mut ( ) -> &mut meshlib::UndirectedEdgeScalars

Returns a mutable pointer to a member variable of class MR::EdgeLengthMesh named edgeLengths.

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

◆ flip_edge()

auto meshlib::EdgeLengthMesh::flip_edge ( e:meshlib::EdgeId ) -> bool

given the edge with left and right triangular faces, which form together a quadrangle, rotates the edge counter-clockwise inside the quadrangle; the length of e becomes equal to the length of geodesic line between its new ends on original mesh; does not flip and returns false if the geodesic line does not go fully inside the quadrangle Generated from method MR::EdgeLengthMesh::flipEdge.

Calls MR_EdgeLengthMesh_flipEdge().

◆ from_mesh()

auto meshlib::EdgeLengthMesh::from_mesh ( mesh:&meshlib::Mesh ) -> meshlib::Owned< meshlib::EdgeLengthMesh >
static

construct EdgeLengthMesh from an ordinary mesh Generated from method MR::EdgeLengthMesh::fromMesh.

Calls MR_EdgeLengthMesh_fromMesh().

◆ is_delone()

auto meshlib::EdgeLengthMesh::is_delone ( ue:meshlib::UndirectedEdgeId ,
threshold:Option< f32 >  ) const -> bool

returns true if given edge satisfies Delaunay conditions, returns false if the edge needs to be flipped to satisfy Delaunay conditions, passing negative threshold makes more edges satisfy Delaunay conditions Generated from method MR::EdgeLengthMesh::isDelone.

Calls MR_EdgeLengthMesh_isDelone().

◆ left_cotan()

auto meshlib::EdgeLengthMesh::left_cotan ( e:meshlib::EdgeId ) const -> f32

computes cotangent of the angle in the left( e ) triangle opposite to e, and returns 0 if left face does not exist Generated from method MR::EdgeLengthMesh::leftCotan.

Calls MR_EdgeLengthMesh_leftCotan().

◆ new()

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

Constructs an empty (default-constructed) instance.

Calls MR_EdgeLengthMesh_DefaultConstruct().

◆ set_edge_lengths()

void meshlib::EdgeLengthMesh::set_edge_lengths ( value:&meshlib::UndirectedEdgeScalars )

Modifies a member variable of class MR::EdgeLengthMesh named edgeLengths.

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

◆ set_topology()

void meshlib::EdgeLengthMesh::set_topology ( value:&meshlib::MeshTopology )

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

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

◆ topology()

auto meshlib::EdgeLengthMesh::topology ( ) const -> &meshlib::MeshTopology

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

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

◆ topology_mut()

auto meshlib::EdgeLengthMesh::topology_mut ( ) -> &mut meshlib::MeshTopology

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

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


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