Last change
on this file since 10088 was
10088,
checked in by patrick, 18 years ago
|
added the track subsystem to the buildprocess again, integrated it into the new basobject framework and commented out big regions of code because it didn't compile.
@beni: your work now can begin
|
File size:
1.3 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; |
---|
[10088] | 14 | class TrackElement; |
---|
[10085] | 15 | |
---|
[10084] | 16 | class Track : public BaseObject |
---|
| 17 | { |
---|
[10088] | 18 | ObjectListDeclaration(Track); |
---|
| 19 | |
---|
[10085] | 20 | public: |
---|
[10088] | 21 | Track(); |
---|
| 22 | Track(const TiXmlElement* root); |
---|
| 23 | virtual ~Track(); |
---|
| 24 | |
---|
[10085] | 25 | virtual void loadParams(const TiXmlElement* root); |
---|
| 26 | void addPoint(float x, float y, float z); |
---|
| 27 | void addPoint(Vector newPoint); |
---|
[10088] | 28 | |
---|
[10085] | 29 | void finalize(); |
---|
| 30 | inline Vector calcPos() const; |
---|
| 31 | inline Vector calcDir() const; |
---|
| 32 | void tick(float dt); |
---|
[10088] | 33 | |
---|
[10085] | 34 | PNode* getTrackNode(); |
---|
[10088] | 35 | |
---|
| 36 | private: |
---|
| 37 | void init(); |
---|
| 38 | |
---|
| 39 | |
---|
[10085] | 40 | private: |
---|
| 41 | TrackElement* firstTrackElem; //!< The first TrackElement that exists. |
---|
| 42 | TrackElement* currentTrackElem; //!< The TrackElement we are working on. |
---|
| 43 | CurveType curveType; //!< The CurveType the entire TrackSystem will have. |
---|
| 44 | int trackElemCount; //!< The count of TrackElements that exist. |
---|
[10088] | 45 | |
---|
[10085] | 46 | PNode* trackNode; //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself. |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | #endif /* _TRACK_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.