PxTransformPadded

Defined in include/foundation/PxTransform.h

struct PxTransformPadded : public PxTransformT<float>

A generic padded & aligned transform class.

This can be used for safe faster loads & stores, and faster address computations (the default PxTransformT often generating imuls for this otherwise). Padding bytes can be reused to store useful data if needed.

Public Functions

inline PxTransformPadded()
inline PxTransformPadded(const PxTransformPadded &other)
inline explicit PxTransformPadded(const PxTransform &other)
inline explicit PxTransformPadded(PxIDENTITY)
inline explicit PxTransformPadded(const PxVec3 &position)
inline explicit PxTransformPadded(const PxQuat &orientation)
inline PxTransformPadded(const PxVec3 &p0, const PxQuat &q0)
inline void operator=(const PxTransformPadded &other)
inline void operator=(const PxTransform &other)
inline bool operator==(const PxTransformT &t) const

returns true if the two transforms are exactly equal

inline PxTransformT operator*(const PxTransformT &x) const
inline PxTransformT &operator*=(const PxTransformT &other)

Equals matrix multiplication.

inline PxTransformT getInverse() const
inline PxTransformT getNormalized() const

return a normalized transform (i.e.

one in which the quaternion has unit magnitude)

inline PxVec3T<float> transform(const PxVec3T<float> &input) const
inline PxTransformT transform(const PxTransformT &src) const

Transform transform to parent (returns compound transform: first src, then *this)

inline PxVec3T<float> transformInv(const PxVec3T<float> &input) const
inline PxTransformT transformInv(const PxTransformT &src) const

Transform transform from parent (returns compound transform: first src, then this->inverse)

inline PxVec3T<float> rotate(const PxVec3T<float> &input) const
inline PxVec3T<float> rotateInv(const PxVec3T<float> &input) const
inline bool isValid() const

returns true if finite and q is a unit quaternion

inline bool isSane() const

returns true if finite and quat magnitude is reasonably close to unit to allow for some accumulation of error vs isValid

inline bool isFinite() const

returns true if all elems are finite (not NAN or INF, etc.)

Public Members

PxU32 padding
PxQuatT<float> q
PxVec3T<float> p