PxTransform Class Reference

class representing a rigid euclidean transform as a quaternion and a vector More...

#include <PxTransform.h>

Collaboration diagram for PxTransform:

Public Member Functions

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform ()
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform (const PxVec3 &position)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform (PxIDENTITY r)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform (const PxQuat &orientation)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform (float x, float y, float z, PxQuat aQ=PxQuat(PxIdentity))
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform (const PxVec3 &p0, const PxQuat &q0)
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform (const PxMat44 &m)
 
PX_CUDA_CALLABLE PX_INLINE bool operator== (const PxTransform &t) const
 returns true if the two transforms are exactly equal More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform operator* (const PxTransform &x) const
 
PX_CUDA_CALLABLE PX_INLINE PxTransformoperator*= (PxTransform &other)
 Equals matrix multiplication. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform getInverse () const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 transform (const PxVec3 &input) const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 transformInv (const PxVec3 &input) const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 rotate (const PxVec3 &input) const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 rotateInv (const PxVec3 &input) const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform transform (const PxTransform &src) const
 Transform transform to parent (returns compound transform: first src, then *this) More...
 
PX_CUDA_CALLABLE bool isValid () const
 returns true if finite and q is a unit quaternion More...
 
PX_CUDA_CALLABLE bool isSane () const
 returns true if finite and quat magnitude is reasonably close to unit to allow for some accumulation of error vs isValid More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool isFinite () const
 returns true if all elems are finite (not NAN or INF, etc.) More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform transformInv (const PxTransform &src) const
 Transform transform from parent (returns compound transform: first src, then this->inverse) More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane transform (const PxPlane &plane) const
 transform plane More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane inverseTransform (const PxPlane &plane) const
 inverse-transform plane More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform getNormalized () const
 return a normalized transform (i.e. one in which the quaternion has unit magnitude) More...
 

Public Attributes

PxQuat q
 
PxVec3 p
 

Detailed Description

class representing a rigid euclidean transform as a quaternion and a vector

Constructor & Destructor Documentation

◆ PxTransform() [1/6]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform::PxTransform ( )
inline

◆ PxTransform() [2/6]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform::PxTransform ( const PxVec3 position)
inlineexplicit

◆ PxTransform() [3/6]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform::PxTransform ( PxIDENTITY  r)
inlineexplicit

References PX_UNUSED().

◆ PxTransform() [4/6]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform::PxTransform ( const PxQuat orientation)
inlineexplicit

◆ PxTransform() [5/6]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform::PxTransform ( float  x,
float  y,
float  z,
PxQuat  aQ = PxQuat(PxIdentity) 
)
inline

◆ PxTransform() [6/6]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform::PxTransform ( const PxVec3 p0,
const PxQuat q0 
)
inline

Member Function Documentation

◆ getInverse()

◆ getNormalized()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform PxTransform::getNormalized ( ) const
inline

return a normalized transform (i.e. one in which the quaternion has unit magnitude)

References PxQuat::getNormalized().

◆ inverseTransform()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane PxTransform::inverseTransform ( const PxPlane plane) const
inline

inverse-transform plane

References PxVec3::dot(), and plane.

◆ isFinite()

PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxTransform::isFinite ( ) const
inline

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

References PxQuat::isFinite(), and PxVec3::isFinite().

◆ isSane()

PX_CUDA_CALLABLE bool PxTransform::isSane ( ) const
inline

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

References physx::intrinsics::isFinite(), and PxQuat::isSane().

Referenced by operator*(), transform(), and transformInv().

◆ isValid()

PX_CUDA_CALLABLE bool PxTransform::isValid ( ) const
inline

returns true if finite and q is a unit quaternion

References PxQuat::isFinite(), PxVec3::isFinite(), and PxQuat::isUnit().

◆ operator*()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform PxTransform::operator* ( const PxTransform x) const
inline

References isSane(), and PX_SHARED_ASSERT.

◆ operator*=()

PX_CUDA_CALLABLE PX_INLINE PxTransform& PxTransform::operator*= ( PxTransform other)
inline

Equals matrix multiplication.

◆ operator==()

PX_CUDA_CALLABLE PX_INLINE bool PxTransform::operator== ( const PxTransform t) const
inline

returns true if the two transforms are exactly equal

References p, and q.

◆ rotate()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxTransform::rotate ( const PxVec3 input) const
inline

◆ rotateInv()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxTransform::rotateInv ( const PxVec3 input) const
inline

◆ transform() [1/3]

◆ transform() [2/3]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform PxTransform::transform ( const PxTransform src) const
inline

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

References isSane(), p, PX_SHARED_ASSERT, q, and PxQuat::rotate().

◆ transform() [3/3]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane PxTransform::transform ( const PxPlane plane) const
inline

transform plane

References PxVec3::dot(), and plane.

◆ transformInv() [1/2]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxTransform::transformInv ( const PxVec3 input) const
inline

◆ transformInv() [2/2]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxTransform PxTransform::transformInv ( const PxTransform src) const
inline

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

References PxQuat::getConjugate(), physx::intrinsics::isFinite(), isSane(), p, PX_SHARED_ASSERT, q, and PxQuat::rotate().

Member Data Documentation

◆ p

◆ q


The documentation for this class was generated from the following files: