30 #ifndef PXFOUNDATION_PXPLANE_H 31 #define PXFOUNDATION_PXPLANE_H 78 : n(normal), d(-point.dot(n))
87 n = (p1 - p0).cross(p2 - p0).getNormalized();
96 return n == p.
n && d == p.
d;
106 return PxAbs(distance(p)) < (1.0e-7f);
114 return p - n * distance(p);
131 float denom = 1.0f / n.magnitude();
145 #endif // #ifndef PXFOUNDATION_PXPLANE_H Definition: GuContactBuffer.h:37
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 project(const PxVec3 &p) const
projects p into the plane
Definition: PxPlane.h:112
PX_CUDA_CALLABLE PX_FORCE_INLINE float dot(const PxVec3 &v) const
returns the scalar product of this and other.
Definition: PxVec3.h:276
float d
The distance from the origin.
Definition: PxPlane.h:137
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
Representation of a plane.
Definition: PxPlane.h:50
PX_CUDA_CALLABLE PX_FORCE_INLINE bool contains(const PxVec3 &p) const
Definition: PxPlane.h:104
PX_CUDA_CALLABLE PX_FORCE_INLINE float distance(const PxVec3 &p) const
Definition: PxPlane.h:99
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane(const PxVec3 &normal, float distance)
Constructor from a normal and a distance.
Definition: PxPlane.h:70
PX_CUDA_CALLABLE PX_FORCE_INLINE void normalize()
equivalent plane with unit normal
Definition: PxPlane.h:129
PX_CUDA_CALLABLE PX_FORCE_INLINE float PxAbs(float a)
abs returns the absolute value of its argument.
Definition: PxMath.h:107
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:63
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane()
Constructor.
Definition: PxPlane.h:56
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:77
PX_CUDA_CALLABLE PX_INLINE bool operator==(const PxPlane &p) const
returns true if the two planes are exactly equal
Definition: PxPlane.h:94
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 pointInPlane() const
find an arbitrary point in the plane
Definition: PxPlane.h:120
PxVec3 n
The normal to the plane.
Definition: PxPlane.h:136
#define PX_INLINE
Definition: PxPreprocessor.h:336
#define PX_CUDA_CALLABLE
Definition: PxPreprocessor.h:460
3 Element vector class.
Definition: PxVec3.h:49
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane(const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
Constructor from three points.
Definition: PxPlane.h:85