![]() |
Kochol Game Engine
0.1.0
|
#include <Plane.h>
Public Member Functions | |
Plane () | |
Sazande e ke hich kari nemikone. | |
CollisionType | Collision (const Sphere *pSphere) const |
Checks the plane collision with a sphere and returns ECT_Behind , ECT_Front or ECT_Intersect. | |
CollisionType | Collision (const AABB *pBox) const |
Checks the plane collision with an AABB and returns ECT_Behind , ECT_Front or ECT_Intersect. | |
void | Set (const Vector &vNormal, const Vector &vPoint) |
void | Set (const Vector &vNormal, const Vector &vPoint, float fDistance) |
void | Set (const Vector &v0, const Vector &v1, const Vector &v2) |
void | Set (float a, float b, float c, float d) |
Sakhtane Plane ba formole ax + bY +cz + d = 0. | |
float | GetDistance (const Vector &vPoint) const |
Matrix * | GetReflectMatrix () |
Matrix Reflection ra sakhte va bar migardone. | |
Matrix * | GetShadowMatrix (Vector &vLightDir) |
Builds a matrix that flattens geometry into a plane. | |
void | Normalize () |
Normalize the plane. | |
bool | GetIntersectionWithPlane (Plane *Other, Ray &outRay) |
Gets the intersection with another plane and return the line. | |
bool | GetIntersectionWithLine (Ray *Other, Vector &outPoint) |
Gets the intersection with a line and return the intersected point. | |
bool | GetIntersectionWithPlanes (Plane *o1, Plane *o2, Vector &outPoint) |
Gets the intersection with three planes and return the intersected point. | |
float | DotCoord (const Vector &v) const |
Computes the dot product of a plane and a 3D vector. The w parameter of the vector is assumed to be 1. | |
float | DotNormal (const Vector &v) const |
Computes the dot product of a plane and a 3D vector. The w parameter of the vector is assumed to be 0. |
Public Attributes | |
Vector | m_vNormal |
float | m_fDistance |
float | m_fA |
float | m_fB |
float | m_fC |
float | m_fD |
Protected Member Functions | |
void | CalcABCD () |
Mohasebeye ax + by + cz + d = 0 ke bad az har bar estefade az tabe set be sorate automatic seda zade mishe. |
Protected Attributes | |
Vector | m_vPoint |
|
inline |
|
inlineprotected |
Mohasebeye ax + by + cz + d = 0 ke bad az har bar estefade az tabe set be sorate automatic seda zade mishe.
CollisionType kge::math::Plane::Collision | ( | const Sphere * | pSphere | ) | const |
Checks the plane collision with a sphere and returns ECT_Behind , ECT_Front or ECT_Intersect.
CollisionType kge::math::Plane::Collision | ( | const AABB * | pBox | ) | const |
Checks the plane collision with an AABB and returns ECT_Behind , ECT_Front or ECT_Intersect.
float kge::math::Plane::DotCoord | ( | const Vector & | v | ) | const |
Computes the dot product of a plane and a 3D vector. The w parameter of the vector is assumed to be 1.
float kge::math::Plane::DotNormal | ( | const Vector & | v | ) | const |
Computes the dot product of a plane and a 3D vector. The w parameter of the vector is assumed to be 0.
|
inline |
Peyda kardane faseleye yek noghte ta safhe. NOTE: bordare Normal bayad normalize shode bashad.
vPoint | Noghte e ke mikhahid faseleash ro ta safhe peyda konid. |
Gets the intersection with a line and return the intersected point.
Gets the intersection with another plane and return the line.
Gets the intersection with three planes and return the intersected point.
Builds a matrix that flattens geometry into a plane.
void kge::math::Plane::Normalize | ( | ) |
Normalize the plane.
Sakhte Plane ba yek noghte va bordare normal.
vNormal | Bordare normal. |
vPoint | Mokhtasate noghte. |
Sakhte Plane ba yek noghte va bordare normal va falseleye safhe ta markaze mokhtasat.
vNormal | Bordare normal. |
vPoint | Mokhtasate noghte. |
fDistance | Faseleye safhe ta markaze mokhtasat. |
Sakhte safhe ba 3 ta noghte ya ye mosals(Polygon).
v0 | Noghteye aval. |
v1 | Noghteye dovom. |
v2 | Noghteye Sevvom. |
void kge::math::Plane::Set | ( | float | a, |
float | b, | ||
float | c, | ||
float | d | ||
) |
Sakhtane Plane ba formole ax + bY +cz + d = 0.