Show / Hide Table of Contents

Struct PlaneF

Represents a plane in the form of Ax + By + Cz = D. The following applies: Ax + Bx + Cz - D = 0. The plane's normal equals n = (A, B, C) and may NOT necessarily be of unit length. The plane divides a space into two half-spaces.The direction plane's normal vector defines the "outer" or negative half-space. Points that lie in the positive half space of the plane do have a negative signed distance to the plane.

Inherited Members
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Fusee.Math.Core
Assembly: Fusee.Math.Core.dll
Syntax
public struct PlaneF

Fields

D

The D plane coefficient.

Declaration
public float D
Field Value
Type Description
System.Single

Properties

A

The A plane coefficient.

Declaration
public float A { get; set; }
Property Value
Type Description
System.Single

B

The B plane coefficient.

Declaration
public float B { get; set; }
Property Value
Type Description
System.Single

C

The C plane coefficient.

Declaration
public float C { get; set; }
Property Value
Type Description
System.Single

Normal

The plane's normal vector. May NOT be of unit length if the plane isn't normalized.

Declaration
public readonly float3 Normal { get; }
Property Value
Type Description
float3

Methods

AngleBetween(PlaneF)

Calculates the angle between this plane and another one.

Declaration
public float AngleBetween(PlaneF other)
Parameters
Type Name Description
PlaneF other

The other plane to calculate the angle with.

Returns
Type Description
System.Single

Equals(Object)

Indicates whether this plane is equal to another object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object. This method will throw an exception if the object isn't of type PlaneF.

Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Generates a hash code for this plane.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()

InsideOrIntersecting(AABBf)

Test whether a AABBf intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164 CAREFUL: the definition whats completely inside and outside is flipped in comparison to Ericson, because FUSEE defines a point with a negative signed distance to be inside.

Declaration
public bool InsideOrIntersecting(AABBf aabb)
Parameters
Type Name Description
AABBf aabb

The axis aligned bounding box.

Returns
Type Description
System.Boolean

InsideOrIntersecting(float3, float3)

Test whether a cuboid intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164 CAREFUL: the definition whats completely inside and outside is flipped in comparison to Ericson, because FUSEE defines a point with a negative signed distance to be inside.

Declaration
public bool InsideOrIntersecting(float3 center, float3 size)
Parameters
Type Name Description
float3 center

The center of the cuboid.

float3 size

The width, height and length of the cuboid.

Returns
Type Description
System.Boolean

InsideOrIntersecting(float3, Single)

Test whether a cuboid intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164 CAREFUL: the definition whats completely inside and outside is flipped in comparison to Ericson, because FUSEE defines a point with a negative signed distance to be inside.

Declaration
public bool InsideOrIntersecting(float3 center, float size)
Parameters
Type Name Description
float3 center

The center of the cuboid.

System.Single size

The width, height and length of the cuboid.

Returns
Type Description
System.Boolean

InsideOrIntersecting(OBBf)

Test whether a OBBf intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164 CAREFUL: the definition whats completely inside and outside is flipped in comparison to Ericson, because FUSEE defines a point with a negative signed distance to be inside.

Declaration
public bool InsideOrIntersecting(OBBf obb)
Parameters
Type Name Description
OBBf obb

The object oriented bounding box.

Returns
Type Description
System.Boolean

Intersects(AABBf)

Test whether a AABBf intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164

Declaration
public bool Intersects(AABBf aabb)
Parameters
Type Name Description
AABBf aabb

The axis aligned bounding box.

Returns
Type Description
System.Boolean

Intersects(float3, float3)

Test whether a cuboid intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164

Declaration
public bool Intersects(float3 center, float3 size)
Parameters
Type Name Description
float3 center

The center of the cuboid.

float3 size

The width, height and length of the cuboid.

Returns
Type Description
System.Boolean

Intersects(OBBf)

Test whether a OBBf intersects this plane. See: Ericson 2005, Real Time Collision Detection, p. 161 - 164

Declaration
public bool Intersects(OBBf obb)
Parameters
Type Name Description
OBBf obb

The axis aligned bounding box.

Returns
Type Description
System.Boolean

Normalize()

Normalizes this plane.

Declaration
public PlaneF Normalize()
Returns
Type Description
PlaneF

SignedDistanceFromPoint(float3)

Returns the signed distance from a point to this plane. If the plane isn't normalized this may not be the euclidean distance! For normalized and unnormalized planes the following is true: 1.If the distance is negative, the point lies in the negative half-space. 2.If 0 = dist, the point lies in the plane. 3.If the distance is positive the point lies in the positive half-space.

Declaration
public float SignedDistanceFromPoint(float3 pt)
Parameters
Type Name Description
float3 pt

An arbitrary point.

Returns
Type Description
System.Single

Operators

Equality(PlaneF, PlaneF)

Operator override for equality.

Declaration
public static bool operator ==(PlaneF left, PlaneF right)
Parameters
Type Name Description
PlaneF left

The plane.

PlaneF right

The scalar value.

Returns
Type Description
System.Boolean

Inequality(PlaneF, PlaneF)

Operator override for inequality.

Declaration
public static bool operator !=(PlaneF left, PlaneF right)
Parameters
Type Name Description
PlaneF left

The plane.

PlaneF right

The scalar value.

Returns
Type Description
System.Boolean

Multiply(PlaneF, Single)

Operator override for multiplying a Plane with a float.

Declaration
public static PlaneF operator *(PlaneF plane, float scalar)
Parameters
Type Name Description
PlaneF plane

The plane.

System.Single scalar

The scalar value.

Returns
Type Description
PlaneF
Generated by DocFX
GitHub Repo
Back to top