29 #include "Portability.h" 30 #include "SerializationFwd.h" 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 73 : m_points(points.begin(), points.end())
86 template<
typename Iterator>
88 : m_points(first, last)
106 std::size_t getPointCount()
const;
113 Vector2f getPoint(std::size_t index)
const;
159 bool hasPrevPoint(std::size_t i)
const;
169 Vector2f getPrevPoint(std::size_t i)
const;
179 bool hasNextPoint(std::size_t i)
const;
189 Vector2f getNextPoint(std::size_t i)
const;
217 return m_type == Loop;
228 return m_type == Chain;
236 void simplify(
float distance =
Epsilon);
239 std::vector<Vector2f> m_points;
255 #ifndef DOXYGEN_SHOULD_SKIP_THIS 260 #endif // GF_POLYLINE_H void setType(Type type)
Set the type of the polyline.
Definition: Polyline.h:196
A deserializer from a binary file.
Definition: Serialization.h:153
Polyline(ArrayRef< Vector2f > points, Type type=Chain)
Constructor from an array.
Definition: Polyline.h:72
The polyline is open.
Definition: Polyline.h:51
Type getType() const
Get the type of the polyline.
Definition: Polyline.h:205
constexpr float Epsilon
Machine epsilon.
Definition: Math.h:96
Polyline(Iterator first, Iterator last, Type type=Chain)
Constructor from points.
Definition: Polyline.h:87
A polyline.
Definition: Polyline.h:45
bool isLoop() const
Check is the polyline is a loop.
Definition: Polyline.h:216
bool isChain() const
Check is the polyline is a chain.
Definition: Polyline.h:227
Polyline(Type type=Chain)
Default constructor.
Definition: Polyline.h:60
A serializer to a binary file.
Definition: Serialization.h:45
The namespace for gf classes.
Definition: Action.h:35
A constant reference to an array and its size.
Definition: ArrayRef.h:43
Type
The type of polyline.
Definition: Polyline.h:50
The polyline is closed.
Definition: Polyline.h:52