Changeset 3977 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Apr 26, 2005, 2:11:29 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3976 r3977 477 477 animation->setInfinity(ANIM_INF_REPLAY); 478 478 479 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_ COSINE);480 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_ COSINE);481 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_ COSINE);479 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_NEG_EXP); 480 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_NEG_EXP); 481 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_NEG_EXP); 482 482 483 483 //animation->addKeyFrame(Vector(0, 0, 0), Quaternion(), 1.0, ANIM_LINEAR); -
orxonox/trunk/src/util/animation/animation3d.cc
r3976 r3977 174 174 case ANIM_NEG_EXP: 175 175 this->animFuncMov = &Animation3D::mNegExp; 176 this->expFactor = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D);176 this->expFactorMov = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); 177 177 break; 178 178 case ANIM_QUADRATIC: … … 252 252 253 253 254 /*255 return ((this->nextKeyFrame->value + this->currentKeyFrame->value) +256 (this->currentKeyFrame->value - this->nextKeyFrame->value) *257 cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;258 */259 254 260 255 /** … … 276 271 this->object->setRelCoor( this->currentKeyFrame->position + 277 272 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 278 (1.0 - expf(- timePassed * expFactor )) );273 (1.0 - expf(- timePassed * expFactorMov)) ); 279 274 } 280 275 … … 334 329 case ANIM_NEG_EXP: 335 330 this->animFuncRot = &Animation3D::rNegExp; 331 this->expFactorRot = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D); 336 332 break; 337 333 case ANIM_QUADRATIC: … … 351 347 void Animation3D::rConstant(float timePassed) const 352 348 { 349 this->object->setRelDir(this->currentKeyFrame->direction); 353 350 } 354 351 … … 401 398 402 399 403 /*404 return ((this->nextKeyFrame->value + this->currentKeyFrame->value) +405 (this->currentKeyFrame->value - this->nextKeyFrame->value) *406 cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;407 */408 400 409 401 /** … … 422 414 void Animation3D::rNegExp(float timePassed) const 423 415 { 416 float scale = (1.0 - expf(- timePassed * expFactorRot)); 417 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction, 418 this->currentKeyFrame->direction, 419 scale) ); 424 420 } 425 421 -
orxonox/trunk/src/util/animation/animation3d.h
r3973 r3977 73 73 Vector tmpVect; //!< what for?? 74 74 float deltaT; //!< ?? 75 float expFactor; 75 float expFactorMov; 76 float expFactorRot; 76 77 };
Note: See TracChangeset
for help on using the changeset viewer.