29#include "PointSequence.h"
30#include "SerializationFwd.h"
36#ifndef DOXYGEN_SHOULD_SKIP_THIS
70 template<
typename Iterator>
168#ifndef DOXYGEN_SHOULD_SKIP_THIS
A deserializer from a binary file.
Definition: Serialization.h:151
Deserializer & operator|(Deserializer &ar, Polygon &polygon)
Deserialize a polygon.
Definition: Polygon.h:164
A sequence of points.
Definition: PointSequence.h:44
A convex polygon.
Definition: Polygon.h:47
Vector2f getPrevPoint(std::size_t i) const
Get the point before the i-th point.
Polygon(Iterator first, Iterator last)
Constructor from points.
Definition: Polygon.h:71
Vector2f getSupport(Vector2f direction, const Transform &transform) const
Get the farthest point in a direction.
bool contains(Vector2f point) const
Test if a point is inside the polygon.
bool isConvex() const
Check if the polygon is convex.
Polygon(Span< const Vector2f > points)
Constructor from an array.
Definition: Polygon.h:59
Winding getWinding() const
Compute the winding of a simple polygon.
float getArea() const
Compute the area of the polygon.
Vector2f getNextPoint(std::size_t i) const
Get the point after the i-th point.
Polygon()=default
Default constructor.
Vector2f getSupport(Vector2f direction) const
Get the farthest point in a direction.
A serializer to a binary file.
Definition: Serialization.h:43
Serializer & operator|(Serializer &ar, const Polygon &polygon)
Serialize a polygon.
Definition: Polygon.h:155
A span.
Definition: Span.h:414
Winding
The direction of a polygon's rotation.
Definition: Winding.h:33
constexpr Vector2f transform(const Matrix3f &mat, Vector2f point)
Apply an affine transformation to a 2D point.
Definition: Transform.h:326
The namespace for gf classes.