1 #ifndef JVGS_MATH_PATHSEGMENT_H 2 #define JVGS_MATH_PATHSEGMENT_H 3 4 #include "Vector2D.h" 5 6 namespace jvgs 7 { 8 namespace math 9 { 10 class PathSegment 11 { 12 public: 13 /** Constructor. 14 */ 15 PathSegment(); 16 17 /** Destructor. 18 */ 19 virtual ~PathSegment(); 20 21 /** Get the length of this line segment. 22 * @return The length of this line segment. 23 */ 24 virtual float getLength() const = 0; 25 26 /** Get a given point on the line segment. 27 * @param t A value between 0.0 and 1.0 28 * @return A point on the line. 29 */ 30 virtual Vector2D getPoint(float t) const = 0; 31 }; 32 } 33 } 34 35 #endif 36