21 #ifndef GF_POINT_SEQUENCE_H 22 #define GF_POINT_SEQUENCE_H 29 #include "SerializationFwd.h" 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 64 template<
typename Iterator>
66 : m_points(first, last)
78 return m_points.empty();
87 m_points.push_back(point);
96 return m_points.size();
104 Vector2f getPoint(std::size_t index)
const;
123 return m_points.
data();
134 return m_points.
data();
145 return m_points.
data() + m_points.size();
156 return m_points.
data() + m_points.size();
165 return m_points.front();
174 return m_points.back();
182 void applyTransform(
const Matrix3f& mat);
189 void simplify(
float distance =
Epsilon);
207 std::vector<Vector2f> m_points;
222 #ifndef DOXYGEN_SHOULD_SKIP_THIS 227 #endif // GF_POINT_SEQUENCE_H A deserializer from a binary file.
Definition: Serialization.h:151
constexpr float Epsilon
Machine epsilon.
Definition: Math.h:94
A span.
Definition: Span.h:36
Vector2f * begin()
Get an iterator to the first point.
Definition: PointSequence.h:133
Vector2f * end()
Get an iterator past the last point.
Definition: PointSequence.h:155
std::size_t getPointCount() const
Get the number of points of the sequence.
Definition: PointSequence.h:95
T data[N]
The internal representation of the vector.
Definition: Vector.h:270
const std::vector< Vector2f > & getRawPoints() const
Get the raw container of points.
Definition: PointSequence.h:202
const Vector2f * end() const
Get an iterator past the last point.
Definition: PointSequence.h:144
PointSequence(Iterator first, Iterator last)
Constructor from points.
Definition: PointSequence.h:65
A serializer to a binary file.
Definition: Serialization.h:43
bool isEmpty() const
Check if the sequence is empty.
Definition: PointSequence.h:77
const Vector2f * begin() const
Get an iterator to the first point.
Definition: PointSequence.h:122
The namespace for gf classes.
Definition: Action.h:35
std::vector< Vector2f > & getRawPoints()
Get the raw container of points.
Definition: PointSequence.h:195
Vector2f getFirstPoint() const
Get the first point of the sequence.
Definition: PointSequence.h:164
void addPoint(Vector2f point)
Add a point to the sequence.
Definition: PointSequence.h:86
General purpose math vector.
Definition: Vector.h:61
Vector2f getLastPoint() const
Get the last point of the sequence.
Definition: PointSequence.h:173
A sequence of points.
Definition: PointSequence.h:44