| 1 | |
|---|
| 2 | |
|---|
| 3 | /* |
|---|
| 4 | orxonox - the future of 3D-vertical-scrollers |
|---|
| 5 | |
|---|
| 6 | Copyright (C) 2004 orx |
|---|
| 7 | |
|---|
| 8 | This program is free software; you can redistribute it and/or modify |
|---|
| 9 | it under the terms of the GNU General Public License as published by |
|---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
|---|
| 11 | any later version. |
|---|
| 12 | |
|---|
| 13 | ### File Specific: |
|---|
| 14 | main-programmer: Patrick Boenzli |
|---|
| 15 | co-programmer: ... |
|---|
| 16 | */ |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | #include "track_manager.h" |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | using namespace std; |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | /** |
|---|
| 26 | \brief standard constructor |
|---|
| 27 | |
|---|
| 28 | \todo this constructor is not jet implemented - do it |
|---|
| 29 | */ |
|---|
| 30 | TrackManager::TrackManager () |
|---|
| 31 | { |
|---|
| 32 | this->setClassName ("TrackManager"); |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | /** |
|---|
| 37 | \brief standard deconstructor |
|---|
| 38 | |
|---|
| 39 | \todo this deconstructor is not jet implemented - do it |
|---|
| 40 | */ |
|---|
| 41 | TrackManager::~TrackManager () |
|---|
| 42 | { |
|---|
| 43 | |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | /** |
|---|
| 47 | \brief Searches for a given trackID. |
|---|
| 48 | \param trackID the trackID to search for. |
|---|
| 49 | \returns The TrackElement #trackID if found, NULL otherways. |
|---|
| 50 | */ |
|---|
| 51 | TrackElement TrackManager::findTrackElementByID(int trackID) |
|---|
| 52 | { |
|---|
| 53 | |
|---|
| 54 | } |
|---|
| 55 | |
|---|
| 56 | // INITIALIZE // |
|---|
| 57 | |
|---|
| 58 | /** |
|---|
| 59 | \brief Sets the trackID we are working on. |
|---|
| 60 | \param trackID the trackID we are working on |
|---|
| 61 | */ |
|---|
| 62 | void TrackManager::workOn(int trackID) |
|---|
| 63 | { |
|---|
| 64 | |
|---|
| 65 | } |
|---|
| 66 | |
|---|
| 67 | /** |
|---|
| 68 | \brief Sets the Type of the Curve |
|---|
| 69 | \brief curveType The Type to set |
|---|
| 70 | */ |
|---|
| 71 | void TrackManager::setType(CurveType curveType) |
|---|
| 72 | { |
|---|
| 73 | |
|---|
| 74 | } |
|---|
| 75 | |
|---|
| 76 | /** |
|---|
| 77 | \brief Sets the length of the current path in seconds. |
|---|
| 78 | \param time The length in seconds. |
|---|
| 79 | */ |
|---|
| 80 | |
|---|
| 81 | void TrackManager::setLength(float time) |
|---|
| 82 | { |
|---|
| 83 | |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | /** |
|---|
| 87 | \brief adds a point to the current TrackElement |
|---|
| 88 | \param newPoint The point to add. |
|---|
| 89 | */ |
|---|
| 90 | void TrackManager::addPoint(Vector newPoint) |
|---|
| 91 | { |
|---|
| 92 | |
|---|
| 93 | } |
|---|
| 94 | |
|---|
| 95 | /** |
|---|
| 96 | \brief adds save/splitpoint. |
|---|
| 97 | \param newPoint The point to add. |
|---|
| 98 | */ |
|---|
| 99 | void TrackManager::addHotPoint(Vector newPoint) |
|---|
| 100 | { |
|---|
| 101 | |
|---|
| 102 | } |
|---|
| 103 | |
|---|
| 104 | /** |
|---|
| 105 | \brief Sets the last HotPoint into a savePoint. |
|---|
| 106 | |
|---|
| 107 | If no HotPoint was defined the last added Point will be rendered into a savePoint. \n |
|---|
| 108 | If the HotPoint was defined as a fork the Point will \b not be set into a savePoint. |
|---|
| 109 | */ |
|---|
| 110 | void TrackManager::setSavePoint(void) |
|---|
| 111 | { |
|---|
| 112 | |
|---|
| 113 | } |
|---|
| 114 | |
|---|
| 115 | /** |
|---|
| 116 | \brief adds some interessting non-linear movments through the level. |
|---|
| 117 | \param count The Count of childrens the current HotPoint will have. |
|---|
| 118 | |
|---|
| 119 | If no HotPoint was defined the last added Point will be rendered into a fork. \n |
|---|
| 120 | If the HotPoint was defined as a savePoint the Point will \b not be set into a fork. |
|---|
| 121 | */ |
|---|
| 122 | void TrackManager::fork(int count, ...) |
|---|
| 123 | { |
|---|
| 124 | |
|---|
| 125 | } |
|---|
| 126 | |
|---|
| 127 | /** |
|---|
| 128 | \brief adds some interessting non-linear movments through the level. |
|---|
| 129 | \param count The Count of childrens the current HotPoint will have. |
|---|
| 130 | \param trackIDs A Pointer to an Array of ints which will hold the trackID's (the user will have to reserve space for this). |
|---|
| 131 | |
|---|
| 132 | \see void TrackManager::fork(int count, ...) |
|---|
| 133 | */ |
|---|
| 134 | void TrackManager::forkV(int count, int* trackIDs) |
|---|
| 135 | { |
|---|
| 136 | |
|---|
| 137 | } |
|---|
| 138 | |
|---|
| 139 | /** |
|---|
| 140 | \brief decides under what condition a certain Path will be chosen. |
|---|
| 141 | \param groupID the ID on which to choose the preceding move |
|---|
| 142 | \param cond \todo think about this |
|---|
| 143 | */ |
|---|
| 144 | void TrackManager::condition(int groupID, PathCondition cond) |
|---|
| 145 | { |
|---|
| 146 | |
|---|
| 147 | } |
|---|
| 148 | |
|---|
| 149 | /** |
|---|
| 150 | \brief joins some tracks together again. |
|---|
| 151 | \param count The count of Paths to join. |
|---|
| 152 | |
|---|
| 153 | Join will set the localTime to the longest time a Path has to get to this Point. \n |
|---|
| 154 | Join will join all curves to the first curve. |
|---|
| 155 | */ |
|---|
| 156 | void TrackManager::join(int count, ...) |
|---|
| 157 | { |
|---|
| 158 | |
|---|
| 159 | } |
|---|
| 160 | |
|---|
| 161 | /** |
|---|
| 162 | \brief joins some tracks together again. |
|---|
| 163 | \param count The count of Paths to join. |
|---|
| 164 | \param trackIDs an Array with the trackID's to join |
|---|
| 165 | |
|---|
| 166 | \see void TrackManager::join(int count, ...) |
|---|
| 167 | */ |
|---|
| 168 | void TrackManager::joinV(int count, int* trackIDs) |
|---|
| 169 | { |
|---|
| 170 | |
|---|
| 171 | } |
|---|
| 172 | |
|---|
| 173 | // RUNTIME // |
|---|
| 174 | |
|---|
| 175 | /** |
|---|
| 176 | \brief calculates the Position for the localTime of the Track. |
|---|
| 177 | \returns the calculated Position |
|---|
| 178 | */ |
|---|
| 179 | Vector TrackManager::calcPos() |
|---|
| 180 | { |
|---|
| 181 | |
|---|
| 182 | } |
|---|
| 183 | |
|---|
| 184 | /** |
|---|
| 185 | \brief calculates the Rotation for the localTime of the Track. |
|---|
| 186 | \returns the calculated Rotation |
|---|
| 187 | */ |
|---|
| 188 | Vector TrackManager::calcDir() |
|---|
| 189 | { |
|---|
| 190 | |
|---|
| 191 | } |
|---|
| 192 | |
|---|
| 193 | /** |
|---|
| 194 | \brief Advances the local-time of the Track around dt |
|---|
| 195 | \param dt The time about which to advance. |
|---|
| 196 | */ |
|---|
| 197 | void TrackManager::tick(float dt) |
|---|
| 198 | { |
|---|
| 199 | |
|---|
| 200 | } |
|---|
| 201 | |
|---|
| 202 | /** |
|---|
| 203 | \brief a Function that decides which Path we should follow. |
|---|
| 204 | \param graphID The Path to choose. |
|---|
| 205 | |
|---|
| 206 | */ |
|---|
| 207 | void TrackManager::choosePath(int graphID) |
|---|
| 208 | { |
|---|
| 209 | |
|---|
| 210 | } |
|---|
| 211 | |
|---|