30#ifndef PXFOUNDATION_PXTRANSFORM_H
31#define PXFOUNDATION_PXTRANSFORM_H
36#include "foundation/PxQuat.h"
37#include "foundation/PxPlane.h"
69 PX_SHARED_ASSERT(orientation.isSane());
79 PX_SHARED_ASSERT(q0.
isSane());
89 return p == t.p && q == t.q;
94 PX_SHARED_ASSERT(x.isSane());
101 *
this = *
this * other;
111 PX_CUDA_CALLABLE
PX_FORCE_INLINE PxVec3 transform(
const PxVec3& input)
const
114 return q.
rotate(input) + p;
117 PX_CUDA_CALLABLE
PX_FORCE_INLINE PxVec3 transformInv(
const PxVec3& input)
const
123 PX_CUDA_CALLABLE
PX_FORCE_INLINE PxVec3 rotate(
const PxVec3& input)
const
129 PX_CUDA_CALLABLE
PX_FORCE_INLINE PxVec3 rotateInv(
const PxVec3& input)
const
138 PX_SHARED_ASSERT(src.
isSane());
139 PX_SHARED_ASSERT(
isSane());
168 return p.isFinite() && q.
isFinite();
174 PX_SHARED_ASSERT(src.
isSane());
177 PxQuat qinv = q.getConjugate();
187 PxVec3 transformedNormal = rotate(plane.n);
188 return PxPlane(transformedNormal, plane.d - p.dot(transformedNormal));
197 PxVec3 transformedNormal = rotateInv(plane.n);
198 return PxPlane(transformedNormal, plane.d + p.dot(plane.n));
4x4 matrix class
Definition PxMat44.h:55
Representation of a plane.
Definition PxPlane.h:49
This is a quaternion class. For more information on quaternion mathematics consult a mathematics sour...
Definition PxQuat.h:50
PX_CUDA_CALLABLE PX_FORCE_INLINE const PxVec3 rotate(const PxVec3 &v) const
Definition PxQuat.h:287
PX_CUDA_CALLABLE bool isUnit() const
returns true if finite and magnitude is close to unit
Definition PxQuat.h:132
PX_CUDA_CALLABLE PX_FORCE_INLINE const PxVec3 rotateInv(const PxVec3 &v) const
Definition PxQuat.h:301
PX_CUDA_CALLABLE bool isSane() const
returns true if finite and magnitude is reasonably close to unit to allow for some accumulation of er...
Definition PxQuat.h:142
PX_CUDA_CALLABLE bool isFinite() const
returns true if all elements are finite (not NAN or INF, etc.)
Definition PxQuat.h:124
3 Element vector class.
Definition PxVec3.h:50
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
#define PX_INLINE
Definition PxPreprocessor.h:320
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxIDENTITY
Definition Px.h:99