Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/vs-enhencements/src/util/track/track.h @ 10640

Last change on this file since 10640 was 10640, checked in by nicolasc, 17 years ago

visual version of the action box, currently in the track.{cc,h}

File size: 2.1 KB
Line 
1/*!
2 * @file track.h
3 */
4
5#ifndef _TRACK_H_
6#define _TRACK_H_
7
8#include "curve.h"
9#include "base_object.h"
10
11// Forward Definition
12class PNode;
13class TiXmlElement;
14
15class Track : public BaseObject
16{
17  ObjectListDeclaration(Track);
18
19 public:
20   Track();
21   Track(const TiXmlElement* root);
22   virtual ~Track();
23
24   virtual void loadParams(const TiXmlElement* root);
25   void addPoint(float x, float y, float z);
26   void addPointV(Vector newPoint);
27   void setSpeed(float speed);
28   void setMode(int newMode);
29   void pauseTrack(bool stop);
30
31   //void finalize();
32   inline Vector calcPos() const;
33   inline Vector calcDir() const;
34   void tick(float dt);
35
36   PNode* getTrackNode();
37
38   void drawGraph(float dt = 0.01) const;
39   void drawBox() const;
40
41   //float                 startingTime;         //!< The time at which this Track begins.
42   float                 speed;
43   float                 duration;             //!< The time used to cross this Track (curve).
44   float                 endTime;              //!< The time at which this Track ends.
45   float                 width;                //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right.
46   float                 height;
47   float                 depth;
48   float                 stretch;
49
50   int                   nodeCount;            //!< The count of points this Track has.
51   Curve*                curve;                //!< The Curve of this Track
52
53 private:
54   void init();
55
56
57 private:
58   CurveType            curveType;              //!< The CurveType the entire TrackSystem will have.
59   float                localTime;              //!< The time that has been passed since the traveling the Track.
60   PNode*               trackNode;              //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself.
61   int                  mode;                   //!< Defines the behaviour of the Track.
62   bool                 pause;                  //!< Defines if the track runs (false) or not (true)
63};
64
65#endif /* _TRACK_H */
Note: See TracBrowser for help on using the repository browser.