Skip to main content

HasEdges

Trait HasEdges 

Source
pub trait HasEdges {
    type Edge: GeometricPrimitive;

    // Required methods
    fn edge_count(&self) -> usize;
    fn edge(&self, index: usize) -> Option<Self::Edge>;
}
Expand description

Provides indexed access to a shape’s derived geometric edges.

Unlike HasLines, this trait does not imply that edges are stored in a table. Edges may be computed views over a higher-level primitive boundary.

Required Associated Types§

Source

type Edge: GeometricPrimitive

Edge type returned by the implementor.

Required Methods§

Source

fn edge_count(&self) -> usize

Number of edges available on the shape.

Source

fn edge(&self, index: usize) -> Option<Self::Edge>

Returns an edge by index.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§