+#include <PxQuat.h>
+
+ +
Public Member Functions | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxQuat () |
| Default constructor, does not do any initialization. | |
| PX_CUDA_CALLABLE PX_INLINE | PxQuat (PxIDENTITY r) |
| identity constructor | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxQuat (float r) |
| Constructor from a scalar: sets the real part w to the scalar value, and the imaginary parts (x,y,z) to zero. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxQuat (float nx, float ny, float nz, float nw) |
| Constructor. Take note of the order of the elements! | |
| PX_CUDA_CALLABLE PX_INLINE | PxQuat (float angleRadians, const PxVec3 &unitAxis) |
| Creates from angle-axis representation. | |
| PX_CUDA_CALLABLE PX_FORCE_INLINE | PxQuat (const PxQuat &v) |
| Copy ctor. | |
| PX_CUDA_CALLABLE PX_INLINE | PxQuat (const PxMat33 &m) |
| Creates from orientation matrix. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE bool | isIdentity () const |
| returns true if quat is identity | |
| PX_CUDA_CALLABLE bool | isFinite () const |
| returns true if all elements are finite (not NAN or INF, etc.) | |
| PX_CUDA_CALLABLE bool | isUnit () const |
| returns true if finite and magnitude is close to unit | |
| PX_CUDA_CALLABLE bool | isSane () const |
| returns true if finite and magnitude is reasonably close to unit to allow for some accumulation of error vs isValid | |
| PX_CUDA_CALLABLE PX_INLINE bool | operator== (const PxQuat &q) const |
| returns true if the two quaternions are exactly equal | |
| PX_CUDA_CALLABLE PX_INLINE void | toRadiansAndUnitAxis (float &angle, PxVec3 &axis) const |
| converts this quaternion to angle-axis representation | |
| PX_CUDA_CALLABLE PX_INLINE float | getAngle () const |
| Gets the angle between this quat and the identity quaternion. | |
| PX_CUDA_CALLABLE PX_INLINE float | getAngle (const PxQuat &q) const |
| Gets the angle between this quat and the argument. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | magnitudeSquared () const |
| This is the squared 4D vector length, should be 1 for unit quaternions. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE float | dot (const PxQuat &v) const |
| returns the scalar product of this and other. | |
| PX_CUDA_CALLABLE PX_INLINE PxQuat | getNormalized () const |
| PX_CUDA_CALLABLE PX_INLINE float | magnitude () const |
| PX_CUDA_CALLABLE PX_INLINE float | normalize () |
| maps to the closest unit quaternion. | |
| PX_CUDA_CALLABLE PX_INLINE PxQuat | getConjugate () const |
| PX_CUDA_CALLABLE PX_INLINE PxVec3 | getImaginaryPart () const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec3 | getBasisVector0 () const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec3 | getBasisVector1 () const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxVec3 | getBasisVector2 () const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE const PxVec3 | rotate (const PxVec3 &v) const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE const PxVec3 | rotateInv (const PxVec3 &v) const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat & | operator= (const PxQuat &p) |
| Assignment operator. | |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat & | operator*= (const PxQuat &q) |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat & | operator+= (const PxQuat &q) |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat & | operator-= (const PxQuat &q) |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat & | operator*= (const float s) |
| PX_CUDA_CALLABLE PX_INLINE PxQuat | operator* (const PxQuat &q) const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat | operator+ (const PxQuat &q) const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat | operator- () const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat | operator- (const PxQuat &q) const |
| PX_CUDA_CALLABLE +PX_FORCE_INLINE PxQuat | operator* (float r) const |
Public Attributes | |
| float | x |
| float | y |
| float | z |
| float | w |
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat::PxQuat | +( | ++ | ) | + [inline] |
+
| PX_CUDA_CALLABLE PX_INLINE PxQuat::PxQuat | +( | +PxIDENTITY | +r | +) | + [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat::PxQuat | +( | +float | +r | +) | + [inline, explicit] |
+
+Constructor from a scalar: sets the real part w to the scalar value, and the imaginary parts (x,y,z) to zero. +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat::PxQuat | +( | +float | +nx, | +|
| + | + | float | +ny, | +|
| + | + | float | +nz, | +|
| + | + | float | +nw | + |
| + | ) | + [inline] |
+
+Constructor. Take note of the order of the elements! +
+ +
| PX_CUDA_CALLABLE PX_INLINE PxQuat::PxQuat | +( | +float | +angleRadians, | +|
| + | + | const PxVec3 & | +unitAxis | + |
| + | ) | + [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat::PxQuat | +( | +const PxQuat & | +v | +) | + [inline] |
+
+Copy ctor. +
+ +
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxQuat::dot | +( | +const PxQuat & | +v | +) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_INLINE float PxQuat::getAngle | +( | +const PxQuat & | +q | +) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_INLINE float PxQuat::getAngle | +( | ++ | ) | + const [inline] |
+
+Gets the angle between this quat and the identity quaternion. +
+Unit: Radians +
References PxAcos().
+ +| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxQuat::getBasisVector0 | +( | ++ | ) | + const [inline] |
+
+brief computes rotation of x-axis +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxQuat::getBasisVector1 | +( | ++ | ) | + const [inline] |
+
+brief computes rotation of y-axis +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxQuat::getBasisVector2 | +( | ++ | ) | + const [inline] |
+
+brief computes rotation of z-axis +
| PX_CUDA_CALLABLE PX_INLINE PxQuat PxQuat::getConjugate | +( | ++ | ) | + const [inline] |
+
+ +
Referenced by PxMassProperties::scaleInertia().
+ +| PX_CUDA_CALLABLE PX_INLINE PxVec3 PxQuat::getImaginaryPart | +( | ++ | ) | + const [inline] |
+
+ +
| PX_CUDA_CALLABLE PX_INLINE PxQuat PxQuat::getNormalized | +( | ++ | ) | + const [inline] |
+
+ +
| PX_CUDA_CALLABLE bool PxQuat::isFinite | +( | ++ | ) | + const [inline] |
+
+returns true if all elements are finite (not NAN or INF, etc.) +
+ +
References PxIsFinite().
+ +Referenced by PxMassProperties::getMassSpaceInertia().
+ +| PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxQuat::isIdentity | +( | ++ | ) | + const [inline] |
+
+returns true if quat is identity +
+ +
| PX_CUDA_CALLABLE bool PxQuat::isSane | +( | ++ | ) | + const [inline] |
+
+returns true if finite and magnitude is reasonably close to unit to allow for some accumulation of error vs isValid +
+ +
References PxAbs().
+ +Referenced by PxTransform::PxTransform().
+ +| PX_CUDA_CALLABLE bool PxQuat::isUnit | +( | ++ | ) | + const [inline] |
+
+returns true if finite and magnitude is close to unit +
+ +
References PxAbs().
+ +Referenced by PxTriangleMeshGeometry::isValid(), PxConvexMeshGeometry::isValid(), PxMeshScale::PxMeshScale(), PxMassProperties::rotateInertia(), and PxMassProperties::scaleInertia().
+ +| PX_CUDA_CALLABLE PX_INLINE float PxQuat::magnitude | +( | ++ | ) | + const [inline] |
+
+ +
References PxSqrt().
+ +| PX_CUDA_CALLABLE PX_FORCE_INLINE float PxQuat::magnitudeSquared | +( | ++ | ) | + const [inline] |
+
+This is the squared 4D vector length, should be 1 for unit quaternions. +
+ +
| PX_CUDA_CALLABLE PX_INLINE float PxQuat::normalize | +( | ++ | ) | + [inline] |
+
+maps to the closest unit quaternion. +
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat PxQuat::operator* | +( | +float | +r | +) | + const [inline] |
+
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat& PxQuat::operator*= | +( | +const float | +s | +) | + [inline] |
+
+ +
| PX_CUDA_CALLABLE PX_FORCE_INLINE PxQuat PxQuat::operator- | +( | ++ | ) | + const [inline] |
+
+quaternion subtraction +
| PX_CUDA_CALLABLE PX_INLINE bool PxQuat::operator== | +( | +const PxQuat & | +q | +) | + const [inline] |
+
| PX_CUDA_CALLABLE PX_FORCE_INLINE const PxVec3 PxQuat::rotate | +( | +const PxVec3 & | +v | +) | + const [inline] |
+
+rotates passed vec by this (assumed unitary) +
References PxVec3::x, PxVec3::y, and PxVec3::z.
+ +Referenced by PxMassProperties::PxMassProperties(), and PxTransform::transformInv().
+ +| PX_CUDA_CALLABLE PX_FORCE_INLINE const PxVec3 PxQuat::rotateInv | +( | +const PxVec3 & | +v | +) | + const [inline] |
+
+inverse rotates passed vec by this (assumed unitary) +
References PxVec3::x, PxVec3::y, and PxVec3::z.
+ +Referenced by PxMassProperties::PxMassProperties().
+ +| PX_CUDA_CALLABLE PX_INLINE void PxQuat::toRadiansAndUnitAxis | +( | +float & | +angle, | +|
| + | + | PxVec3 & | +axis | + |
| + | ) | + const [inline] |
+
+converts this quaternion to angle-axis representation +
+ +
References PxAbs(), PxAtan2(), PxPi, and PxRecipSqrt().
+ ++
| float PxQuat::w | +
+ +
Referenced by dot(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PxMat33::PxMat33(), and PxMat44::PxMat44().
+ +| float PxQuat::x | +
+the quaternion elements +
Referenced by dot(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PxMat33::PxMat33(), and PxMat44::PxMat44().
+ +| float PxQuat::y | +
+ +
Referenced by dot(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PxMat33::PxMat33(), and PxMat44::PxMat44().
+ +| float PxQuat::z | +
+ +
Referenced by dot(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator=(), operator==(), PxMat33::PxMat33(), and PxMat44::PxMat44().
+ ++