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;
141 bool hasPrevPoint(std::size_t i)
const;
151 Vector2f getPrevPoint(std::size_t i)
const;
161 bool hasNextPoint(std::size_t i)
const;
171 Vector2f getNextPoint(std::size_t i)
const;
199 return m_type == Loop;
210 return m_type == Chain;
218 void simplify(
float distance =
Epsilon);
221 std::vector<Vector2f> m_points;
237 #ifndef DOXYGEN_SHOULD_SKIP_THIS 242 #endif // GF_POLYLINE_H void setType(Type type)
Set the type of the polyline.
Definition: Polyline.h:178
A deserializer from a binary file.
Definition: Serialization.h:152
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:187
constexpr float Epsilon
Machine epsilon.
Definition: Math.h:74
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:198
bool isChain() const
Check is the polyline is a chain.
Definition: Polyline.h:209
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:34
A constant reference to an array and its size.
Definition: ArrayRef.h:42
Type
The type of polyline.
Definition: Polyline.h:50
Deserializer & operator|(Deserializer &ar, T &data)
Definition: SerializationOps.h:313
The polyline is closed.
Definition: Polyline.h:52