Turok
 
Loading...
Searching...
No Matches
kPlane Class Reference

Plane functions. More...

Public Member Functions

 kPlane ()
 
 kPlane (const float a, const float b, const float c, const float d)
 
 kPlane (const kVec3 &in a, const kVec3 &in b, const kVec3 &in c)
 
 kPlane (const kVec3 &in a, const kVec3 &in b)
 
 kPlane (const kAngle &in a)
 
const kVec3Normal () const
 
kVec3Normal ()
 
float Dot (const kVec3 &in point) const
 
float Dot (const kPlane &in plane) const
 
float Distance (const kVec3 &in point) const
 0 = PSIDE_ON. > 0 is PSIDE_FRONT. < 0 PSIDE_BACK.
 
float ToYaw () const
 Yaw of this plane.
 
bool IsFacing (const float yaw) const
 Returns true if yaw is facing toward the plane. Usually used for climbing sectors.
 
const int PointOnSide (const kVec3 &in point) const
 Returns EnumPlaneSide. If point is in front, behind or on the plane.
 

Detailed Description

Plane functions.

Definition at line 750 of file t1_scriptAPI.cpp.

Constructor & Destructor Documentation

◆ kPlane() [1/5]

kPlane::kPlane ( )

◆ kPlane() [2/5]

kPlane::kPlane ( const float a,
const float b,
const float c,
const float d )

◆ kPlane() [3/5]

kPlane::kPlane ( const kVec3 &in a,
const kVec3 &in b,
const kVec3 &in c )

◆ kPlane() [4/5]

kPlane::kPlane ( const kVec3 &in a,
const kVec3 &in b )

◆ kPlane() [5/5]

kPlane::kPlane ( const kAngle &in a)

Member Function Documentation

◆ Distance()

float kPlane::Distance ( const kVec3 &in point) const

0 = PSIDE_ON. > 0 is PSIDE_FRONT. < 0 PSIDE_BACK.

◆ Dot() [1/2]

float kPlane::Dot ( const kPlane &in plane) const

◆ Dot() [2/2]

float kPlane::Dot ( const kVec3 &in point) const

◆ IsFacing()

bool kPlane::IsFacing ( const float yaw) const

Returns true if yaw is facing toward the plane. Usually used for climbing sectors.

bool Climbable(const float yaw) const
{
return (floorPlane.c <= 0.5f && flags & AAF_CLIMB && floorPlane.IsFacing(yaw));
}
@ AAF_CLIMB
climb up sectors faster than AAF_LADDER

◆ Normal() [1/2]

kVec3 & kPlane::Normal ( )

◆ Normal() [2/2]

const kVec3 & kPlane::Normal ( ) const

◆ PointOnSide()

const int kPlane::PointOnSide ( const kVec3 &in point) const

Returns EnumPlaneSide. If point is in front, behind or on the plane.

◆ ToYaw()

float kPlane::ToYaw ( ) const

Yaw of this plane.