PxPlane Class Reference

Representation of a plane. More...

#include <PxPlane.h>

Collaboration diagram for PxPlane:

Public Member Functions

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane ()
 Constructor. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane (float nx, float ny, float nz, float distance)
 Constructor from a normal and a distance. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane (const PxVec3 &normal, float distance)
 Constructor from a normal and a distance. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane (const PxVec3 &point, const PxVec3 &normal)
 Constructor from a point on the plane and a normal. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane (const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
 Constructor from three points. More...
 
PX_CUDA_CALLABLE PX_INLINE bool operator== (const PxPlane &p) const
 returns true if the two planes are exactly equal More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE float distance (const PxVec3 &p) const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool contains (const PxVec3 &p) const
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 project (const PxVec3 &p) const
 projects p into the plane More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 pointInPlane () const
 find an arbitrary point in the plane More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE void normalize ()
 equivalent plane with unit normal More...
 

Public Attributes

PxVec3 n
 The normal to the plane. More...
 
float d
 The distance from the origin. More...
 

Detailed Description

Representation of a plane.

Plane equation used: n.dot(v) + d = 0

Constructor & Destructor Documentation

◆ PxPlane() [1/5]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane::PxPlane ( )
inline

Constructor.

◆ PxPlane() [2/5]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane::PxPlane ( float  nx,
float  ny,
float  nz,
float  distance 
)
inline

Constructor from a normal and a distance.

◆ PxPlane() [3/5]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane::PxPlane ( const PxVec3 normal,
float  distance 
)
inline

Constructor from a normal and a distance.

◆ PxPlane() [4/5]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane::PxPlane ( const PxVec3 point,
const PxVec3 normal 
)
inline

Constructor from a point on the plane and a normal.

◆ PxPlane() [5/5]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxPlane::PxPlane ( const PxVec3 p0,
const PxVec3 p1,
const PxVec3 p2 
)
inline

Constructor from three points.

References PxVec3::dot().

Member Function Documentation

◆ contains()

PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxPlane::contains ( const PxVec3 p) const
inline

References PxAbs().

◆ distance()

PX_CUDA_CALLABLE PX_FORCE_INLINE float PxPlane::distance ( const PxVec3 p) const
inline

References PxVec3::dot().

◆ normalize()

PX_CUDA_CALLABLE PX_FORCE_INLINE void PxPlane::normalize ( )
inline

equivalent plane with unit normal

◆ operator==()

PX_CUDA_CALLABLE PX_INLINE bool PxPlane::operator== ( const PxPlane p) const
inline

returns true if the two planes are exactly equal

References d, and n.

◆ pointInPlane()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxPlane::pointInPlane ( ) const
inline

find an arbitrary point in the plane

◆ project()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxVec3 PxPlane::project ( const PxVec3 p) const
inline

projects p into the plane

Member Data Documentation

◆ d

float PxPlane::d

The distance from the origin.

Referenced by operator==().

◆ n

PxVec3 PxPlane::n

The normal to the plane.

Referenced by operator==().


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