Changeset 5001 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Aug 13, 2005, 10:08:47 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r5000 r5001 337 337 void PNode::setAbsDir (const Quaternion& absDir) 338 338 { 339 if ( this->parent)340 this->relDirection = absDir / parent->getAbsDir();339 if (likely(this->parent != NULL)) 340 this->relDirection = absDir / this->parent->getAbsDir(); 341 341 else 342 342 this->relDirection = absDir; 343 343 344 344 this->bRelDirChanged = true; 345 // this->absDirection = absDir;346 345 } 347 346 … … 576 575 { 577 576 /* update the current absDirection - remember * means rotation around sth.*/ 578 this->absDirection = parent->getAbsDir() * this->relDirection;577 this->absDirection = this->relDirection * parent->getAbsDir();; 579 578 } 580 579 -
orxonox/trunk/src/lib/math/vector.h
r5000 r5001 171 171 inline Vector getSpacialAxis() const { return this->v / sin(acos(w));/*sqrt(v.x*v.x + v.y*v.y + v.z+v.z);*/ }; 172 172 /** @returns the rotational angle of this Quaternion around getSpacialAxis() !! IN DEGREE !! */ 173 inline float getSpacialAxisAngle() const { return 360 / M_PI * acos(this->w); };173 inline float getSpacialAxisAngle() const { return 360.0 / M_PI * acos(this->w); }; 174 174 175 175 static Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t);
Note: See TracChangeset
for help on using the changeset viewer.