Changeset 5062 in orxonox.OLD for orxonox/trunk/src/util/animation
- Timestamp:
- Aug 17, 2005, 1:02:01 AM (19 years ago)
- Location:
- orxonox/trunk/src/util/animation
- Files:
-
- 2 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
Note: See TracChangeset
for help on using the changeset viewer.