Falco Engine 3.9.0.1 (beta)
FalcoEngine.Plane Struct Reference

Public Member Functions

 Plane (Vector3 inNormal, Vector3 inPoint)
 
 Plane (Vector3 inNormal, float d)
 
 Plane (Vector3 a, Vector3 b, Vector3 c)
 
void SetNormalAndPosition (Vector3 inNormal, Vector3 inPoint)
 
void Set3Points (Vector3 a, Vector3 b, Vector3 c)
 
void Flip ()
 
void Translate (Vector3 translation)
 
Vector3 ClosestPointOnPlane (Vector3 point)
 
float GetDistanceToPoint (Vector3 point)
 
bool GetSide (Vector3 point)
 
bool SameSide (Vector3 inPt0, Vector3 inPt1)
 
bool Raycast (Ray ray, out float enter)
 
override string ToString ()
 
string ToString (string format)
 

Static Public Member Functions

static Plane Translate (Plane plane, Vector3 translation)
 

Properties

Vector3 normal [getset]
 
float distance [getset]
 
Plane flipped [get]
 

Detailed Description

Definition at line 8 of file Plane.cs.

Constructor & Destructor Documentation

◆ Plane() [1/3]

FalcoEngine.Plane.Plane ( Vector3  inNormal,
Vector3  inPoint 
)

Creates a plane.

Parameters
inNormal
inPoint

Definition at line 56 of file Plane.cs.

◆ Plane() [2/3]

FalcoEngine.Plane.Plane ( Vector3  inNormal,
float  d 
)

Creates a plane.

Parameters
inNormal
d

Definition at line 67 of file Plane.cs.

◆ Plane() [3/3]

FalcoEngine.Plane.Plane ( Vector3  a,
Vector3  b,
Vector3  c 
)

Creates a plane.

Parameters
a
b
c

Definition at line 79 of file Plane.cs.

Member Function Documentation

◆ ClosestPointOnPlane()

Vector3 FalcoEngine.Plane.ClosestPointOnPlane ( Vector3  point)

For a given point returns the closest point on the plane.

Parameters
pointThe point to project onto the plane.
Returns
A point on the plane that is closest to point.

Definition at line 146 of file Plane.cs.

◆ Flip()

void FalcoEngine.Plane.Flip ( )

Makes the plane face in the opposite direction.

Definition at line 111 of file Plane.cs.

◆ GetDistanceToPoint()

float FalcoEngine.Plane.GetDistanceToPoint ( Vector3  point)

Returns a signed distance from plane to point.

Parameters
point

Definition at line 156 of file Plane.cs.

◆ GetSide()

bool FalcoEngine.Plane.GetSide ( Vector3  point)

Is a point on the positive side of the plane?

Parameters
point

Definition at line 165 of file Plane.cs.

◆ Raycast()

bool FalcoEngine.Plane.Raycast ( Ray  ray,
out float  enter 
)

Definition at line 182 of file Plane.cs.

◆ SameSide()

bool FalcoEngine.Plane.SameSide ( Vector3  inPt0,
Vector3  inPt1 
)

Are two points on the same side of the plane?

Parameters
inPt0
inPt1

Definition at line 175 of file Plane.cs.

◆ Set3Points()

void FalcoEngine.Plane.Set3Points ( Vector3  a,
Vector3  b,
Vector3  c 
)

Sets a plane using three points that lie within it. The points go around clockwise as you look down on the top surface of the plane.

Parameters
aFirst point in clockwise order.
bSecond point in clockwise order.
cThird point in clockwise order.

Definition at line 102 of file Plane.cs.

◆ SetNormalAndPosition()

void FalcoEngine.Plane.SetNormalAndPosition ( Vector3  inNormal,
Vector3  inPoint 
)

Sets a plane using a point that lies within it along with a normal to orient it.

Parameters
inNormalThe plane's normal vector.
inPointA point that lies on the plane.

Definition at line 90 of file Plane.cs.

◆ ToString() [1/2]

override string FalcoEngine.Plane.ToString ( )

Definition at line 195 of file Plane.cs.

◆ ToString() [2/2]

string FalcoEngine.Plane.ToString ( string  format)

Definition at line 200 of file Plane.cs.

◆ Translate() [1/2]

static Plane FalcoEngine.Plane.Translate ( Plane  plane,
Vector3  translation 
)
static

Returns a copy of the given plane that is moved in space by the given translation.

Parameters
planeThe plane to move in space.
translationThe offset in space to move the plane with.
Returns
The translated plane.

Definition at line 134 of file Plane.cs.

◆ Translate() [2/2]

void FalcoEngine.Plane.Translate ( Vector3  translation)

Moves the plane in space by the translation vector.

Parameters
translationThe offset in space to move the plane with.

Definition at line 121 of file Plane.cs.

Property Documentation

◆ distance

float FalcoEngine.Plane.distance
getset

Distance from the origin to the plane.

Definition at line 34 of file Plane.cs.

◆ flipped

Plane FalcoEngine.Plane.flipped
get

Returns a copy of the plane that faces in the opposite direction.

Definition at line 49 of file Plane.cs.

◆ normal

Vector3 FalcoEngine.Plane.normal
getset

Normal vector of the plane.

Definition at line 19 of file Plane.cs.


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