Struct Plane
Represents a plane.
Implements
Inherited Members
Namespace: Evergine.Mathematics
Assembly: Evergine.Mathematics.dll
Syntax
public struct Plane : IEquatable<Plane>
Constructors
Plane(Vector3, Vector3, Vector3)
Initializes a new instance of the Plane struct.
Declaration
public Plane(Vector3 point1, Vector3 point2, Vector3 point3)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point1 | The point1. |
Vector3 | point2 | The point2. |
Vector3 | point3 | The point3. |
Plane(Vector3, float)
Initializes a new instance of the Plane struct.
Declaration
public Plane(Vector3 normal, float d)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | normal | The plane's normal vector. |
float | d | The plane's distance from the origin along its normal vector. |
Plane(Vector4)
Initializes a new instance of the Plane struct.
Declaration
public Plane(Vector4 value)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | value | A vector whose first three elements describe the normal vector. |
Plane(float, float, float, float)
Initializes a new instance of the Plane struct.
Declaration
public Plane(float a, float b, float c, float d)
Parameters
Type | Name | Description |
---|---|---|
float | a | The X component of the normal.. |
float | b | The Y component of the normal.. |
float | c | The Z component of the normal.. |
float | d | The distance of the plane along its normal from the origin. |
Fields
D
The distance of the plane along its normal from the origin.
Declaration
public float D
Field Value
Type | Description |
---|---|
float |
Normal
The normal vector of the plane.
Declaration
public Vector3 Normal
Field Value
Type | Description |
---|---|
Vector3 |
Methods
Dot(Plane, Vector4)
Calculates the dot product of a Plane and Vector4.
Declaration
public static float Dot(Plane plane, Vector4 value)
Parameters
Returns
Type | Description |
---|---|
float | The dot product. |
Dot(Vector4)
Dots the specified value.
Declaration
public float Dot(Vector4 value)
Parameters
Type | Name | Description |
---|---|---|
Vector4 | value | The value. |
Returns
Type | Description |
---|---|
float | The result. |
Dot(ref Vector4, out float)
Dots the specified value.
Declaration
public void Dot(ref Vector4 value, out float result)
Parameters
DotCoordinate(Plane, Vector3)
Returns the dot product of a specified Vector3 and the normal vector of this Plane plus the distance (D) value of the Plane.
Declaration
public static float DotCoordinate(Plane plane, Vector3 value)
Parameters
Returns
Type | Description |
---|---|
float | The resulting value. |
DotCoordinate(Vector3)
Dots the coordinate.
Declaration
public float DotCoordinate(Vector3 value)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | value | The value. |
Returns
Type | Description |
---|---|
float | The result. |
DotCoordinate(ref Vector3, out float)
Dots the coordinate.
Declaration
public void DotCoordinate(ref Vector3 value, out float result)
Parameters
DotNormal(Plane, Vector3)
Returns the dot product of a specified Vector3 and the Normal vector of this Plane.
Declaration
public static float DotNormal(Plane plane, Vector3 value)
Parameters
Returns
Type | Description |
---|---|
float | The resulting dot product. |
DotNormal(Vector3)
Dots the normal.
Declaration
public float DotNormal(Vector3 value)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | value | The value. |
Returns
Type | Description |
---|---|
float | The result. |
DotNormal(ref Vector3, out float)
Dots the normal.
Declaration
public void DotNormal(ref Vector3 value, out float result)
Parameters
Equals(Plane)
Equalses the specified other.
Declaration
public bool Equals(Plane other)
Parameters
Type | Name | Description |
---|---|---|
Plane | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(ref Plane)
Equalses the specified other.
Declaration
public bool Equals(ref Plane other)
Parameters
Type | Name | Description |
---|---|---|
Plane | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Returns
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Intersects(BoundingBox)
Intersectses the specified box.
Declaration
public PlaneIntersectionType Intersects(BoundingBox box)
Parameters
Type | Name | Description |
---|---|---|
Bounding |
box | The box. |
Returns
Type | Description |
---|---|
Plane |
The result. |
Intersects(ref BoundingBox, out PlaneIntersectionType)
Intersectses the specified box.
Declaration
public void Intersects(ref BoundingBox box, out PlaneIntersectionType result)
Parameters
Type | Name | Description |
---|---|---|
Bounding |
box | The box. |
Plane |
result | The result. |
Intersects(BoundingFrustum)
Intersectses the specified frustum.
Declaration
public PlaneIntersectionType Intersects(BoundingFrustum frustum)
Parameters
Type | Name | Description |
---|---|---|
Bounding |
frustum | The frustum. |
Returns
Type | Description |
---|---|
Plane |
The result. |
Intersects(BoundingSphere)
Intersectses the specified sphere.
Declaration
public PlaneIntersectionType Intersects(BoundingSphere sphere)
Parameters
Type | Name | Description |
---|---|---|
Bounding |
sphere | The sphere. |
Returns
Type | Description |
---|---|
Plane |
The result. |
Intersects(ref BoundingSphere, out PlaneIntersectionType)
Intersectses the specified sphere.
Declaration
public void Intersects(ref BoundingSphere sphere, out PlaneIntersectionType result)
Parameters
Type | Name | Description |
---|---|---|
Bounding |
sphere | The sphere. |
Plane |
result | The result. |
Intersects(Plane)
Computes the intersection line between two planes.
Declaration
public Ray Intersects(Plane p2)
Parameters
Type | Name | Description |
---|---|---|
Plane | p2 | The p2. |
Returns
Type | Description |
---|---|
Ray | The result. |
Intersects(ref Plane, out Ray)
Computes the intersection line between two planes.
Declaration
public void Intersects(ref Plane p2, out Ray ray)
Parameters
Normalize()
Normalizes this instance.
Declaration
public void Normalize()
Normalize(Plane)
Normalizes the specified value.
Declaration
public static Plane Normalize(Plane value)
Parameters
Type | Name | Description |
---|---|---|
Plane | value | The value. |
Returns
Type | Description |
---|---|
Plane | The result. |
Normalize(ref Plane, out Plane)
Normalizes the specified value.
Declaration
public static void Normalize(ref Plane value, out Plane result)
Parameters
PointDistance(Vector3)
Gets the distance between a Plane and a point.
Declaration
public float PointDistance(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | The point. |
Returns
Type | Description |
---|---|
float | The distance between the plane and the point. |
PointDistance(ref Vector3)
Gets the distance between a Plane and a point.
Declaration
public float PointDistance(ref Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | The point. |
Returns
Type | Description |
---|---|
float | The distance between the plane and the point. |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Overrides
Transform(Plane, Matrix4x4)
Transforms the specified plane.
Declaration
public static Plane Transform(Plane plane, Matrix4x4 matrix)
Parameters
Returns
Type | Description |
---|---|
Plane | The result. |
Transform(Plane, Quaternion)
Transforms the specified plane.
Declaration
public static Plane Transform(Plane plane, Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Plane | plane | The plane. |
Quaternion | rotation | The rotation. |
Returns
Type | Description |
---|---|
Plane | The result. |
Transform(ref Plane, ref Matrix4x4, out Plane)
Transforms the specified plane.
Declaration
public static void Transform(ref Plane plane, ref Matrix4x4 matrix, out Plane result)
Parameters
Transform(ref Plane, ref Quaternion, out Plane)
Transforms the specified plane.
Declaration
public static void Transform(ref Plane plane, ref Quaternion rotation, out Plane result)
Parameters
Type | Name | Description |
---|---|---|
Plane | plane | The plane. |
Quaternion | rotation | The rotation. |
Plane | result | The result. |
Operators
operator ==(Plane, Plane)
Implements the operator ==.
Declaration
public static bool operator ==(Plane lhs, Plane rhs)
Parameters
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(Plane, Plane)
Implements the operator !=.
Declaration
public static bool operator !=(Plane lhs, Plane rhs)
Parameters
Returns
Type | Description |
---|---|
bool | The result of the operator. |