Main Page | Class List | File List | Class Members | Related Pages

TrackManager Class Reference

The TrackManager handles the flow of the Players through the game. More...

#include <track_manager.h>

List of all members.

Public Member Functions

 TrackManager ()
 standard constructor
 ~TrackManager ()
 standard deconstructor
void workOn (int trackID)
 Sets the trackID we are working on.
void setType (CurveType curveType)
 Sets the Type of the Curve curveType The Type to set.
void setLength (float time)
 Sets the length of the current path in seconds.
void addPoint (Vector newPoint)
 adds a point to the current TrackElement
void addHotPoint (Vector newPoint)
 adds save/splitpoint.
void setSavePoint (void)
 Sets the last HotPoint into a savePoint.
void fork (int count,...)
 adds some interessting non-linear movments through the level.
void forkV (int count, int *trackIDs)
 adds some interessting non-linear movments through the level.
void condition (int groupID, PathCondition cond)
 decides under what condition a certain Path will be chosen.
void join (int count,...)
 joins some tracks together again.
void joinV (int count, int *trackIDs)
 joins some tracks together again.
Vector calcPos ()
 calculates the Position for the localTime of the Track.
Vector calcDir ()
 calculates the Rotation for the localTime of the Track.
void tick (float dt)
 Advances the local-time of the Track around dt.
void choosePath (int graphID)
 a Function that decides which Path we should follow.

Private Member Functions

TrackElement findTrackElementByID (int trackID)
 Searches for a given trackID.

Private Attributes

TrackElementfirstGraph
 The first Graph-element we are on.
TrackElementcurrentGraph
 The Graph-element we are working on.
float localTime
 The time that has been passed since the traveling the Track.
int trackElementCount
 The count of TrackElements that exist.


Detailed Description

The TrackManager handles the flow of the Players through the game.

Todo:
write the methodes
The TrackManager works as followed:

1. Initialize it, by setting up the Graph. You can do this by using the following Commands. look out: SAVEPOINTS CAN NOT BE FORKS (but joins), because the condition is really hard to guess if you do not give some impuls.

2. Runtime knows the following: TrackManager can be handled as a StateMachine.


Constructor & Destructor Documentation

TrackManager::TrackManager  ) 
 

standard constructor

Todo:
this constructor is not jet implemented - do it

TrackManager::~TrackManager  ) 
 

standard deconstructor

Todo:
this deconstructor is not jet implemented - do it


Member Function Documentation

void TrackManager::addHotPoint Vector  newPoint  ) 
 

adds save/splitpoint.

Parameters:
newPoint The point to add.

void TrackManager::addPoint Vector  newPoint  ) 
 

adds a point to the current TrackElement

Parameters:
newPoint The point to add.

Vector TrackManager::calcDir  ) 
 

calculates the Rotation for the localTime of the Track.

Returns:
the calculated Rotation

Vector TrackManager::calcPos  ) 
 

calculates the Position for the localTime of the Track.

Returns:
the calculated Position

void TrackManager::choosePath int  graphID  ) 
 

a Function that decides which Path we should follow.

Parameters:
graphID The Path to choose.

void TrackManager::condition int  groupID,
PathCondition  cond
 

decides under what condition a certain Path will be chosen.

Todo:
really do this!!

TrackElement TrackManager::findTrackElementByID int  trackID  )  [private]
 

Searches for a given trackID.

Parameters:
trackID the trackID to search for.
Returns:
The TrackElement #trackID if found, NULL otherways.

void TrackManager::fork int  count,
  ...
 

adds some interessting non-linear movments through the level.

Parameters:
count The Count of childrens the current HotPoint will have.
If no HotPoint was defined the last added Point will be rendered into a fork.
If the HotPoint was defined as a savePoint the Point will not be set into a fork.

void TrackManager::forkV int  count,
int *  trackIDs
 

adds some interessting non-linear movments through the level.

Parameters:
count The Count of childrens the current HotPoint will have.
trackIDs A Pointer to an Array of ints which will hold the trackID's (the user will have to reserve space for this).
See also:
void TrackManager::fork(int count, ...)

void TrackManager::join int  count,
  ...
 

joins some tracks together again.

Parameters:
count The count of Paths to join.
Join will set the localTime to the longest time a Path has to get to this Point.
Join will join all curves to the first curve.

void TrackManager::joinV int  count,
int *  trackIDs
 

joins some tracks together again.

Parameters:
count The count of Paths to join.
trackIDs an Array with the trackID's to join
See also:
void TrackManager::join(int count, ...)

void TrackManager::setLength float  time  ) 
 

Sets the length of the current path in seconds.

Parameters:
time The length in seconds.

void TrackManager::setSavePoint void   ) 
 

Sets the last HotPoint into a savePoint.

If no HotPoint was defined the last added Point will be rendered into a savePoint.
If the HotPoint was defined as a fork the Point will not be set into a savePoint.

void TrackManager::tick float  dt  ) 
 

Advances the local-time of the Track around dt.

Parameters:
dt The time about which to advance.

void TrackManager::workOn int  trackID  ) 
 

Sets the trackID we are working on.

Parameters:
trackID the trackID we are working on


The documentation for this class was generated from the following files:
Generated on Tue Jan 4 05:51:08 2005 for Orxonox by doxygen 1.3.8