Changeset 3522 in orxonox.OLD for orxonox/trunk/src/track_manager.h
- Timestamp:
- Mar 13, 2005, 12:05:07 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/track_manager.h
r3495 r3522 17 17 class PNode; 18 18 19 //! condition for choosing a certain Path. \todo implement a useful way.20 struct PathCondition21 {22 23 };24 25 26 19 //! A Graph-Element, that holds the curve-structure of a Level. 27 20 /** … … 36 29 37 30 TrackElement* findByID(unsigned int trackID); 31 bool backLoopCheck(TrackElement* trackElem); 38 32 39 33 bool isFresh; //!< If no Points where added until now … … 43 37 bool isJoined; //!< If the End of the Curve is joined. 44 38 bool mainJoin; //!< If the End of the Curve is joined, and this is the one Curve the others join to. 45 PathCondition cond; //!< The Split Condition;46 39 int ID; //!< The ID of this TrackElement 47 40 float startingTime; //!< The time at which this Track begins. … … 55 48 int childCount; //!< The number of Children This TrackElement has. 56 49 TrackElement** children; //!< A TrackElement can have a Tree of following TrackElements. 50 51 // CONDITION FUNCTIONS and STUFF 52 void* subject; //!< The Subject the Condition should act upon. 53 int (TrackElement::*condFunc)(void*); //!< Pointer to the condition function 54 55 int lowest(void* nothing); 56 int highest(void* nothing); 57 int random(void* nothing); 58 59 int leftRight(void* node); 60 int nearest(void* node); 61 // todo int enemyKilled(void* entity); 57 62 }; 58 63 59 64 //! the Condition to choose between the different ways of the game. 65 enum CONDITION {LOWEST, HIGHEST, RANDOM, LEFTRIGHT, NEAREST, ENEMYKILLED}; 60 66 61 67 //! The TrackManager handles the flow of the Players through the game. … … 105 111 float maxTime; //!< The maximal time the track has. 106 112 int trackElemCount; //!< The count of TrackElements that exist. 107 PNode* bindSlave; 113 PNode* bindSlave; //!< The node that is slave to the TrackManager. This node will be moved while update the TrackManager, and must NOT move itself. 108 114 109 115 void initChildren(unsigned int childCount); … … 117 123 // Methods to change the Path (initialisation) 118 124 void workOn(unsigned int trackID); 119 inline void setCurveType(CurveType curveType) { this->setCurveType (curveType, this->currentTrackElem);} 125 /** \see setCurveType(CurveType curveType, TrackElement* trackElem); \param curveType the type of the Curve */ 126 inline void setCurveType(CurveType curveType) { this->setCurveType (curveType, this->currentTrackElem);}; 120 127 void setCurveType(CurveType curveType, TrackElement* trackElem); 121 128 void setDuration(float time); … … 126 133 void fork(unsigned int count, ...); 127 134 void forkV(unsigned int count, int* trackIDs); 128 void condition(unsigned int groupID, PathCondition cond); //!< \todo really do this!! 135 void condition(CONDITION cond, void* subject); 136 void condition(unsigned int groupID, CONDITION cond, void* subject); 129 137 void join(unsigned int count, ...); 130 138 void joinV(unsigned int count, int* trackIDs); … … 132 140 133 141 // Methods to calculate the position on the Path (runtime) 134 Vector calcPos(void) const;135 Vector calcDir(void) const;142 inline Vector calcPos(void) const; 143 inline Vector calcDir(void) const; 136 144 void tick(float dt); 137 145 void jumpTo(float time); 138 void choosePath(int graphID);146 inline int choosePath(TrackElement* trackElem); 139 147 140 148 void setBindSlave(PNode* bindSlave);
Note: See TracChangeset
for help on using the changeset viewer.