Changeset 3855 in orxonox.OLD for orxonox/trunk/src/animation3d.cc
- Timestamp:
- Apr 17, 2005, 2:46:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation3d.cc
r3853 r3855 20 20 #include "animation3d.h" 21 21 22 #include "stdincl.h"23 #include "vector.h"24 22 #include "p_node.h" 25 23 26 24 using namespace std; 27 25 28 26 /** 27 \brief standard constructor 28 */ 29 29 Animation3D::Animation3D(PNode* object) 30 30 { … … 44 44 } 45 45 46 /** 47 \brief standard deconstructor 48 49 deletes all the Keyframes 50 */ 46 51 Animation3D::~Animation3D(void) 47 52 { … … 58 63 } 59 64 60 65 /** 66 \brief rewinds the Animation to the beginning (first KeyFrame and time == 0) 67 */ 61 68 void Animation3D::rewind(void) 62 69 { … … 66 73 } 67 74 68 69 void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration = 1.0, ANIM_FUNCTION animFunc) 75 /** 76 \brief Appends a new Keyframe 77 \param position The position of the new Keyframe 78 \param direction The direction of the new Keyframe. 79 \param duration The duration from the new KeyFrame to the next one 80 \param animFunc The function to animate between this keyFrame and the next one 81 */ 82 void Animation3D::addKeyFrame(Vector position, Quaternion direction, float duration, ANIM_FUNCTION animFunc) 70 83 { 71 84 // some small check … … 97 110 } 98 111 112 /** 113 \brief ticks the Animation 114 \param dt how much time to tick 115 */ 99 116 void Animation3D::tick(float dt) 100 117 { … … 171 188 172 189 173 190 /** 191 \brief Sets The kind of Animation between this keyframe and the next one 192 \param animFunc The Type of Animation to set 193 */ 174 194 void Animation3D::setAnimFunc(ANIM_FUNCTION animFunc) 175 195 { … … 204 224 } 205 225 226 /** 227 \brief stays at the value of the currentKeyFrame 228 \param timePassed The time passed since this Keyframe began 229 */ 206 230 void Animation3D::constant(float timePassed) const 207 231 { … … 216 240 } 217 241 242 /** 243 \brief linear interpolation between this keyframe and the next one 244 \param timePassed The time passed since this Keyframe began 245 */ 218 246 void Animation3D::linear(float timePassed) const 219 247 { … … 223 251 } 224 252 253 /** 254 \brief a Sinusodial Interpolation between this keyframe and the next one 255 \param timePassed The time passed since this Keyframe began 256 */ 225 257 void Animation3D::sine(float timePassed) const 226 258 { … … 228 260 } 229 261 262 /** 263 \brief a cosine interpolation between this keyframe and the next one 264 \param timePassed The time passed since this Keyframe began 265 */ 230 266 void Animation3D::cosine(float timePassed) const 231 267 { … … 233 269 } 234 270 271 /** 272 \brief an exponential interpolation between this keyframe and the next one 273 \param timePassed The time passed since this Keyframe began 274 */ 235 275 void Animation3D::exp(float timePassed) const 236 276 { … … 238 278 } 239 279 280 /** 281 \brief a negative exponential interpolation between this keyframe and the next one 282 \param timePassed The time passed since this Keyframe began 283 */ 240 284 void Animation3D::negExp(float timePassed) const 241 285 { 242 243 } 244 286 this->linear(timePassed); 287 } 288 289 /** 290 \brief a quadratic interpolation between this keyframe and the next one 291 \param timePassed The time passed since this Keyframe began 292 */ 245 293 void Animation3D::quadratic(float timePassed) const 246 294 { … … 248 296 } 249 297 298 /** 299 \brief some random animation (fluctuating) 300 \param timePassed The time passed since this Keyframe began 301 */ 250 302 void Animation3D::random(float timePassed) const 251 303 {
Note: See TracChangeset
for help on using the changeset viewer.