|
| AZ_TYPE_INFO (Plane, "{847DD984-9DBF-4789-8E25-E0334402E8AD}") |
|
| Plane ()=default |
| Default construction, no initialization.
|
|
| Plane (Simd::Vec4::FloatArgType plane) |
| Construct from a simd vector representing a plane.
|
|
void | Set (const Vector4 &plane) |
|
void | Set (const Vector3 &normal, float d) |
|
void | Set (float a, float b, float c, float d) |
|
void | SetNormal (const Vector3 &normal) |
|
void | SetDistance (float d) |
|
Plane | GetTransform (const Transform &tm) const |
| Applies the specified transform to the plane, returns the transformed plane.
|
|
void | ApplyTransform (const Transform &tm) |
|
const Vector4 & | GetPlaneEquationCoefficients () const |
| Returns the coefficients of the plane equation as a Vector4, i.e. (A,B,C,D).
|
|
Vector3 | GetNormal () const |
|
float | GetDistance () const |
|
float | GetPointDist (const Vector3 &pos) const |
| Calculates the distance between a point and the plane.
|
|
Vector3 | GetProjected (const Vector3 &v) const |
| Project vector onto a plane.
|
|
bool | CastRay (const Vector3 &start, const Vector3 &dir, Vector3 &hitPoint) const |
| Returns true if ray plane intersect, otherwise false. If true hitPoint contains the result.
|
|
bool | CastRay (const Vector3 &start, const Vector3 &dir, float &hitTime) const |
|
bool | IntersectSegment (const Vector3 &start, const Vector3 &end, Vector3 &hitPoint) const |
| Intersect the plane with line segment. Return true if they intersect otherwise false.
|
|
bool | IntersectSegment (const Vector3 &start, const Vector3 &end, float &hitTime) const |
|
bool | IsFinite () const |
|
bool | operator== (const Plane &rhs) const |
|
bool | operator!= (const Plane &rhs) const |
|
Simd::Vec4::FloatType | GetSimdValue () const |
| Exposes the internal simd representation of the plane.
|
|
|
static void | Reflect (ReflectContext *context) |
|
static Plane | CreateFromNormalAndPoint (const Vector3 &normal, const Vector3 &point) |
|
static Plane | CreateFromNormalAndDistance (const Vector3 &normal, float dist) |
|
static Plane | CreateFromCoefficients (const float a, const float b, const float c, const float d) |
|
static Plane | CreateFromTriangle (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2) |
| Assumes counter clockwise(right handed) winding.
|
|
static Plane | CreateFromVectorCoefficients (const Vector4 &coefficients) |
|
Plane defined by a Vector4 with components (A,B,C,D), the plane equation used is Ax+By+Cz+D=0. The distance of a point from the plane is given by Ax+By+Cz+D, or just simply plane.Dot4(point).
Note that the D component is often referred to as 'distance' below, in the sense that it is the distance of the origin from the plane. This is not the same as what many other people refer to as the plane distance, which would be the negation of this.