Safe Haskell | None |
---|
- class (HasPoints p, IsTransformable p) => IsPolygon p where
- data SimplePolygon' a = SimplePolygon [Point2' a]
- data MultiPolygon' a = MultiPolygon [SimplePolygon' a]
Documentation
class (HasPoints p, IsTransformable p) => IsPolygon p whereSource
Polygons
Class that defines what a polygon is. Note that it is assumed that the first and the last point are *NOT* the same point.
vertices :: p a -> [Point2' a]Source
edges :: p a -> [(Point2' a, Point2' a)]Source
default implementation assumes points are in order
containsHoles :: p a -> BoolSource
IsPolygon BoundingBox2' | Bounding boxes can be used as polygons |
IsPolygon MultiPolygon' | |
IsPolygon SimplePolygon' |
data SimplePolygon' a Source
Simple polygons, i.e. polygons consisting of a sequence of points (vertices) | such that the edges do not intersect. Simple polygons do not contain holes
SimplePolygon [Point2' a] |
HasPoints SimplePolygon' | |
IsPoint2Functor SimplePolygon' | |
IsPolygon SimplePolygon' | |
Eq a => Eq (SimplePolygon' a) | |
Show a => Show (SimplePolygon' a) |
data MultiPolygon' a Source
A multipolygon consists of several simple polygons
HasPoints MultiPolygon' | |
IsPoint2Functor MultiPolygon' | |
IsPolygon MultiPolygon' | |
Eq a => Eq (MultiPolygon' a) | |
Show a => Show (MultiPolygon' a) |