Changeset 3852 in orxonox.OLD for orxonox/trunk/src/animation3d.cc
- Timestamp:
- Apr 17, 2005, 1:39:10 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/animation3d.cc
r3851 r3852 27 27 28 28 29 Animation3D::Animation3D(void) 30 { 29 Animation3D::Animation3D(PNode* object) 30 { 31 this->object = object; 32 31 33 // create a new List 32 34 this->keyFrameList = new tList<KeyFrame3D>(); … … 95 97 } 96 98 97 void Animation3D::tick(float timePassed)99 void Animation3D::tick(float dt) 98 100 { 99 101 if (this->bRunning) 100 102 { 101 this->localTime += timePassed;103 this->localTime += dt; 102 104 if (localTime >= this->currentKeyFrame->duration) 103 105 { … … 201 203 } 202 204 203 float Animation3D::constant(float timePassed) const 204 { 205 206 } 207 208 float Animation3D::linear(float timePassed) const 209 { 210 211 } 212 213 float Animation3D::sine(float timePassed) const 214 { 215 216 } 217 218 float Animation3D::cosine(float timePassed) const 219 { 220 221 } 222 223 float Animation3D::exp(float timePassed) const 224 { 225 226 } 227 228 float Animation3D::negExp(float timePassed) const 229 { 230 231 } 232 233 float Animation3D::quadratic(float timePassed) const 234 { 235 236 } 237 238 float Animation3D::random(float timePassed) const 239 { 240 241 } 205 void Animation3D::constant(float timePassed) const 206 { 207 this->object->setRelCoor(this->currentKeyFrame->position); 208 209 /* 210 this->tmpVect = this->nextKeyFrame->position - this->currentKeyFrame->position; 211 this->tmpVect = this->tmpVect * this->localTime / this->currentKeyFrame->duration; 212 this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect); 213 this->lastPosition = this->tmpVect; 214 */ 215 } 216 217 void Animation3D::linear(float timePassed) const 218 { 219 this->object->setRelCoor(this->currentKeyFrame->position + 220 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 221 (timePassed/this->currentKeyFrame->duration)); 222 } 223 224 void Animation3D::sine(float timePassed) const 225 { 226 227 } 228 229 void Animation3D::cosine(float timePassed) const 230 { 231 232 } 233 234 void Animation3D::exp(float timePassed) const 235 { 236 237 } 238 239 void Animation3D::negExp(float timePassed) const 240 { 241 242 } 243 244 void Animation3D::quadratic(float timePassed) const 245 { 246 247 } 248 249 void Animation3D::random(float timePassed) const 250 { 251 252 }
Note: See TracChangeset
for help on using the changeset viewer.