Changeset 3874 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- Apr 18, 2005, 4:45:16 PM (20 years ago)
- Location:
- orxonox/trunk/src/util/animation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation3d.cc
r3872 r3874 304 304 void Animation3D::random(float timePassed) const 305 305 { 306 this->object->setRelCoor(this->currentKeyFrame->position * (float)rand()/(float)RAND_MAX); 307 this->object->setRelDir(this->currentKeyFrame->direction * (float)rand()/(float)RAND_MAX); 308 } 306 this->object->setRelCoor(this->currentKeyFrame->position + 307 (this->nextKeyFrame->position - this->currentKeyFrame->position) * (float)rand()/(float)RAND_MAX); 308 this->object->setRelDir(this->currentKeyFrame->direction + 309 (this->nextKeyFrame->direction - this->currentKeyFrame->direction)* (float)rand()/(float)RAND_MAX); 310 } -
orxonox/trunk/src/util/animation/t_animation.h
r3872 r3874 342 342 float tAnimation<T>::random(float timePassed) const 343 343 { 344 return this->currentKeyFrame->value * (float)rand()/(float)RAND_MAX; 344 return this->currentKeyFrame->value + 345 (this->nextKeyFrame->value - this->currentKeyFrame->value) * 346 (float)rand()/(float)RAND_MAX; 345 347 } 346 348
Note: See TracChangeset
for help on using the changeset viewer.