Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2005, 3:51:32 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: TrackManager: wrote raw material for most Functions. It compiles, but there still is a lot to do.

  1. Forking and Joining.
  2. Initialisation of TrackElement
  3. Condition
  4. much more
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/track_manager.h

    r3331 r3332  
    3333  ~TrackElement(void);
    3434
     35  TrackElement* findByID(unsigned int trackID);
     36
     37  bool isFresh;              //!< If no Points where added until now
    3538  bool isSavePoint;          //!< If the first node is a savePoint
    3639  bool isFork;               //!< If the first node is a Fork
     
    4144  CurveType curveType;       //!< The CurveType this will have.
    4245  int nodeCount;             //!< The count of points this TrackElement has.
     46  char* name;                //!< A name for the Trac.
    4347  Curve* curve;              //!< The Curve of this TrackElement
    4448  int childCount;            //!< The number of Children This TrackElement has.
     
    5660   <b>1. Initialize it, by setting up the Graph. You can do this by using the following Commands.</b>
    5761    \li workOn(): changes the ID that will be altered through the changes.
    58     \li setType: lets you set the CurveType of the Curve we are Working on. (default is BezierCurve, set this as early as possible, for this uses resources).
     62    \li setCurveType(): lets you set the CurveType of the Curve we are Working on. (default is BezierCurve, set this as early as possible, for this uses resources).
    5963    \li setLength(): sets the length of the current path in seconds.
    6064    \li addPoint(): adds a point to the Curve.
     
    6569    \li setSavePoint(): Sets a HotPoint into a savePoint. A Savepoint can be used as a rollbackpoint if a Player gets shot.
    6670
    67 
     71    HotPoints and Joins are at the beginning of a TrackElement. \n
     72    SavePoints and Forks are at the end of a TrackElement \n
    6873    look out: <b>SAVEPOINTS CAN NOT BE FORKS</b> (but joins), because the condition is really hard to guess if you do not give some impuls. \n
    6974\n
     
    9095  static TrackManager* singletonRef;  //!< There may only be one TrackManager existing.
    9196  TrackElement* firstTrackElem;       //!< The first TrackElement that exists.
    92   TrackElement* currentTrackElem;       //!< The TrackElement we are working on.
     97  TrackElement* currentTrackElem;     //!< The TrackElement we are working on.
    9398  float localTime;                    //!< The time that has been passed since the traveling the Track.
    9499  float maxTime;                      //!< The maximal time the track has.
     
    96101 
    97102
    98   TrackElement findTrackElementByID(int trackID);
     103  TrackElement* findTrackElementByID(unsigned int trackID) const;
    99104 
    100105
     
    104109
    105110  // Methods to change the Path (initialisation)
    106   void workOn(int trackID);
    107   void setType(CurveType curveType);
     111  void workOn(unsigned int trackID);
     112  void setCurveType(CurveType curveType);
    108113  void setLength(float time);
    109114  void addPoint(Vector newPoint);
    110115  void addHotPoint(Vector newPoint);
    111116  void setSavePoint(void);
    112   void fork(int count, ...);
    113   void forkV(int count, int* trackIDs);
    114   void condition(int groupID, PathCondition cond); //!< \todo really do this!!
    115   void join(int count, ...);
    116   void joinV(int count, int* trackIDs);
     117  void fork(unsigned int count, ...);
     118  void forkV(unsigned int count, int* trackIDs);
     119  void condition(unsigned int groupID, PathCondition cond); //!< \todo really do this!!
     120  void join(unsigned int count, ...);
     121  void joinV(unsigned int count, int* trackIDs);
    117122
    118123  // Methods to calculate the position on the Path (runtime)
    119   Vector calcPos();
    120   Vector calcDir();
     124  Vector calcPos(void) const;
     125  Vector calcDir(void) const;
    121126  void tick(float dt);
    122127  void jumpTo(float time);
Note: See TracChangeset for help on using the changeset viewer.