Changeset 3517 in orxonox.OLD for orxonox/branches/trackManager/src/lib
- Timestamp:
- Mar 12, 2005, 12:34:15 PM (20 years ago)
- Location:
- orxonox/branches/trackManager/src/lib/math
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/trackManager/src/lib/math/curve.cc
r3498 r3517 46 46 } 47 47 48 /** 49 \brief adds a new Node to the bezier Curve ath Position insertPosition 50 \param insertPosition The Position on the Path to insert the node. 51 \param newNode a Vector to the position of the new node 52 */ 48 53 void Curve::addNode(const Vector& newNode, unsigned int insertPosition) 49 54 { … … 253 258 /** 254 259 \brief Calulates the direction of the Curve at time t. 255 \param The time at which to evaluate the curve.256 \returns The vvaluatedVector.260 \param t The time at which to evaluate the curve. 261 \returns The Directional Vector. 257 262 */ 258 263 Vector BezierCurve::calcDir (float t) … … 261 266 } 262 267 268 /** 269 \brief Calulates the acceleration of the Curve at time t. 270 \param t The time at which to evaluate the curve. 271 \returns The acceleration-Vector. 272 */ 263 273 Vector BezierCurve::calcAcc (float t) 264 274 { … … 416 426 /** 417 427 \brief Calulates the direction of the Curve at time t. 418 \param The time at which to evaluate the curve.428 \param t The time at which to evaluate the curve. 419 429 \returns The vvaluated Vector. 420 430 */ -
orxonox/branches/trackManager/src/lib/math/curve.h
r3498 r3517 17 17 18 18 //! An abstract class to handle curves. Needed for the Tracking system in orxonox. 19 /** 20 A Curve is a smooth line which tries to approximate a path through the nodes given to it. 21 <br> 22 23 <b>Usage of Curves:</b><br> 24 \li Creation: Curve* newCurve = new BezierCurve(); 25 \li Adding some Points: newCurve->addNode([Vector to the point to add]); 26 \li Get Point on Curve: newCurve->calcPos(timeIndex); // where timeindex is in the interval [0,1] 27 <br> 28 More Fuctionality is: 29 \li debug(): outputs some info about this curve. 30 \li getNode(i): returns a Vector to the n'th node of the Curve. 31 \li getNodeCount(): returns the count of nodes. 32 <br> 33 General Info: 34 \li Curves take rather much power to be created/altered, but are fast calculated at runtime. 35 */ 19 36 class Curve 20 37 { … … 39 56 40 57 private: 58 //! rebuilds the Curve with the right algorithm 41 59 virtual void rebuild(void) = 0; 42 60 public: … … 45 63 void addNode(const Vector& newNode, unsigned int insertPosition); 46 64 Vector getNode(unsigned int nodeToFind); 65 /** \returns the Count of nodes of this Curve */ 47 66 inline int getNodeCount(void) { return this->nodeCount;} 48 67 49 virtual Vector calcPos(float t) = 0; 68 /** 69 \brief A virtual function to calculate the Position on the Curve 70 \returns positionVector 71 \param t the timeindex on this curve [0,1]f 72 */ 73 virtual Vector calcPos(float t) = 0; 74 /** 75 \brief A virtual function to calculate the Direction of the Curve 76 \returns directionVector 77 \param t the timeindex on this curve [0,1]f 78 */ 50 79 virtual Vector calcDir(float t) = 0; 80 /** 81 \brief A virtual function to calculate the acceleration on the Curve 82 \returns accelerationVector 83 \param t the timeindex on this curve [0,1]f 84 */ 51 85 virtual Vector calcAcc(float t) = 0; 86 /** 87 \brief A virtual function to calculate the Quaternion on the Curve 88 \returns directional Quaternion 89 \param t the timeindex on this curve [0,1]f 90 */ 52 91 virtual Quaternion calcQuat(float t) = 0; 53 92
Note: See TracChangeset
for help on using the changeset viewer.