Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Plane Class Reference

An infinite plane described by the formula X . Normal + Constant = 0. More...

#include <Plane.h>

Public Member Functions

JPH_OVERRIDE_NEW_DELETE Plane ()=default
 Constructor.
 
 Plane (Vec4Arg inNormalAndConstant)
 
 Plane (Vec3Arg inNormal, float inConstant)
 
Vec3 GetNormal () const
 
void SetNormal (Vec3Arg inNormal)
 
float GetConstant () const
 
void SetConstant (float inConstant)
 
Plane Offset (float inDistance) const
 Offset the plane (positive value means move it in the direction of the plane normal)
 
Plane GetTransformed (Mat44Arg inTransform) const
 Transform the plane by a matrix.
 
float SignedDistance (Vec3Arg inPoint) const
 Distance point to plane.
 

Static Public Member Functions

static Plane sFromPointAndNormal (Vec3Arg inPoint, Vec3Arg inNormal)
 Create from point and normal.
 
static Plane sFromPointAndNormal (DVec3Arg inPoint, Vec3Arg inNormal)
 Create from point and normal, double precision version that more accurately calculates the plane constant.
 
static Plane sFromPointsCCW (Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3)
 Create from 3 counter clockwise points.
 
static bool sIntersectPlanes (const Plane &inP1, const Plane &inP2, const Plane &inP3, Vec3 &outPoint)
 Returns intersection point between 3 planes.
 

Detailed Description

An infinite plane described by the formula X . Normal + Constant = 0.

Constructor & Destructor Documentation

◆ Plane() [1/3]

JPH_OVERRIDE_NEW_DELETE Plane::Plane ( )
default

Constructor.

◆ Plane() [2/3]

Plane::Plane ( Vec4Arg  inNormalAndConstant)
inlineexplicit

◆ Plane() [3/3]

Plane::Plane ( Vec3Arg  inNormal,
float  inConstant 
)
inline

Member Function Documentation

◆ GetConstant()

float Plane::GetConstant ( ) const
inline

◆ GetNormal()

Vec3 Plane::GetNormal ( ) const
inline

◆ GetTransformed()

Plane Plane::GetTransformed ( Mat44Arg  inTransform) const
inline

Transform the plane by a matrix.

◆ Offset()

Plane Plane::Offset ( float  inDistance) const
inline

Offset the plane (positive value means move it in the direction of the plane normal)

◆ SetConstant()

void Plane::SetConstant ( float  inConstant)
inline

◆ SetNormal()

void Plane::SetNormal ( Vec3Arg  inNormal)
inline

◆ sFromPointAndNormal() [1/2]

static Plane Plane::sFromPointAndNormal ( DVec3Arg  inPoint,
Vec3Arg  inNormal 
)
inlinestatic

Create from point and normal, double precision version that more accurately calculates the plane constant.

◆ sFromPointAndNormal() [2/2]

static Plane Plane::sFromPointAndNormal ( Vec3Arg  inPoint,
Vec3Arg  inNormal 
)
inlinestatic

Create from point and normal.

◆ sFromPointsCCW()

static Plane Plane::sFromPointsCCW ( Vec3Arg  inV1,
Vec3Arg  inV2,
Vec3Arg  inV3 
)
inlinestatic

Create from 3 counter clockwise points.

◆ SignedDistance()

float Plane::SignedDistance ( Vec3Arg  inPoint) const
inline

Distance point to plane.

◆ sIntersectPlanes()

static bool Plane::sIntersectPlanes ( const Plane inP1,
const Plane inP2,
const Plane inP3,
Vec3 outPoint 
)
inlinestatic

Returns intersection point between 3 planes.


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