pub trait PolygonSet<C: CoordinateConcept>: IntoSegments<C> {
    type Point: PointConcept<C>;
    type Segment: Segment<C, Point = Self::Point>;
    type AllPoints: Iterator<Item = Self::Point>;

    // Required methods
    fn num_polygons(&self) -> usize;
    fn convolved(self, p: &Self::Point) -> Self;
    fn convolve(&mut self, p: &Self::Point);
    fn scaled(self, scale: C::Coord) -> Self;
    fn scale(&mut self, scale: C::Coord);
    fn all_points(&self) -> Self::AllPoints;
}
Expand description

Set of multiple polygons edges.

Required Associated Types§

source

type Point: PointConcept<C>

Point type used for the vertices.

source

type Segment: Segment<C, Point = Self::Point>

Type used for the polygon segments.

source

type AllPoints: Iterator<Item = Self::Point>

Iterator over all points.

Required Methods§

source

fn num_polygons(&self) -> usize

Get number of polygons.

source

fn convolved(self, p: &Self::Point) -> Self

Add the point p to all vertices.

source

fn convolve(&mut self, p: &Self::Point)

Add the point p to all vertices.

source

fn scaled(self, scale: C::Coord) -> Self

Multiply all vertices with a factor.

source

fn scale(&mut self, scale: C::Coord)

Multiply all vertices with a factor.

source

fn all_points(&self) -> Self::AllPoints

Iterate over all vertices.

Implementors§