1 #ifndef JVGS_MATH_ELLIPTICALARC_H 2 #define JVGS_MATH_ELLIPTICALARC_H 3 4 #include "Curve.h" 5 6 namespace jvgs 7 { 8 namespace math 9 { 10 class EllipticalArc: public Curve 11 { 12 private: 13 /** Ellipse center. */ 14 Vector2D center; 15 16 /** Rotation of x axis. */ 17 float phi; 18 19 /** Radius. */ 20 Vector2D radius; 21 22 /** Start angle. */ 23 float theta1; 24 25 /** Angle delta. */ 26 float deltaTheta; 27 28 public: 29 /** Constructor. 30 * @param start Start point of the arc. 31 * @param radius Radius of the ellipse. 32 * @param phi Rotation of x axis. 33 * @param largeArc Large arc flag. 34 * @param sweep Sweep flag. 35 * @param end End point of the arc. 36 */ 37 EllipticalArc(const Vector2D &start, const Vector2D &radius, 38 float phi, bool largeArc, bool sweep, 39 const Vector2D &end); 40 41 /** Destructor. 42 */ 43 virtual ~EllipticalArc(); 44 45 /* Override 46 */ 47 Vector2D getPoint(float t) const; 48 49 protected: 50 /* Override 51 */ 52 virtual float getLengthGuess() const; 53 }; 54 } 55 } 56 57 #endif 58