Changeset 3964 in orxonox.OLD for orxonox/trunk/src/util/animation
- Timestamp:
- Apr 25, 2005, 11:45:57 PM (20 years ago)
- Location:
- orxonox/trunk/src/util/animation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation3d.cc
r3876 r3964 134 134 if( this->currentKeyFrame->animFunc == ANIM_NEG_EXP) 135 135 { 136 this->tmpVect = this->nextKeyFrame->position - this->currentKeyFrame->position; 137 this->deltaT = 1/this->currentKeyFrame->duration * logf(1.0 + 600.0/this->tmpVect.len()); 136 138 137 } 139 138 } … … 206 205 case ANIM_NEG_EXP: 207 206 this->animFunc = &Animation3D::negExp; 207 //this->tmpVect = this->nextKeyFrame->position - this->currentKeyFrame->position; 208 //this->deltaT = 1/this->currentKeyFrame->duration * logf(1.0 + 600.0/this->tmpVect.len()); 209 this->expFactor = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); 210 //(this->currentKeyFrame->position - this->nextKeyFrame->position) 211 212 /* 213 float d = fabs(this->currentKeyFrame->value - this->nextKeyFrame->value); 214 expFactor = - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X); 215 216 */ 208 217 break; 209 218 case ANIM_QUADRATIC: … … 284 293 void Animation3D::negExp(float timePassed) const 285 294 { 286 this->linear(timePassed); 287 } 295 this->object->setRelCoor( this->currentKeyFrame->position + 296 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 297 (1.0 - expf(- timePassed * expFactor)) ); 298 } 299 300 /* 301 float d = this->currentKeyFrame->value - this->nextKeyFrame->value; 302 float e = d * (1.0 - expf(- timePassed * expFactor)); 303 return this->currentKeyFrame->value - e; 304 */ 305 288 306 289 307 /** -
orxonox/trunk/src/util/animation/animation3d.h
r3868 r3964 8 8 #include "vector.h" 9 9 class PNode; 10 11 #define DELTA_X_3D 0.05 //!< the percentag of the distance that doesnt have to be done by neg_exp (asymptotical) ~ maschinendelta 10 12 11 13 //! KeyFrame3D Struct … … 60 62 Vector tmpVect; //!< what for?? 61 63 float deltaT; //!< ?? 64 float expFactor; 62 65 };
Note: See TracChangeset
for help on using the changeset viewer.