Changeset 3980 in orxonox.OLD
- Timestamp:
- Apr 26, 2005, 2:48:43 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3977 r3980 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_ 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);479 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_SINE); 480 animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_SINE); 481 animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_LINEAR, ANIM_SINE); 482 482 483 483 //animation->addKeyFrame(Vector(0, 0, 0), Quaternion(), 1.0, ANIM_LINEAR); -
orxonox/trunk/src/util/animation/animation3d.cc
r3979 r3980 15 15 2005-04-17: Benjamin Grauer 16 16 Rewritte all functions, so it will fit into the Animation-class 17 2005-04-25: Patrick Boenzli 18 Extended the framework to support quatSlerp rotations. Each frame now supports diff mov/rot types. Implemented mov/rot functions 17 19 */ 18 20 … … 220 222 (this->nextKeyFrame->position - this->currentKeyFrame->position) * 221 223 (timePassed/this->currentKeyFrame->duration)); 222 223 this->object->setRelDir(quatSlerp( this->nextKeyFrame->direction,224 this->currentKeyFrame->direction,225 timePassed/this->currentKeyFrame->duration) );226 227 224 } 228 225 … … 411 408 void Animation3D::rExp(float timePassed) const 412 409 { 413 410 PRINTF(0)("exp rotation function not implemented\n"); 414 411 } 415 412 … … 435 432 void Animation3D::rQuadratic(float timePassed) const 436 433 { 434 PRINTF(0)("quadratic rotation alg not implemented\n"); 437 435 } 438 436 … … 443 441 void Animation3D::rRandom(float timePassed) const 444 442 { 445 } 443 PRINTF(0)("random rotation alg not implemented\n"); 444 } -
orxonox/trunk/src/world_entities/player.cc
r3966 r3980 52 52 //weapons: 53 53 this->weaponMan = new WeaponManager(); 54 Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0);54 Weapon* wpRight = new TestGun(this, Vector(-2.6, 0.1, 3.0), Quaternion(), 0); 55 55 Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1); 56 56 -
orxonox/trunk/src/world_entities/test_gun.cc
r3888 r3980 49 49 this->objectComponent1 = new PNode(); 50 50 this->animation1 = new Animation3D(this->objectComponent1); 51 //this->animation2 = new Animation3D(this); 51 52 parent->addChild(this->objectComponent1, PNODE_ALL); 52 53 53 54 this->animation1->setInfinity(ANIM_INF_CONSTANT); 54 // ANIM_LINEAR was ANIM_NEG_EXP55 //this->animation2->setInfinity(ANIM_INF_CONSTANT); 55 56 if( this->leftRight == W_LEFT) 56 57 { … … 60 61 this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR); 61 62 this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR); 63 64 //this->animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); 65 //this->animation2->addKeyFrame(Vector(-2.6, 0.1, 1.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR); 62 66 } 63 67 else if( this->leftRight == W_RIGHT) … … 65 69 this->projectileOffset = Vector(1.0, 0.0, 0.5); 66 70 67 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_ LINEAR);68 this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_ LINEAR);69 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_ LINEAR);71 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP); 72 this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_NEG_EXP); 73 this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_NEG_EXP); 70 74 } 71 75 } … … 89 93 */ 90 94 void TestGun::activate() 91 {} 95 { 96 printf("ACTIVATE \n"); 97 this->animation2->replay(); 98 } 92 99 93 100 … … 100 107 */ 101 108 void TestGun::deactivate() 102 {} 109 { 110 printf("DEACTIVATE\n"); 111 } 103 112 104 113
Note: See TracChangeset
for help on using the changeset viewer.