1 #ifndef JVGS_MATH_CUBICCURVE_H
2 #define JVGS_MATH_CUBICCURVE_H
3 
4 #include "Curve.h"
5 
6 namespace jvgs
7 {
8     namespace math
9     {
10         class CubicCurve: public Curve
11         {
12             private:
13                 /** Defining points of the curve.
14                  */
15                 Vector2D start, control1, control2, end;
16 
17             public:
18                 /** Constructor.
19                  *  @param start Curve start.
20                  *  @param control1 First control point.
21                  *  @param control2 Second control point.
22                  *  @param end End of the curve.
23                  */
24                 CubicCurve(const Vector2D &start, const Vector2D &control1,
25                         const Vector2D &control2, const Vector2D &end);
26 
27                 /** Destructor.
28                  */
29                 virtual ~CubicCurve();
30 
31                 /* Override
32                  */
33                 virtual Vector2D getPoint(float t) const;
34 
35                 /* Override
36                  */
37                 virtual float getLengthGuess() const;
38         };
39     }
40 }
41 
42 #endif
43