pub trait HalfEdge: Clone + Eq {
type Face: Face<Vertex = Self::Vertex, HalfEdge = Self>;
type Vertex: Vertex<Face = Self::Face, HalfEdge = Self>;
// Required methods
fn length(&self) -> f64;
fn angle(&self) -> f64;
fn inside(&self) -> Self::Face;
fn start(&self) -> Self::Vertex;
fn complement(&self) -> Self;
fn prev(&self) -> Self;
fn next(&self) -> Self;
// Provided methods
fn side_index(&self) -> usize { ... }
fn outgoing_index(&self) -> usize { ... }
}Expand description
Required Associated Types§
Required Methods§
Sourcefn length(&self) -> f64
fn length(&self) -> f64
The length of the edge.
For edges that are geodesics, this is equivalent to the util::dist between its
endpoints.
Sourcefn angle(&self) -> f64
fn angle(&self) -> f64
The interior angle between the previous half-edge and this half-edge.
The sum of the angles of all outgoing half-edges at a vertex should
be 2 π.
If both this edge, and the previous edge, are geodesics, the angle is equivalent to
util::angle where the b vertex is given by self.start().
Sourcefn complement(&self) -> Self
fn complement(&self) -> Self
Gets the complementary half-edge on the opposite side of the edge.
The returned half-edge will go in the opposite direction along the same edge.
Provided Methods§
Sourcefn side_index(&self) -> usize
fn side_index(&self) -> usize
The index of this half-edge within the Face::sides list of its
inside.
Sourcefn outgoing_index(&self) -> usize
fn outgoing_index(&self) -> usize
The index of this half-edge within the Vertex::outgoings list of its
start.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.