Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3217 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Dec 18, 2004, 3:48:43 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: copied Curve-class from branches/bezierCurve. The only really useable Class from there.

Location:
orxonox/trunk/src
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/curve.cc

    r3194 r3217  
    5959/**
    6060   \brief Deletes a BezierCurve.
     61
    6162   It does this by freeing all the space taken over from the nodes
    6263*/
     
    110111}
    111112
     113/**
     114   \brief Calulates the direction of the Curve at time t.
     115   \param The time at which to evaluate the curve.
     116   \returns The vvaluated Vector.
     117*/
    112118Vector BezierCurve::calcDir (float t)
    113119{
     
    133139}
    134140
     141/**
     142   \brief Calculates the Quaternion needed for our rotations
     143   \param t The time at which to evaluate the cuve.
     144   \returns The evaluated Quaternion.
     145*/
    135146Quaternion BezierCurve::calcQuat (float t)
    136147{
     
    148159}
    149160
    150 
     161/**
     162   \brief ncr-calculator, did not find an other method
     163   \todo a c++ variante to do this
     164*/
    151165int ncr(int n, int i)
    152166{
  • orxonox/trunk/src/curve.h

    r3194 r3217  
    1212
    1313
    14 
     14//! An abstract class to handle curves.
    1515class Curve
    1616{
    1717 protected:
    18   int nodeCount;
    19   Vector curvePoint;
    20   float localTime; //!< if the time of one point is asked more than once the programm will not calculate it again.
     18  int nodeCount;         //!< The count of nodes the Curve has.
     19  Vector curvePoint;     //!< The point on the Cureve at a local Time.
     20  float localTime;       //!< If the time of one point is asked more than once the programm will not calculate it again.
    2121
     22  //! Handles the curve-points (dynamic List)
    2223  struct PathNode
    2324  {
    24     int number;
    25     Vector position;
    26     PathNode* next;
     25    int number;          //!< The N-th node of this curve.
     26    Vector position;     //!< Vector Pointung to this curve-point.
     27    PathNode* next;      //!< Pointer to the next Node.
    2728  };
    2829
    29   PathNode* firstNode;
    30   PathNode* currentNode;
     30  PathNode* firstNode;   //!< First node of the curve.
     31  PathNode* currentNode; //!< The node we are working with (the Last node).
    3132
    3233 public:
    33 
    3434  void addNode (const Vector& newNode);
    3535
Note: See TracChangeset for help on using the changeset viewer.