A sequence of points.
More...
#include <gf/PointSequence.h>
A sequence of points.
- See also
- gf::Polygon, gf::Polyline
◆ PointSequence() [1/3]
gf::PointSequence::PointSequence |
( |
| ) |
|
|
default |
◆ PointSequence() [2/3]
gf::PointSequence::PointSequence |
( |
Span< const Vector2f > |
points | ) |
|
Constructor from an array.
- Parameters
-
points | The array of points |
◆ PointSequence() [3/3]
template<typename Iterator >
gf::PointSequence::PointSequence |
( |
Iterator |
first, |
|
|
Iterator |
last |
|
) |
| |
|
inline |
Constructor from points.
- Parameters
-
first | Iterator to the first point |
last | Iterator after the last point |
◆ addPoint()
void gf::PointSequence::addPoint |
( |
Vector2f |
point | ) |
|
|
inline |
Add a point to the sequence.
- Parameters
-
point | The point to add to the sequence |
◆ applyTransform()
void gf::PointSequence::applyTransform |
( |
const Matrix3f & |
mat | ) |
|
Apply a transformation to the sequence.
- Parameters
-
mat | The transformation matrix |
◆ begin() [1/2]
Get an iterator to the first point.
- Returns
- A pointer to the first point
- See also
- end()
◆ begin() [2/2]
const Vector2f * gf::PointSequence::begin |
( |
| ) |
const |
|
inline |
Get an iterator to the first point.
- Returns
- A pointer to the first point
- See also
- end()
◆ end() [1/2]
Get an iterator past the last point.
- Returns
- A pointer past the last point
- See also
- begin()
◆ end() [2/2]
const Vector2f * gf::PointSequence::end |
( |
| ) |
const |
|
inline |
Get an iterator past the last point.
- Returns
- A pointer past the last point
- See also
- begin()
◆ getCenter()
Vector2f gf::PointSequence::getCenter |
( |
| ) |
const |
Get the center of the sequence.
As the sequence is convex, the center is inside the sequence
- Returns
- The center of the sequence
◆ getFirstPoint()
Vector2f gf::PointSequence::getFirstPoint |
( |
| ) |
const |
|
inline |
Get the first point of the sequence.
- Returns
- The first point of the sequence
◆ getLastPoint()
Vector2f gf::PointSequence::getLastPoint |
( |
| ) |
const |
|
inline |
Get the last point of the sequence.
- Returns
- The last point of the sequence
◆ getPoint()
Vector2f gf::PointSequence::getPoint |
( |
std::size_t |
index | ) |
const |
Get the i-th point of the sequence.
- Parameters
-
index | The index of the point |
◆ getPointCount()
std::size_t gf::PointSequence::getPointCount |
( |
| ) |
const |
|
inline |
Get the number of points of the sequence.
- Returns
- The number of points of the sequence
◆ getRawPoints() [1/2]
std::vector< Vector2f > & gf::PointSequence::getRawPoints |
( |
| ) |
|
|
inlineprotected |
Get the raw container of points.
◆ getRawPoints() [2/2]
const std::vector< Vector2f > & gf::PointSequence::getRawPoints |
( |
| ) |
const |
|
inlineprotected |
Get the raw container of points.
◆ isEmpty()
bool gf::PointSequence::isEmpty |
( |
| ) |
const |
|
inline |
Check if the sequence is empty.
An empty sequence has no points.
- Returns
- True if the sequence is empty
◆ reverse()
void gf::PointSequence::reverse |
( |
| ) |
|
Reverse the points in the sequence.
◆ simplify()
void gf::PointSequence::simplify |
( |
float |
distance = Epsilon | ) |
|
Simplify the sequence.
- Parameters
-
distance | The maximum authorized distance between the original points and the simplified points |