Trait mgf::Polygon [] [src]

pub trait Polygon: Shape {
    type FaceType: Contains<Point3<f32>> + Into<Plane> + Clone;
    fn num_vertices(&self) -> usize;
fn vertex(&self, _: usize) -> Point3<f32>;
fn num_edges(&self) -> usize;
fn edge(&self, _: usize) -> (usize, usize);
fn face(&self) -> &Self::FaceType; }

A type that is composed of vertices, edges and has a face.

Besides being able to present their vertices and edges, a Polygon can produce a reference to some a face, which is a type that can be decomposed into a plane and determine if it contains a point.

Associated Types

Type of the face object the polygon returns.

Required Methods

The number of edges available to query.

Returns the ith vertex as a Point.

The number of edges available to query.

Returns the ith edge of the polygon as a pair of indices.

Implementors