Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3968 in orxonox.OLD


Ignore:
Timestamp:
Apr 26, 2005, 12:37:06 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: animation3d cleaned up some code, deleted some old not used one

Location:
orxonox/trunk/src/util/animation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3967 r3968  
    131131          this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
    132132          this->setAnimFunc(this->currentKeyFrame->animFunc);     
    133          
    134           if( this->currentKeyFrame->animFunc == ANIM_NEG_EXP)
    135             {
    136 
    137             }
    138133        }
    139 
    140134      /* now animate it */
    141135      (this->*animFunc)(this->localTime);
    142       /*
    143       switch( this->movMode)
    144         {
    145         case LINEAR:
    146           *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position;
    147           *this->tmpVect = *this->tmpVect * this->localTime / this->currentFrame->time;
    148           this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect);
    149           *this->lastPosition = *this->tmpVect;
    150           break;
    151         case EXP:
    152              
    153           break;
    154         case NEG_EXP:
    155           *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position;
    156           *this->tmpVect = *this->tmpVect * (1 - expf(- this->localTime * this->deltaT));     
    157           this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect);
    158           *this->lastPosition = *this->tmpVect;
    159           break;
    160         case SIN:
    161           *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position;
    162           *this->tmpVect = *this->tmpVect * 0.5*(1 - cos(M_PI * this->localTime / this->currentFrame->time));     
    163           this->currentFrame->object->setRelCoor(*this->lastFrame->position + *this->tmpVect);
    164           *this->lastPosition = *this->tmpVect;
    165           break;
    166         case COS:
    167              
    168           break;
    169         case QUADRATIC:
    170           *this->tmpVect = *this->currentFrame->position - *this->lastFrame->position;
    171           *this->tmpVect = *this->tmpVect * 1/3 * ldexpf(this->localTime, 3);
    172           break;
    173         default:
    174           break;
    175         }
    176       */
     136 
    177137    }
    178138}
     
    205165    case ANIM_NEG_EXP:
    206166      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());
    209167      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       */
    217168      break;
    218169    case ANIM_QUADRATIC:
     
    282233                            (this->nextKeyFrame->position - this->currentKeyFrame->position) *
    283234                            (1.0 + cos( M_PI * timePassed / this->currentKeyFrame->duration))/2.0);
    284 
    285235}
    286236
     
    298248void Animation3D::exp(float timePassed) const
    299249{
     250  PRINTF(0)("no exp animation3d defined\n");
    300251  this->linear(timePassed);
    301252}
     
    321272void Animation3D::quadratic(float timePassed) const
    322273{
     274  PRINTF(0)("no quadratic animation3d defined\n");
    323275  this->linear(timePassed);
    324276}
  • orxonox/trunk/src/util/animation/t_animation.h

    r3876 r3968  
    235235      {
    236236        this->animFunc = &tAnimation<T>::negExp;
    237         float d = fabs(this->currentKeyFrame->value - this->nextKeyFrame->value);
    238237        expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
    239238        break;
Note: See TracChangeset for help on using the changeset viewer.