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 twin(&self) -> Self;
fn prev(&self) -> Self;
fn next(&self) -> Self;
// Provided methods
fn side_index(&self) -> usize { ... }
fn outgoing_index(&self) -> usize { ... }
}Expand description
Represents one “side” or direction of an edge on a Sphere.
Half-edge data structures are used to conveniently represent the topology of a sphere and traverse between different elements.
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().
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.