Last change
on this file since 10616 was
10498,
checked in by bknecht, 18 years ago
|
use pauseCamera in scripts to pause the track of the camera. this works also with pause on NPCs and spaceships with tracks
|
File size:
2.0 KB
|
Rev | Line | |
---|
[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 |
---|
| 12 | class PNode; |
---|
| 13 | class TiXmlElement; |
---|
| 14 | |
---|
[10084] | 15 | class Track : public BaseObject |
---|
| 16 | { |
---|
[10088] | 17 | ObjectListDeclaration(Track); |
---|
| 18 | |
---|
[10085] | 19 | public: |
---|
[10088] | 20 | Track(); |
---|
| 21 | Track(const TiXmlElement* root); |
---|
| 22 | virtual ~Track(); |
---|
| 23 | |
---|
[10091] | 24 | virtual void loadParams(const TiXmlElement* root); |
---|
| 25 | void addPoint(float x, float y, float z); |
---|
[10284] | 26 | void addPointV(Vector newPoint); |
---|
[10297] | 27 | void setSpeed(float speed); |
---|
[10385] | 28 | void setMode(int newMode); |
---|
[10498] | 29 | void pauseTrack(bool stop); |
---|
[10088] | 30 | |
---|
[10284] | 31 | //void finalize(); |
---|
[10091] | 32 | inline Vector calcPos() const; |
---|
| 33 | inline Vector calcDir() const; |
---|
| 34 | void tick(float dt); |
---|
[10088] | 35 | |
---|
[10091] | 36 | PNode* getTrackNode(); |
---|
[10410] | 37 | |
---|
| 38 | void drawGraph(float dt = 0.01) const; |
---|
| 39 | |
---|
[10096] | 40 | //float startingTime; //!< The time at which this Track begins. |
---|
[10454] | 41 | float speed; |
---|
[10091] | 42 | float duration; //!< The time used to cross this Track (curve). |
---|
| 43 | float endTime; //!< The time at which this Track ends. |
---|
| 44 | float width; //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right. |
---|
[10088] | 45 | |
---|
[10091] | 46 | int nodeCount; //!< The count of points this Track has. |
---|
| 47 | Curve* curve; //!< The Curve of this Track |
---|
[10088] | 48 | |
---|
[10091] | 49 | private: |
---|
| 50 | void init(); |
---|
[10088] | 51 | |
---|
[10091] | 52 | |
---|
[10085] | 53 | private: |
---|
[10091] | 54 | CurveType curveType; //!< The CurveType the entire TrackSystem will have. |
---|
| 55 | float localTime; //!< The time that has been passed since the traveling the Track. |
---|
| 56 | 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] | 57 | int mode; //!< Defines the behaviour of the Track. |
---|
[10498] | 58 | bool pause; //!< Defines if the track runs (false) or not (true) |
---|
[10085] | 59 | }; |
---|
| 60 | |
---|
| 61 | #endif /* _TRACK_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.