Language
Edit

BoundsExtensions.Transform(Bounds, Matrix4x4) Method

Definition

Transforms a UnityEngine.Bounds using the specified transform matrix.

public static UnityEngine.Bounds Transform(this UnityEngine.Bounds bounds, UnityEngine.Matrix4x4 transformMatrix);
static member Transform : UnityEngine.Bounds * UnityEngine.Matrix4x4 -> UnityEngine.Bounds
<Extension()>
Public Function Transform (bounds As Bounds, transformMatrix As Matrix4x4) As Bounds

Parameters

bounds
UnityEngine.Bounds

The UnityEngine.Bounds which must be transformed.

transformMatrix
UnityEngine.Matrix4x4

The specified UnityEngine.Bounds will be transformed using this transform matrix. The function assumes that the matrix doesn't contain any projection or skew transformation.

Returns

UnityEngine.Bounds

A transformed UnityEngine.Bounds structure.

Remarks

Transforming a UnityEngine.Bounds means that the function will construct a new UnityEngine.Bounds which has its center translated using the translation information stored in the specified matrix and its size adjusted to account for rotation and scale. The size of the new UnityEngine.Bounds structure will be calculated in such a way that it will contain the old UnityEngine.Bounds.

Applies to