Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10645 was 10642, checked in by rennerc, 18 years ago

implemented action box

File size: 2.4 KB
RevLine 
[10084]1/*!
2 * @file track.h
3 */
[10088]4
[10084]5#ifndef _TRACK_H_
6#define _TRACK_H_
7
8#include "curve.h"
9#include "base_object.h"
10
[10085]11// Forward Definition
12class PNode;
13class TiXmlElement;
[10642]14class ActionBox;
[10085]15
[10084]16class Track : public BaseObject
17{
[10088]18  ObjectListDeclaration(Track);
19
[10085]20 public:
[10088]21   Track();
22   Track(const TiXmlElement* root);
23   virtual ~Track();
24
[10091]25   virtual void loadParams(const TiXmlElement* root);
26   void addPoint(float x, float y, float z);
[10284]27   void addPointV(Vector newPoint);
[10297]28   void setSpeed(float speed);
[10385]29   void setMode(int newMode);
[10498]30   void pauseTrack(bool stop);
[10088]31
[10284]32   //void finalize();
[10091]33   inline Vector calcPos() const;
34   inline Vector calcDir() const;
35   void tick(float dt);
[10088]36
[10091]37   PNode* getTrackNode();
[10410]38
39   void drawGraph(float dt = 0.01) const;
40
[10096]41   //float                 startingTime;         //!< The time at which this Track begins.
[10454]42   float                 speed;
[10091]43   float                 duration;             //!< The time used to cross this Track (curve).
44   float                 endTime;              //!< The time at which this Track ends.
[10641]45   float                 width;                //!< The width of the action box, next to the player.
46   float                 height;               //!< The Height of the action box, next to the player
47   float                 depth;                //!< Depth of the action box
48   float                 stretch;              //!< multiplyer between w/h at player and w/h at far end of the action box
[10088]49
[10091]50   int                   nodeCount;            //!< The count of points this Track has.
51   Curve*                curve;                //!< The Curve of this Track
[10088]52
[10091]53 private:
54   void init();
[10642]55   
[10085]56 private:
[10091]57   CurveType            curveType;              //!< The CurveType the entire TrackSystem will have.
58   float                localTime;              //!< The time that has been passed since the traveling the Track.
59   PNode*               trackNode;              //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself.
[10385]60   int                  mode;                   //!< Defines the behaviour of the Track.
[10498]61   bool                 pause;                  //!< Defines if the track runs (false) or not (true)
[10642]62   
63   ActionBox*           actionBox;
64   
65   void addActionBox( float width_2, float height_2, float depth, float stretch );
66   
67
[10085]68};
69
70#endif /* _TRACK_H */
Note: See TracBrowser for help on using the repository browser.