/*! \file curve.h \brief A basic 3D curve framework Contains classes to handle curves */ #ifndef _CURVE_H #define _CURVE_H #include "vector.h" //! An abstract class to handle curves. class Curve { protected: int nodeCount; //!< The count of nodes the Curve has. Vector curvePoint; //!< The point on the Cureve at a local Time. float localTime; //!< If the time of one point is asked more than once the programm will not calculate it again. //! Handles the curve-points (dynamic List) struct PathNode { int number; //!< The N-th node of this curve. Vector position; //!< Vector Pointung to this curve-point. PathNode* next; //!< Pointer to the next Node. }; PathNode* firstNode; //!< First node of the curve. PathNode* currentNode; //!< The node we are working with (the Last node). public: void addNode (const Vector& newNode); }; //! Bezier Curve /** Class to handle bezier curves in 3-dimesnsional space needed for the Tracking system in OrxOnoX. */ class BezierCurve : public Curve { private: // all from Curve-Class public: BezierCurve (void); ~BezierCurve (void); Vector calcPos (float t); Vector calcDir (float t); Quaternion calcQuat (float t); Vector getPos () const; }; int ncr(int n, int i); #endif /* _CURVE_H */