Struct Plane
A plane in 3d space, represented by its normal away from the origin and its distance from the origin, D.
[DataContract]
public struct Plane : IEquatable<Plane>
- Implements
- Inherited Members
Constructors
Plane(Vector3, Vector3)
public Plane(Vector3 pointOnPlane, Vector3 normal)
Parameters
pointOnPlane
Vector3A point the created Plane should contain.
normal
Vector3The normal of the plane.
Plane(Vector3, Vector3, Vector3)
Create the Plane that contains the three specified points.
public Plane(Vector3 a, Vector3 b, Vector3 c)
Parameters
a
Vector3A point the created Plane should contain.
b
Vector3A point the created Plane should contain.
c
Vector3A point the created Plane should contain.
Plane(Vector3, float)
Create a Plane with the specified normal and distance to the origin.
public Plane(Vector3 normal, float d)
Parameters
Plane(Vector4)
Create a Plane with the first three components of the specified Vector4 as the normal and the last component as the distance to the origin.
public Plane(Vector4 value)
Parameters
value
Vector4A vector holding the normal and distance to origin.
Plane(float, float, float, float)
Create a Plane with the first three values as the X, Y and Z components of the normal and the last value as the distance to the origin.
public Plane(float a, float b, float c, float d)
Parameters
a
floatThe X component of the normal.
b
floatThe Y component of the normal.
c
floatThe Z component of the normal.
d
floatThe distance to the origin.
Fields
D
The distance of the Plane to the origin.
[DataMember]
public float D
Field Value
Normal
The normal of the Plane.
[DataMember]
public Vector3 Normal
Field Value
Methods
Deconstruct(out Vector3, out float)
Deconstruction method for Plane.
public void Deconstruct(out Vector3 normal, out float d)
Parameters
Dot(Vector4)
public float Dot(Vector4 value)
Parameters
Returns
Dot(ref Vector4, out float)
public void Dot(ref Vector4 value, out float result)
Parameters
DotCoordinate(Vector3)
Get the dot product of a Vector3 with the Normal vector of this Plane plus the D value of this Plane.
public float DotCoordinate(Vector3 value)
Parameters
Returns
- float
The dot product of the specified Vector3 and the normal of this Plane plus the D value of this Plane.
DotCoordinate(ref Vector3, out float)
Get the dot product of a Vector3 with the Normal vector of this Plane plus the D value of this Plane.
public void DotCoordinate(ref Vector3 value, out float result)
Parameters
value
Vector3The Vector3 to calculate the dot product with.
result
floatThe dot product of the specified Vector3 and the normal of this Plane plus the D value of this Plane.
DotNormal(Vector3)
public float DotNormal(Vector3 value)
Parameters
Returns
DotNormal(ref Vector3, out float)
public void DotNormal(ref Vector3 value, out float result)
Parameters
value
Vector3The Vector3 to calculate the dot product with.
result
floatThe dot product of the specified Vector3 and the normal of this Plane.
Equals(Plane)
public bool Equals(Plane other)
Parameters
Returns
Equals(object)
public override bool Equals(object other)
Parameters
Returns
GetHashCode()
Get a hash code for this Plane.
public override int GetHashCode()
Returns
Intersects(BoundingBox)
Check if this Plane intersects a BoundingBox.
public PlaneIntersectionType Intersects(BoundingBox box)
Parameters
box
BoundingBoxThe BoundingBox to test for intersection.
Returns
- PlaneIntersectionType
The type of intersection of this Plane with the specified BoundingBox.
Intersects(ref BoundingBox, out PlaneIntersectionType)
Check if this Plane intersects a BoundingBox.
public void Intersects(ref BoundingBox box, out PlaneIntersectionType result)
Parameters
box
BoundingBoxThe BoundingBox to test for intersection.
result
PlaneIntersectionTypeThe type of intersection of this Plane with the specified BoundingBox.
Intersects(BoundingFrustum)
Check if this Plane intersects a BoundingFrustum.
public PlaneIntersectionType Intersects(BoundingFrustum frustum)
Parameters
frustum
BoundingFrustumThe BoundingFrustum to test for intersection.
Returns
- PlaneIntersectionType
The type of intersection of this Plane with the specified BoundingFrustum.
Intersects(BoundingSphere)
Check if this Plane intersects a BoundingSphere.
public PlaneIntersectionType Intersects(BoundingSphere sphere)
Parameters
sphere
BoundingSphereThe BoundingSphere to test for intersection.
Returns
- PlaneIntersectionType
The type of intersection of this Plane with the specified BoundingSphere.
Intersects(ref BoundingSphere, out PlaneIntersectionType)
Check if this Plane intersects a BoundingSphere.
public void Intersects(ref BoundingSphere sphere, out PlaneIntersectionType result)
Parameters
sphere
BoundingSphereThe BoundingSphere to test for intersection.
result
PlaneIntersectionTypeThe type of intersection of this Plane with the specified BoundingSphere.
Normalize()
Normalize the normal vector of this plane.
public void Normalize()
Normalize(Plane)
Get a normalized version of the specified plane.
public static Plane Normalize(Plane value)
Parameters
Returns
Normalize(ref Plane, out Plane)
Get a normalized version of the specified plane.
public static void Normalize(ref Plane value, out Plane result)
Parameters
ToNumerics()
Returns a Plane.
public Plane ToNumerics()
Returns
ToString()
public override string ToString()
Returns
Transform(Plane, Matrix)
Transforms a normalized plane by a matrix.
public static Plane Transform(Plane plane, Matrix matrix)
Parameters
Returns
- Plane
The transformed plane.
Transform(Plane, Quaternion)
Transforms a normalized plane by a quaternion rotation.
public static Plane Transform(Plane plane, Quaternion rotation)
Parameters
plane
PlaneThe normalized plane to transform.
rotation
QuaternionThe quaternion rotation.
Returns
- Plane
The transformed plane.
Transform(ref Plane, ref Matrix, out Plane)
Transforms a normalized plane by a matrix.
public static void Transform(ref Plane plane, ref Matrix matrix, out Plane result)
Parameters
plane
PlaneThe normalized plane to transform.
matrix
MatrixThe transformation matrix.
result
PlaneThe transformed plane.
Transform(ref Plane, ref Quaternion, out Plane)
Transforms a normalized plane by a quaternion rotation.
public static void Transform(ref Plane plane, ref Quaternion rotation, out Plane result)
Parameters
plane
PlaneThe normalized plane to transform.
rotation
QuaternionThe quaternion rotation.
result
PlaneThe transformed plane.
Operators
operator ==(Plane, Plane)
Check if two planes are equal.
public static bool operator ==(Plane plane1, Plane plane2)
Parameters
Returns
- bool
true
if they are not.false
implicit operator Plane(Plane)
public static implicit operator Plane(Plane value)
Parameters
value
PlaneThe converted value.
Returns
operator !=(Plane, Plane)
Check if two planes are not equal.
public static bool operator !=(Plane plane1, Plane plane2)
Parameters
Returns
- bool
true
if they are.false