Table of Contents

Struct FixedBoundFrustum

Namespace
FixedMathSharp.Geometry
Assembly
FixedMathSharp.dll

Represents a frustum bounded by six clipping planes.

public struct FixedBoundFrustum : IEquatable<FixedBoundFrustum>
Implements
Inherited Members

Constructors

FixedBoundFrustum(Fixed4x4)

Initializes a new frustum by extracting the planes and corners from a combined view-projection matrix.

public FixedBoundFrustum(Fixed4x4 matrix)

Parameters

matrix Fixed4x4

FixedBoundFrustum(FixedPlane, FixedPlane, FixedPlane, FixedPlane, FixedPlane, FixedPlane)

Initializes a new frustum from six clipping planes.

public FixedBoundFrustum(FixedPlane near, FixedPlane far, FixedPlane left, FixedPlane right, FixedPlane top, FixedPlane bottom)

Parameters

near FixedPlane
far FixedPlane
left FixedPlane
right FixedPlane
top FixedPlane
bottom FixedPlane

FixedBoundFrustum(FixedPlane[])

Initializes a new frustum from six clipping planes in near, far, left, right, top, bottom order.

public FixedBoundFrustum(FixedPlane[] planes)

Parameters

planes FixedPlane[]

Fields

CornerCount

The number of corner points in a frustum.

public const int CornerCount = 8

Field Value

int

PlaneCount

The number of planes in a frustum.

public const int PlaneCount = 6

Field Value

int

Properties

Bottom

Gets the bottom clipping plane.

public FixedPlane Bottom { get; }

Property Value

FixedPlane

Far

Gets the far clipping plane.

public FixedPlane Far { get; }

Property Value

FixedPlane

HasMatrix

Gets a value indicating whether this frustum was created from a matrix source.

public bool HasMatrix { get; }

Property Value

bool

Left

Gets the left clipping plane.

public FixedPlane Left { get; }

Property Value

FixedPlane

Matrix

Gets or sets the matrix source used to define this frustum.

public Fixed4x4 Matrix { get; set; }

Property Value

Fixed4x4

Exceptions

InvalidOperationException

Thrown when reading the matrix from a frustum that was created from planes.

Max

Gets the maximum corner of the axis-aligned box that encloses the frustum.

public readonly Vector3d Max { get; }

Property Value

Vector3d

Min

Gets the minimum corner of the axis-aligned box that encloses the frustum.

public readonly Vector3d Min { get; }

Property Value

Vector3d

Near

Gets the near clipping plane.

public FixedPlane Near { get; }

Property Value

FixedPlane

Right

Gets the right clipping plane.

public FixedPlane Right { get; }

Property Value

FixedPlane

Top

Gets the top clipping plane.

public FixedPlane Top { get; }

Property Value

FixedPlane

Methods

ClampPoint(Vector3d)

Clamps a point to this frustum, returning the point unchanged when it is already inside.

public Vector3d ClampPoint(Vector3d point)

Parameters

point Vector3d

Returns

Vector3d

Contains(FixedBoundBox)

Tests a bounding box against this frustum.

public FixedEnclosureType Contains(FixedBoundBox box)

Parameters

box FixedBoundBox

Returns

FixedEnclosureType

Contains(FixedBoundFrustum)

Tests another frustum against this frustum.

public FixedEnclosureType Contains(FixedBoundFrustum frustum)

Parameters

frustum FixedBoundFrustum

Returns

FixedEnclosureType

Contains(FixedBoundSphere)

Tests a bounding sphere against this frustum.

public FixedEnclosureType Contains(FixedBoundSphere sphere)

Parameters

sphere FixedBoundSphere

Returns

FixedEnclosureType

Contains(Vector3d)

Tests a point against this frustum.

public FixedEnclosureType Contains(Vector3d point)

Parameters

point Vector3d

Returns

FixedEnclosureType

Equals(FixedBoundFrustum)

public bool Equals(FixedBoundFrustum other)

Parameters

other FixedBoundFrustum

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetCorner(int)

Gets the corner at the specified stable index without allocating.

public Vector3d GetCorner(int index)

Parameters

index int

Returns

Vector3d

GetCorners()

Returns a copy of the frustum corner array.

public Vector3d[] GetCorners()

Returns

Vector3d[]

GetCorners(Vector3d[])

Copies this frustum's corners into the specified array.

public void GetCorners(Vector3d[] corners)

Parameters

corners Vector3d[]

GetHashCode()

public override int GetHashCode()

Returns

int

GetPlane(int)

Gets the plane at the specified stable index in near, far, left, right, top, bottom order without allocating.

public FixedPlane GetPlane(int index)

Parameters

index int

Returns

FixedPlane

GetPlanes()

Returns a copy of the frustum plane array in near, far, left, right, top, bottom order.

public FixedPlane[] GetPlanes()

Returns

FixedPlane[]

GetPlanes(FixedPlane[])

Copies this frustum's planes into the specified array in near, far, left, right, top, bottom order.

public void GetPlanes(FixedPlane[] planes)

Parameters

planes FixedPlane[]

Intersects(FixedBoundBox)

Checks whether a bounding box intersects this frustum.

public bool Intersects(FixedBoundBox box)

Parameters

box FixedBoundBox

Returns

bool

Intersects(FixedBoundFrustum)

Checks whether another frustum intersects this frustum.

public bool Intersects(FixedBoundFrustum frustum)

Parameters

frustum FixedBoundFrustum

Returns

bool

Intersects(FixedBoundSphere)

Checks whether a bounding sphere intersects this frustum.

public bool Intersects(FixedBoundSphere sphere)

Parameters

sphere FixedBoundSphere

Returns

bool

Intersects(FixedPlane)

Classifies this frustum relative to a plane.

public FixedPlaneIntersectionType Intersects(FixedPlane plane)

Parameters

plane FixedPlane

Returns

FixedPlaneIntersectionType

Intersects(FixedRay)

Finds the first forward intersection between the specified ray and this frustum.

public Fixed64? Intersects(FixedRay ray)

Parameters

ray FixedRay

Returns

Fixed64?