Changeset 2882 for code/trunk/src/bullet/LinearMath/btQuaternion.h
- Timestamp:
- Mar 31, 2009, 8:05:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/bullet/LinearMath/btQuaternion.h
r2662 r2882 20 20 21 21 #include "btVector3.h" 22 #include "btQuadWord.h" 22 23 23 24 /**@brief The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. */ … … 58 59 { 59 60 btScalar d = axis.length(); 60 assert(d != btScalar(0.0));61 btAssert(d != btScalar(0.0)); 61 62 btScalar s = btSin(angle * btScalar(0.5)) / d; 62 63 setValue(axis.x() * s, axis.y() * s, axis.z() * s, … … 177 178 btQuaternion operator/(const btScalar& s) const 178 179 { 179 assert(s != btScalar(0.0));180 btAssert(s != btScalar(0.0)); 180 181 return *this * (btScalar(1.0) / s); 181 182 } … … 185 186 btQuaternion& operator/=(const btScalar& s) 186 187 { 187 assert(s != btScalar(0.0));188 btAssert(s != btScalar(0.0)); 188 189 return *this *= btScalar(1.0) / s; 189 190 } … … 199 200 { 200 201 btScalar s = btSqrt(length2() * q.length2()); 201 assert(s != btScalar(0.0));202 btAssert(s != btScalar(0.0)); 202 203 return btAcos(dot(q) / s); 203 204 } … … 275 276 } 276 277 278 static const btQuaternion& getIdentity() 279 { 280 static const btQuaternion identityQuat(btScalar(0.),btScalar(0.),btScalar(0.),btScalar(1.)); 281 return identityQuat; 282 } 283 277 284 SIMD_FORCE_INLINE const btScalar& getW() const { return m_floats[3]; } 278 285
Note: See TracChangeset
for help on using the changeset viewer.