Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/bezierTrack/src/curve.h @ 3178

Last change on this file since 3178 was 3028, checked in by bensch, 20 years ago

orxonox/branches/bezierTrack: now Camera follows Path. heavy cleanUp of not used stuff like elyptical Camera and so on…

File size: 967 bytes
RevLine 
[3018]1/*!
2    \file curve.h
3    \brief A basic 3D curve framework
4   
5    Contains classes to handle curves
6*/ 
7
8#ifndef _CURVE_H
9#define _CURVE_H
10
11#include "vector.h"
12
13
[3019]14
15class Curve
[3018]16{
[3019]17 protected:
[3018]18  int nodeCount;
19  Vector curvePoint;
[3023]20  float localTime; //!< if the time of one point is asked more than once the programm will not calculate it again.
[3019]21
[3018]22  struct PathNode
23  {
24    int number;
25    Vector position;
26    PathNode* next;
27  };
28
29  PathNode* firstNode; 
30  PathNode* currentNode; 
31
[3019]32 public:
[3018]33
[3019]34  void addNode (const Vector& newNode);
35
36};
37
38//! Bezier Curve
39/**
40   Class to handle bezier curves in 3-dimesnsional space
41   
42   needed for  the Tracking system in OrxOnoX.
43*/
44class BezierCurve : public Curve
45{
46 private:
47  // all from Curve-Class
[3018]48 public:
49  BezierCurve (void);
50  ~BezierCurve (void);
[3028]51  Vector calcPos (float t);
52  Vector calcDir (float t);
53  Quaternion calcQuat (float t);
[3018]54 
[3028]55 
[3018]56  Vector getPos () const;
57};
58
[3019]59int ncr(int n, int i);
[3018]60
61
62#endif /* _CURVE_H */
Note: See TracBrowser for help on using the repository browser.