Changeset 8731 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jun 22, 2006, 4:28:18 PM (19 years ago)
- Location:
- trunk/src/lib/math
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/quaternion.cc
r8724 r8731 216 216 217 217 /** 218 * @returns the heading218 * @returns the Heading 219 219 */ 220 220 float Quaternion::getHeading() const … … 230 230 231 231 /** 232 * @returns the Heading-Quaternion 233 */ 234 Quaternion Quaternion::getHeadingQuat() const 235 { 236 return Quaternion(this->getHeading(), Vector(0,1,0)); 237 } 238 239 /** 232 240 * @returns the Attitude 233 241 */ … … 236 244 return asin(2.0 * (v.x*v.y + v.z*w)); 237 245 } 246 247 /** 248 * @returns the Attitude-Quaternion 249 */ 250 Quaternion Quaternion::getAttitudeQuat() const 251 { 252 return Quaternion(this->getAttitude(), Vector(0,0,1)); 253 } 254 238 255 239 256 /** … … 247 264 return 0.0f; 248 265 } 266 267 /** 268 * @returns the Bank-Quaternion 269 */ 270 Quaternion Quaternion::getBankQuat() const 271 { 272 return Quaternion(this->getBank(), Vector(1,0,0)); 273 } 274 249 275 250 276 -
trunk/src/lib/math/quaternion.h
r8724 r8731 98 98 99 99 float getHeading() const; 100 Quaternion getHeadingQuat() const; 100 101 float getAttitude() const; 102 Quaternion getAttitudeQuat() const; 101 103 float getBank() const; 104 Quaternion getBankQuat() const; 102 105 /** @returns the rotational axis of this Quaternion */ 103 106 inline Vector getSpacialAxis() const { return this->v / sin(acos(w));/*sqrt(v.x*v.x + v.y*v.y + v.z+v.z);*/ };
Note: See TracChangeset
for help on using the changeset viewer.