Struct Plane
Represents a plane in three dimensional space.
Assembly: FlaxEngine.dll
File: Engine/Core/Math/Plane.h
Syntax
public struct Plane
Constructors
Plane()
Empty constructor.
Declaration
public Plane() = default
Plane(const Vector3& normal, Real d)
Init
Declaration
public Plane(const Vector3& normal, Real d)
Parameters
Vector3
normal
The normal of the plane |
Real
d
The distance of the plane along its normal from the origin |
Plane(const Vector3& point, const Vector3& normal)
Init
Declaration
public Plane(const Vector3& point, const Vector3& normal)
Parameters
Vector3
point
Any point that lies along the plane |
Vector3
normal
The normal vector to the plane |
Plane(const Vector3& point1, const Vector3& point2, const Vector3& point3)
Init
Declaration
public Plane(const Vector3& point1, const Vector3& point2, const Vector3& point3)
Parameters
Vector3
point1
First point of a triangle defining the plane |
Vector3
point2
Second point of a triangle defining the plane |
Vector3
point3
Third point of a triangle defining the plane |
Fields
D
The distance of the plane along its normal from the origin.
Declaration
public Real D
Field Value
Real
|
DistanceEpsilon
Declaration
public static constexpr Real DistanceEpsilon = 0.0001f
Field Value
constexpr Real
|
Normal
The normal vector of the plane.
Declaration
public Vector3 Normal
Field Value
Vector3
|
NormalEpsilon
Declaration
public static constexpr Real NormalEpsilon = 1.0f / 65535.0f
Field Value
constexpr Real
|
Methods
Dot(const Plane& left, const Vector4& right)
Declaration
public static Real Dot(const Plane& left, const Vector4& right)
Parameters
Plane
left
|
Vector4
right
|
Returns
Real
|
Dot(const Plane& left, const Vector4& right, Real& result)
Declaration
public static void Dot(const Plane& left, const Vector4& right, Real& result)
Parameters
Plane
left
|
Vector4
right
|
Real
result
|
DotCoordinate(const Plane& left, const Vector3& right)
Declaration
public static Real DotCoordinate(const Plane& left, const Vector3& right)
Parameters
Plane
left
|
Vector3
right
|
Returns
Real
|
DotCoordinate(const Plane& left, const Vector3& right, Real& result)
Declaration
public static void DotCoordinate(const Plane& left, const Vector3& right, Real& result)
Parameters
Plane
left
|
Vector3
right
|
Real
result
|
DotNormal(const Plane& left, const Vector3& right)
Declaration
public static Real DotNormal(const Plane& left, const Vector3& right)
Parameters
Plane
left
|
Vector3
right
|
Returns
Real
|
DotNormal(const Plane& left, const Vector3& right, Real& result)
Declaration
public static void DotNormal(const Plane& left, const Vector3& right, Real& result)
Parameters
Plane
left
|
Vector3
right
|
Real
result
|
Intersection(const Plane& inPlane1, const Plane& inPlane2, const Plane& inPlane3)
Declaration
public static Vector3 Intersection(const Plane& inPlane1, const Plane& inPlane2, const Plane& inPlane3)
Parameters
Plane
inPlane1
|
Plane
inPlane2
|
Plane
inPlane3
|
Returns
Vector3
|
Intersects(const BoundingBox& box)
Declaration
public PlaneIntersectionType Intersects(const BoundingBox& box) const
Parameters
BoundingBox
box
|
Returns
PlaneIntersectionType
|
Intersects(const BoundingSphere& sphere)
Declaration
public PlaneIntersectionType Intersects(const BoundingSphere& sphere) const
Parameters
BoundingSphere
sphere
|
Returns
PlaneIntersectionType
|
Intersects(const Plane& plane)
Intersects(const Plane& plane, Ray& line)
Declaration
public bool Intersects(const Plane& plane, Ray& line) const
Parameters
Plane
plane
|
Ray
line
|
Returns
bool
|
Intersects(const Ray& ray)
Intersects(const Ray& ray, Real& distance)
Declaration
public bool Intersects(const Ray& ray, Real& distance) const
Parameters
Ray
ray
|
Real
distance
|
Returns
bool
|
Intersects(const Ray& ray, Vector3& point)
Declaration
public bool Intersects(const Ray& ray, Vector3& point) const
Parameters
Ray
ray
|
Vector3
point
|
Returns
bool
|
Intersects(const Vector3& point)
Declaration
public PlaneIntersectionType Intersects(const Vector3& point) const
Parameters
Vector3
point
|
Returns
PlaneIntersectionType
|
Intersects(const Vector3& vertex1, const Vector3& vertex2, const Vector3& vertex3)
Declaration
public PlaneIntersectionType Intersects(const Vector3& vertex1, const Vector3& vertex2, const Vector3& vertex3) const
Parameters
Vector3
vertex1
|
Vector3
vertex2
|
Vector3
vertex3
|
Returns
PlaneIntersectionType
|
Multiply(const Plane& value, Real scale)
Declaration
public static Plane Multiply(const Plane& value, Real scale)
Parameters
Plane
value
|
Real
scale
|
Returns
Plane
|
Multiply(const Plane& value, Real scale, Plane& result)
Declaration
public static void Multiply(const Plane& value, Real scale, Plane& result)
Parameters
Plane
value
|
Real
scale
|
Plane
result
|
NearEqual(const Plane& a, const Plane& b)
Declaration
public static bool NearEqual(const Plane& a, const Plane& b)
Parameters
Plane
a
|
Plane
b
|
Returns
bool
|
Negate()
Declaration
public void Negate()
Negated()
Normalize()
Changes the coefficients of the normal vector of the plane to make it of unit length.
Declaration
public void Normalize()
Normalize(const Plane& plane)
Normalize(const Plane& plane, Plane& result)
Declaration
public static void Normalize(const Plane& plane, Plane& result)
Parameters
Plane
plane
|
Plane
result
|
operator!=(const Plane& other)
operator*(Real scale)
operator==(const Plane& other)
PointOnPlane()
Declaration
public Vector3 PointOnPlane() const
Returns
Vector3
|
ToString()
Transform(const Plane& plane, const Matrix& transformation)
Declaration
public static Plane Transform(const Plane& plane, const Matrix& transformation)
Parameters
Plane
plane
|
Matrix
transformation
|
Returns
Plane
|
Transform(const Plane& plane, const Matrix& transformation, Plane& result)
Declaration
public static void Transform(const Plane& plane, const Matrix& transformation, Plane& result)
Parameters
Plane
plane
|
Matrix
transformation
|
Plane
result
|
Transform(const Plane& plane, const Quaternion& rotation)
Declaration
public static Plane Transform(const Plane& plane, const Quaternion& rotation)
Parameters
Plane
plane
|
Quaternion
rotation
|
Returns
Plane
|
Transform(const Plane& plane, const Quaternion& rotation, Plane& result)
Declaration
public static void Transform(const Plane& plane, const Quaternion& rotation, Plane& result)
Parameters
Plane
plane
|
Quaternion
rotation
|
Plane
result
|
Translate(const Vector3& translation)
Declaration
public void Translate(const Vector3& translation)
Parameters
Vector3
translation
|
Translated(const Plane& plane, const Vector3& translation)
Declaration
public static Plane Translated(const Plane& plane, const Vector3& translation)
Parameters
Plane
plane
|
Vector3
translation
|
Returns
Plane
|