Changeset 10533 in orxonox.OLD for trunk/src/world_entities/environments/rotor.cc
- Timestamp:
- Jan 31, 2007, 2:27:59 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/environments/rotor.cc
r10519 r10533 34 34 //PRINTF(0)("loading Rotor"); 35 35 36 this->totalTime = 0.0; 37 36 38 if (root != NULL) 37 39 this->loadParams(root); … … 55 57 { 56 58 this->rotation = Vector(x,y,z); 59 /* this->rotation = this->rotation.getNormalized();*/ 57 60 } 58 61 … … 62 65 void Rotor::tick(float dt) 63 66 { 64 this->shiftDir(Quaternion(rotation.x*dt, Vector(1,0,0)) * Quaternion(rotation.y*dt, Vector(0,1,0)) * Quaternion(rotation.z*dt, Vector(0,0,1))); 67 68 this->totalTime += dt; 69 70 71 72 this->setAbsDir(Quaternion(rotation.x*this->totalTime, Vector(1,0,0)) * 73 Quaternion(rotation.y*this->totalTime, Vector(0,1,0)) * 74 Quaternion(rotation.z*this->totalTime, Vector(0,0,1))); 65 75 66 76 }
Note: See TracChangeset
for help on using the changeset viewer.