C# Class UnityEngine.GeometryUtility

Utility class for common geometric functions.

Mostra file Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
CalculateBounds ( Vector3 positions, Matrix4x4 transform ) : Bounds

Calculates a bounding box given an array of positions and a transformation matrix.

CalculateFrustumPlanes ( Camera camera ) : UnityEngine.Plane[]

Calculates frustum planes.

CalculateFrustumPlanes ( Matrix4x4 worldToProjectionMatrix ) : UnityEngine.Plane[]

Calculates frustum planes.

TestPlanesAABB ( Plane planes, Bounds bounds ) : bool

Returns true if bounds are inside the plane array.

Private Methods

Method Description
INTERNAL_CALL_CalculateBounds ( Vector3 positions, Matrix4x4 &transform, Bounds &value ) : void
INTERNAL_CALL_Internal_ExtractPlanes ( Plane planes, Matrix4x4 &worldToProjectionMatrix ) : void
INTERNAL_CALL_TestPlanesAABB ( Plane planes, Bounds &bounds ) : bool
Internal_ExtractPlanes ( Plane planes, Matrix4x4 worldToProjectionMatrix ) : void

Method Details

CalculateBounds() public static method

Calculates a bounding box given an array of positions and a transformation matrix.

public static CalculateBounds ( Vector3 positions, Matrix4x4 transform ) : Bounds
positions Vector3
transform Matrix4x4
return Bounds

CalculateFrustumPlanes() public static method

Calculates frustum planes.

public static CalculateFrustumPlanes ( Camera camera ) : UnityEngine.Plane[]
camera Camera
return UnityEngine.Plane[]

CalculateFrustumPlanes() public static method

Calculates frustum planes.

public static CalculateFrustumPlanes ( Matrix4x4 worldToProjectionMatrix ) : UnityEngine.Plane[]
worldToProjectionMatrix Matrix4x4
return UnityEngine.Plane[]

TestPlanesAABB() public static method

Returns true if bounds are inside the plane array.

public static TestPlanesAABB ( Plane planes, Bounds bounds ) : bool
planes Plane
bounds Bounds
return bool