32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60 template<
typename Iterator>
62 : m_points(first, last)
86 Vector2f
getPoint(std::size_t index)
const;
103 Vector2f
getSupport(Vector2f direction)
const;
112 const Vector2f *
begin()
const;
121 const Vector2f *
end()
const;
131 std::vector<Vector2f> m_points;
134 #ifndef DOXYGEN_SHOULD_SKIP_THIS
Polygon(Iterator first, Iterator last)
Constructor from points.
Definition: Polygon.h:61
std::size_t getPointCount() const
Get the number of points of the polygon.
Vector2f getSupport(Vector2f direction) const
Get the farthest point in a direction.
const Vector2f * begin() const
Get an iterator to the first point.
Polygon(ArrayRef< Vector2f > points)
Constructor from an array.
Vector2f getCenter() const
Get the center of the polygon.
void applyTransform(const Matrix3f &mat)
Apply a transformation to the polygon.
void addPoint(Vector2f point)
Add a point to the polygon.
A constant reference to an array and its size.
Definition: ArrayRef.h:41
Vector2f getPoint(std::size_t index) const
Get the i-th point of the polygon.
A convex polygon.
Definition: Polygon.h:40
Polygon()=default
Default constructor.
#define GF_API
Definition: Portability.h:35
const Vector2f * end() const
Get an iterator past the last point.