Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3019 in orxonox.OLD for orxonox/branches/bezierTrack/src/curve.h


Ignore:
Timestamp:
Nov 28, 2004, 1:46:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/bezierTrack: added Class Curve, and made BezierCurve derived from it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/bezierTrack/src/curve.h

    r3018 r3019  
    1212
    1313
    14 //! Bezier Curve
    15 /**
    16    Class to handle bezier curves in 3-dimesnsional space
    17    
    18    needed for  the Tracking system in OrxOnoX.
    19 */
    20 class BezierCurve
     14
     15class Curve
    2116{
    22  private:
     17 protected:
    2318  int nodeCount;
    2419  Vector curvePoint;
    25  
     20
    2621  struct PathNode
    2722  {
     
    3429  PathNode* currentNode;
    3530
    36   int ncr(int n, int i);
     31 public:
    3732
     33  void addNode (const Vector& newNode);
     34
     35};
     36
     37//! Bezier Curve
     38/**
     39   Class to handle bezier curves in 3-dimesnsional space
     40   
     41   needed for  the Tracking system in OrxOnoX.
     42*/
     43class BezierCurve : public Curve
     44{
     45 private:
     46  // all from Curve-Class
    3847 public:
    3948  BezierCurve (void);
    4049  ~BezierCurve (void);
    41   void addNode (const Vector& newNode);
    42   Vector calcPos (float t);
    43   Vector calcDir (float t);
     50  virtual Vector calcPos (float t);
     51  virtual Vector calcDir (float t);
    4452 
    4553  Vector getPos () const;
    4654};
    4755
     56int ncr(int n, int i);
    4857
    4958
Note: See TracChangeset for help on using the changeset viewer.