Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10096 was 10096, checked in by bknecht, 18 years ago

connected the track with the worldentities and the spaceship

File size: 1.6 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;
14
[10084]15class 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);
26   void addPoint(Vector newPoint);
[10088]27
[10091]28   void finalize();
29   inline Vector calcPos() const;
30   inline Vector calcDir() const;
31   void tick(float dt);
[10088]32
[10091]33   PNode* getTrackNode();
34     
[10096]35   //float                 startingTime;         //!< The time at which this Track begins.
[10091]36   float                 duration;             //!< The time used to cross this Track (curve).
37   float                 endTime;              //!< The time at which this Track ends.
38   float                 width;                //!< Th width of the Path. This tells the Player(s), how far he(they) can go to the left/right.
[10088]39
[10091]40   int                   nodeCount;            //!< The count of points this Track has.
41   Curve*                curve;                //!< The Curve of this Track
[10088]42
[10091]43 private:
44   void init();
[10088]45
[10091]46
[10085]47 private:
[10091]48   CurveType            curveType;              //!< The CurveType the entire TrackSystem will have.
49   float                localTime;              //!< The time that has been passed since the traveling the Track.
50   PNode*               trackNode;              //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself.
[10085]51};
52
53#endif /* _TRACK_H */
Note: See TracBrowser for help on using the repository browser.