Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/playability/src/util/track/track.h @ 10088

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 :D

File size: 1.3 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;
14class TrackElement;
15
16class Track : public BaseObject
17{
18  ObjectListDeclaration(Track);
19
20 public:
21   Track();
22   Track(const TiXmlElement* root);
23   virtual ~Track();
24
25      virtual void loadParams(const TiXmlElement* root);
26      void addPoint(float x, float y, float z);
27      void addPoint(Vector newPoint);
28
29      void finalize();
30      inline Vector calcPos() const;
31      inline Vector calcDir() const;
32      void tick(float dt);
33
34      PNode* getTrackNode();
35
36  private:
37    void init();
38
39
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.
45
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.