Table of Contents

Class FixedFrustumUnityExtensions

Provides explicit conversions between Unity frustum data and FixedMathSharp frustums.

public static class FixedFrustumUnityExtensions
Inheritance
FixedFrustumUnityExtensions
Inherited Members

Methods

CopyToUnityFrustumPlanes(FixedBoundFrustum, Plane[])

Converts a FixedMathSharp bound frustum to Unity planes in the supplied six-plane buffer.

public static void CopyToUnityFrustumPlanes(this FixedBoundFrustum frustum, Plane[] planeBuffer)

Parameters

frustum FixedBoundFrustum

The FixedMathSharp frustum to convert.

planeBuffer Plane[]

The six-element destination buffer, ordered left, right, bottom, top, near, far.

Exceptions

ArgumentNullException

planeBuffer is null.

ArgumentException

planeBuffer does not contain exactly six elements.

ToFixedBoundFrustum(Camera)

Converts a Unity camera's frustum to a FixedMathSharp bound frustum.

public static FixedBoundFrustum ToFixedBoundFrustum(this Camera camera)

Parameters

camera Camera

The camera that supplies the frustum.

Returns

FixedBoundFrustum

The converted bound frustum.

Exceptions

ArgumentNullException

camera is null.

ToFixedBoundFrustum(Camera, Plane[])

Converts a Unity camera's frustum to a FixedMathSharp bound frustum using the supplied six-plane buffer.

public static FixedBoundFrustum ToFixedBoundFrustum(this Camera camera, Plane[] planeBuffer)

Parameters

camera Camera

The camera that supplies the frustum.

planeBuffer Plane[]

The six-element Unity plane buffer, ordered left, right, bottom, top, near, far.

Returns

FixedBoundFrustum

The converted bound frustum.

Exceptions

ArgumentNullException

camera or planeBuffer is null.

ArgumentException

planeBuffer does not contain exactly six elements.

ToFixedBoundFrustum(Matrix4x4)

Converts a Unity world-to-projection matrix to a FixedMathSharp bound frustum.

public static FixedBoundFrustum ToFixedBoundFrustum(this Matrix4x4 worldToProjectionMatrix)

Parameters

worldToProjectionMatrix Matrix4x4

The Unity world-to-projection matrix.

Returns

FixedBoundFrustum

The converted bound frustum.

ToFixedBoundFrustum(Matrix4x4, Plane[])

Converts a Unity world-to-projection matrix to a FixedMathSharp bound frustum using the supplied six-plane buffer.

public static FixedBoundFrustum ToFixedBoundFrustum(this Matrix4x4 worldToProjectionMatrix, Plane[] planeBuffer)

Parameters

worldToProjectionMatrix Matrix4x4

The Unity world-to-projection matrix.

planeBuffer Plane[]

The six-element Unity plane buffer, ordered left, right, bottom, top, near, far.

Returns

FixedBoundFrustum

The converted bound frustum.

Exceptions

ArgumentNullException

planeBuffer is null.

ArgumentException

planeBuffer does not contain exactly six elements.

ToUnityFrustumPlanes(FixedBoundFrustum)

Converts a FixedMathSharp bound frustum to a newly allocated Unity plane array.

public static Plane[] ToUnityFrustumPlanes(this FixedBoundFrustum frustum)

Parameters

frustum FixedBoundFrustum

The FixedMathSharp frustum to convert.

Returns

Plane[]

A new six-element Unity plane array ordered left, right, bottom, top, near, far.