Class FixedFrustumUnityExtensions
- Namespace
- FixedMathSharp.Geometry
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
frustumFixedBoundFrustumThe FixedMathSharp frustum to convert.
planeBufferPlane[]The six-element destination buffer, ordered left, right, bottom, top, near, far.
Exceptions
- ArgumentNullException
planeBufferis null.- ArgumentException
planeBufferdoes 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
cameraCameraThe camera that supplies the frustum.
Returns
- FixedBoundFrustum
The converted bound frustum.
Exceptions
- ArgumentNullException
camerais 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
cameraCameraThe camera that supplies the frustum.
planeBufferPlane[]The six-element Unity plane buffer, ordered left, right, bottom, top, near, far.
Returns
- FixedBoundFrustum
The converted bound frustum.
Exceptions
- ArgumentNullException
cameraorplaneBufferis null.- ArgumentException
planeBufferdoes 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
worldToProjectionMatrixMatrix4x4The 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
worldToProjectionMatrixMatrix4x4The Unity world-to-projection matrix.
planeBufferPlane[]The six-element Unity plane buffer, ordered left, right, bottom, top, near, far.
Returns
- FixedBoundFrustum
The converted bound frustum.
Exceptions
- ArgumentNullException
planeBufferis null.- ArgumentException
planeBufferdoes 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
frustumFixedBoundFrustumThe FixedMathSharp frustum to convert.
Returns
- Plane[]
A new six-element Unity plane array ordered left, right, bottom, top, near, far.