Struct FixedPlane
- Namespace
- FixedMathSharp.Geometry
- Assembly
- FixedMathSharp.dll
Represents a plane in 3D space using a normal vector and a distance from the origin.
[MemoryPackable(GenerateType.Object)]
public struct FixedPlane : IEquatable<FixedPlane>, IMemoryPackable<FixedPlane>, IMemoryPackFormatterRegister
- Implements
-
IMemoryPackable<FixedPlane>IMemoryPackFormatterRegister
- Inherited Members
Remarks
MemoryPack GenerateType: unmanaged
FixedMathSharp.Vector3d Normal
FixedMathSharp.Fixed64 D
Constructors
FixedPlane(Fixed64, Fixed64, Fixed64, Fixed64)
Initializes a new plane from the normal components and distance component.
public FixedPlane(Fixed64 x, Fixed64 y, Fixed64 z, Fixed64 d)
Parameters
FixedPlane(Vector3d, Fixed64)
Initializes a new plane from a normal and distance component.
[JsonConstructor]
public FixedPlane(Vector3d normal, Fixed64 d)
Parameters
FixedPlane(Vector3d, Vector3d)
Initializes a new plane that contains the specified point with the specified normal.
public FixedPlane(Vector3d pointOnPlane, Vector3d normal)
Parameters
FixedPlane(Vector3d, Vector3d, Vector3d)
Initializes a new plane that contains the specified points.
public FixedPlane(Vector3d a, Vector3d b, Vector3d c)
Parameters
Fields
D
The plane distance component.
[JsonInclude]
[MemoryPackOrder(1)]
public Fixed64 D
Field Value
Normal
The plane normal.
[JsonInclude]
[MemoryPackOrder(0)]
public Vector3d Normal
Field Value
Methods
Deconstruct(out Vector3d, out Fixed64)
Deconstructs the plane into its normal and distance components.
public void Deconstruct(out Vector3d normal, out Fixed64 d)
Parameters
DotCoordinate(Vector3d)
Gets the dot product of the specified coordinate and this plane.
public Fixed64 DotCoordinate(Vector3d value)
Parameters
valueVector3d
Returns
DotNormal(Vector3d)
Gets the dot product of the specified vector and this plane's normal.
public Fixed64 DotNormal(Vector3d value)
Parameters
valueVector3d
Returns
Equals(FixedPlane)
public bool Equals(FixedPlane other)
Parameters
otherFixedPlane
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
GetNormalized(FixedPlane)
Gets a normalized copy of the specified plane.
public static FixedPlane GetNormalized(FixedPlane value)
Parameters
valueFixedPlane
Returns
Intersects(FixedBoundBox)
Classifies a bounding box relative to this plane.
public FixedPlaneIntersectionType Intersects(FixedBoundBox box)
Parameters
boxFixedBoundBox
Returns
Intersects(FixedBoundSphere)
Classifies a bounding sphere relative to this plane.
public FixedPlaneIntersectionType Intersects(FixedBoundSphere sphere)
Parameters
sphereFixedBoundSphere
Returns
NormalizeInPlace()
Normalizes this plane in place.
public void NormalizeInPlace()
Operators
operator ==(FixedPlane, FixedPlane)
Determines whether two planes are equal.
public static bool operator ==(FixedPlane left, FixedPlane right)
Parameters
leftFixedPlanerightFixedPlane
Returns
operator !=(FixedPlane, FixedPlane)
Determines whether two planes are not equal.
public static bool operator !=(FixedPlane left, FixedPlane right)
Parameters
leftFixedPlanerightFixedPlane