Changeset 5062 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Aug 17, 2005, 1:02:01 AM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation.h
r5039 r5062 33 33 typedef enum ANIM_FUNCTION 34 34 { 35 ANIM_ CONSTANT,36 ANIM_ LINEAR,37 ANIM_ SINE,38 ANIM_ COSINE,39 ANIM_ EXP,40 ANIM_ NEG_EXP,41 ANIM_ QUADRATIC,42 ANIM_ RANDOM,43 ANIM_ NULL35 ANIM_NULL = 0, 36 ANIM_CONSTANT = 1, 37 ANIM_LINEAR = 2, 38 ANIM_SINE = 3, 39 ANIM_COSINE = 4, 40 ANIM_EXP = 5, 41 ANIM_NEG_EXP = 6, 42 ANIM_QUADRATIC = 7, 43 ANIM_RANDOM = 8, 44 44 }; 45 45 -
orxonox/trunk/src/util/animation/animation3d.cc
r4998 r5062 44 44 this->nextKeyFrame = tmpKeyFrame; 45 45 46 this->animFuncMov = &Animation3D::mLinear;47 this->animFuncRot = &Animation3D::rLinear;46 this->animFuncMov = NULL;//&Animation3D::mLinear; 47 this->animFuncRot = NULL;//&Animation3D::rLinear; 48 48 49 49 } … … 95 95 duration = 1.0; 96 96 // if the Rotation-Animation-function is set ANIM_NULL, animFuncRot will match animFuncRot 97 if (animFuncMov == ANIM_NULL)98 animFuncMov = ANIM_DEFAULT_FUNCTION;99 if (animFuncRot == ANIM_NULL)100 animFuncRot = animFuncMov;97 // if (animFuncMov == ANIM_NULL) 98 // animFuncMov = ANIM_DEFAULT_FUNCTION; 99 // if (animFuncRot == ANIM_NULL) 100 // animFuncRot = animFuncMov; 101 101 102 102 KeyFrame3D* tmpKeyFrame; … … 126 126 this->keyFrameCount++; 127 127 } 128 129 130 128 131 129 /** … … 158 156 } 159 157 /* now animate it */ 160 (this->*animFuncMov)(this->localTime); 161 (this->*animFuncRot)(this->localTime); 158 if (likely(this->animFuncMov != NULL)) 159 (this->*animFuncMov)(this->localTime); 160 if (likely(this->animFuncRot != NULL)) 161 (this->*animFuncRot)(this->localTime); 162 162 } 163 163 } … … 211 211 break; 212 212 default: 213 this->animFuncMov = NULL; 213 214 break; 214 215 } … … 353 354 switch (animFuncRot) 354 355 { 355 default:356 356 case ANIM_CONSTANT: 357 357 this->animFuncRot = &Animation3D::rConstant; … … 380 380 break; 381 381 382 default: 383 this->animFuncRot = NULL; 382 384 } 383 385 } … … 448 450 void Animation3D::rExp(float timePassed) const 449 451 { 450 PRINTF( 0)("exp rotation function not implemented\n");452 PRINTF(2)("exp rotation function not implemented\n"); 451 453 } 452 454 -
orxonox/trunk/src/world_entities/weapons/test_gun.cc
r5053 r5062 71 71 this->setEmissionPoint(1.0, 0.0, -0.35); 72 72 73 animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_ CONSTANT);74 animation1->addKeyFrame(Vector(-0.4, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_ CONSTANT);75 animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_ CONSTANT);76 77 animation2->addKeyFrame(Vector(0.0, 0.0, -1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);78 animation2->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);79 80 animation3->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);81 animation3->addKeyFrame(Vector(0.0, 0.0, -1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);73 animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); 74 animation1->addKeyFrame(Vector(-0.4, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); 75 animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_NULL); 76 77 animation2->addKeyFrame(Vector(0.0, 0.0, -1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 78 animation2->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 79 80 animation3->addKeyFrame(Vector(0.0, 0.0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 81 animation3->addKeyFrame(Vector(0.0, 0.0, -1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 82 82 } 83 83 else if( this->leftRight == W_RIGHT) … … 86 86 87 87 this->objectComponent1->setRelCoor(Vector(0,0,0.35)); 88 animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.1, ANIM_LINEAR, ANIM_ CONSTANT);89 animation1->addKeyFrame(Vector(-0.4, 0, .5), Quaternion(), 0.1, ANIM_LINEAR, ANIM_ CONSTANT);90 animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.0, ANIM_LINEAR, ANIM_ CONSTANT);91 92 animation2->addKeyFrame(Vector(.0, .0, 1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);93 animation2->addKeyFrame(Vector(.0, .0, .0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);94 95 animation3->addKeyFrame(Vector(.0, .0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);96 animation3->addKeyFrame(Vector(.0, .0, 1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_ CONSTANT);88 animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); 89 animation1->addKeyFrame(Vector(-0.4, 0, .5), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL); 90 animation1->addKeyFrame(Vector(0, 0, .5), Quaternion(), 0.0, ANIM_LINEAR, ANIM_NULL); 91 92 animation2->addKeyFrame(Vector(.0, .0, 1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 93 animation2->addKeyFrame(Vector(.0, .0, .0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 94 95 animation3->addKeyFrame(Vector(.0, .0, 0.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 96 animation3->addKeyFrame(Vector(.0, .0, 1.0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL); 97 97 } 98 98 }
Note: See TracChangeset
for help on using the changeset viewer.