[][src]Trait rust_3d::IsPolygon

pub trait IsPolygon<V> {
    fn num_segments(&self) -> usize;
fn segment_vertex_ids(&self, segmentid: SId) -> Result<(VId, VId)>;
fn segment_vertices(&self, segmentid: SId) -> Result<(V, V)>;
fn vertex(&self, vertexid: VId) -> Result<V>; fn num_vertices(&self) -> usize { ... } }

IsPolygon is a trait used for closed polygons

Required methods

fn num_segments(&self) -> usize

Should return the number of segments within the polygon

fn segment_vertex_ids(&self, segmentid: SId) -> Result<(VId, VId)>

Should return the ids of vertices of the given segment

fn segment_vertices(&self, segmentid: SId) -> Result<(V, V)>

Should return the vertices of the given segment

fn vertex(&self, vertexid: VId) -> Result<V>

Should return the vertex with the given id

Loading content...

Provided methods

fn num_vertices(&self) -> usize

Returns the number of vertices within the polygon

Loading content...

Implementors

impl<P> IsPolygon<P> for Polygon2D<P> where
    P: Is2D + Clone
[src]

impl<P> IsPolygon<P> for Polygon3D<P> where
    P: Is3D + Clone
[src]

Loading content...