Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3327 in orxonox.OLD for orxonox/branches/parenting/src/curve.h


Ignore:
Timestamp:
Jan 3, 2005, 6:57:01 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: added Class UPointCurve. It is so Bad, I can't even believe it myself… you can see the behaviour of this curve in this revision. have fun

File:
1 edited

Legend:

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

    r3322 r3327  
    1313
    1414
    15 //! An abstract class to handle curves.
     15//! An abstract class to handle curves. Needed for the Tracking system in orxonox.
    1616class Curve
    1717{
     
    2828    int number;          //!< The N-th node of this curve.
    2929    float factor;        //!< Curve specific multiplier factor.
     30    Vector vFactor;      //!< A Vector-factor for multipliing.
    3031    Vector position;     //!< Vector Pointung to this curve-point.
    3132    PathNode* next;      //!< Pointer to the next Node.
     
    4647};
    4748
    48 //! Bezier Curve
     49//!    Class to handle bezier curves in 3-dimesnsional space
    4950/**
    50    Class to handle bezier curves in 3-dimesnsional space
    51    
    52    needed for  the Tracking system in OrxOnoX.
     51   This Curve is good, for Fast Interaction. If you want to change it during the game, go on.
     52   !!be aware!! BezierCurves only flow through their first and last Node. Their Tangents at those Points a directed to the second and second-last Point.
    5353*/
    5454class BezierCurve : public Curve
     
    8181};
    8282
     83//! Uniform Point Curve-class
     84/**
     85   A UPoint Curve is a A Curve, that flows through all the nodes given it.
     86   The Algorithm to buid the curve is rather slow, but Painting and tracing along the curve has high speed, so do not change this curve during the Game.
     87
     88   This Curve is very erattic, so i do not recommend to use it.
     89*/
     90class UPointCurve : public Curve
     91{
     92 private:
     93  void rebuild(void);
     94 public:
     95  UPointCurve(void);
     96  UPointCurve(int derivation);
     97  ~UPointCurve(void);
     98  void init(void);
     99
     100  Vector calcPos(float t);
     101  Vector calcDir(float t);
     102  Quaternion calcQuat(float t);
     103 
     104  Vector getPos(void) const;
     105};
    83106
    84107#endif /* _CURVE_H */
Note: See TracChangeset for help on using the changeset viewer.