32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
81 template<
typename Iterator>
83 : m_points(first, last)
108 Vector2f
getPoint(std::size_t index)
const;
117 const Vector2f *
begin()
const;
126 const Vector2f *
end()
const;
185 return m_type ==
Loop;
196 return m_type ==
Chain;
200 std::vector<Vector2f> m_points;
204 #ifndef DOXYGEN_SHOULD_SKIP_THIS
void setType(Type type)
Set the type of the polyline.
Definition: Polyline.h:173
Polyline(ArrayRef< Vector2f > points, Type type=Chain)
Constructor from an array.
Definition: Polyline.h:67
Definition: Polyline.h:47
std::size_t getPointCount() const
Get the number of points of the polyline.
bool hasPrevPoint(std::size_t i) const
Check if there is a point before the i-th point.
Polyline(Iterator first, Iterator last, Type type=Chain)
Constructor from points.
Definition: Polyline.h:82
Definition: Polyline.h:46
A polyline.
Definition: Polyline.h:43
Vector2f getPrevPoint(std::size_t i) const
Get the point before the i-th point.
Vector2f getPoint(std::size_t index) const
Get the i-th point of the polyline.
bool isLoop() const
Check is the polyline is a loop.
Definition: Polyline.h:184
const Vector2f * end() const
Get an iterator past the last point.
Vector2f getNextPoint(std::size_t i) const
Get the point after the i-th point.
Polyline(Type type=Chain)
Default constructor.
Definition: Polyline.h:55
constexpr const T * end() const noexcept
Get an iterator past the last element.
Definition: ArrayRef.h:157
bool isChain() const
Check is the polyline is a chain.
Definition: Polyline.h:195
The namespace for gf classes.
Definition: Action.h:34
A constant reference to an array and its size.
Definition: ArrayRef.h:42
Type
Definition: Polyline.h:45
constexpr const T * begin() const noexcept
Get an iterator to the first element.
Definition: ArrayRef.h:146
void addPoint(Vector2f point)
Add a point to the polyline.
bool hasNextPoint(std::size_t i) const
Check if there is a point after the i-th point.
const Vector2f * begin() const
Get an iterator to the first point.
#define GF_API
Definition: Portability.h:35