Last change
on this file since 10399 was
10385,
checked in by bknecht, 18 years ago
|
you're now able to set the track's mode
|
File size:
1.8 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 |
---|
12 | class PNode; |
---|
13 | class TiXmlElement; |
---|
14 | |
---|
15 | class 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 | |
---|
30 | //void finalize(); |
---|
31 | inline Vector calcPos() const; |
---|
32 | inline Vector calcDir() const; |
---|
33 | void tick(float dt); |
---|
34 | |
---|
35 | PNode* getTrackNode(); |
---|
36 | |
---|
37 | // void drawGraph(float dt) const; |
---|
38 | |
---|
39 | //float startingTime; //!< The time at which this Track begins. |
---|
40 | float duration; //!< The time used to cross this Track (curve). |
---|
41 | float endTime; //!< The time at which this Track ends. |
---|
42 | float width; //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right. |
---|
43 | |
---|
44 | int nodeCount; //!< The count of points this Track has. |
---|
45 | Curve* curve; //!< The Curve of this Track |
---|
46 | |
---|
47 | private: |
---|
48 | void init(); |
---|
49 | |
---|
50 | |
---|
51 | private: |
---|
52 | CurveType curveType; //!< The CurveType the entire TrackSystem will have. |
---|
53 | float localTime; //!< The time that has been passed since the traveling the Track. |
---|
54 | PNode* trackNode; //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself. |
---|
55 | int mode; //!< Defines the behaviour of the Track. |
---|
56 | }; |
---|
57 | |
---|
58 | #endif /* _TRACK_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.