Trait mgf::Polygon [−][src]
pub trait Polygon: Copy + Shape + Contains<Point3<f32>> + Into<Plane> { const NUM_VERTICES: usize; fn vertex(&self, _: usize) -> Point3<f32>; fn edge(&self, _: usize) -> (usize, usize); }
A type that is composed of vertices, edges and has a face.
The property of having a face means that a polygon type can determine if a point is contained on its surface.
Associated Constants
const NUM_VERTICES: usize
The number of vertices and edges available to query.
Required Methods
fn vertex(&self, _: usize) -> Point3<f32>
Returns the ith vertex as a Point.
fn edge(&self, _: usize) -> (usize, usize)
Returns the ith edge of the polygon as a pair of indices.
In the future this is hoped to be deprecate in favor of a constant associated array. Unfortunately it is impossible as of this moment to have arrays depend on associated constants.