36#include "foundation/PxTransform.h"
76 :
n(normal),
d(-point.dot(
n))
85 n = (p1 - p0).cross(p2 - p0).getNormalized();
94 return n == p.n &&
d == p.d;
104 return PxAbs(distance(p)) < (1.0e-7f);
112 return p -
n * distance(p);
139 const PxVec3 transformedNormal = pose.rotate(
n);
140 return PxPlane(transformedNormal,
d - pose.p.
dot(transformedNormal));
148 const PxVec3 transformedNormal = pose.rotateInv(
n);
Representation of a plane.
Definition PxPlane.h:49
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 project(const PxVec3 &p) const
projects p into the plane
Definition PxPlane.h:110
PX_CUDA_CALLABLE PX_INLINE bool operator==(const PxPlane &p) const
returns true if the two planes are exactly equal
Definition PxPlane.h:92
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane(const PxVec3 &normal, float distance)
Constructor from a normal and a distance.
Definition PxPlane.h:68
PxVec3 n
The normal to the plane.
Definition PxPlane.h:152
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane inverseTransform(const PxTransform &pose) const
inverse-transform plane
Definition PxPlane.h:146
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane(const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
Constructor from three points.
Definition PxPlane.h:83
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 pointInPlane() const
find an arbitrary point in the plane
Definition PxPlane.h:118
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane()
Constructor.
Definition PxPlane.h:54
float d
The distance from the origin.
Definition PxPlane.h:153
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane(const PxVec3 &point, const PxVec3 &normal)
Constructor from a point on the plane and a normal.
Definition PxPlane.h:75
PX_CUDA_CALLABLE PX_FORCE_INLINE void normalize()
equivalent plane with unit normal
Definition PxPlane.h:127
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane(float nx, float ny, float nz, float distance)
Constructor from a normal and a distance.
Definition PxPlane.h:61
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane transform(const PxTransform &pose) const
transform plane
Definition PxPlane.h:137
3 Element vector class.
Definition PxVec3.h:50
PX_CUDA_CALLABLE PX_FORCE_INLINE float dot(const PxVec3 &v) const
returns the scalar product of this and other.
Definition PxVec3.h:276
PX_CUDA_CALLABLE PX_FORCE_INLINE float magnitude() const
returns the magnitude
Definition PxVec3.h:183
#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
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAbs(float a)
abs returns the absolute value of its argument.
Definition PxMath.h:109