Modifier

Partager via


BoundsExtensions.Transform(Bounds, Matrix4x4) Method

Definition

Transforms 'bounds' using the specified transform matrix.

public:
[System::Runtime::CompilerServices::Extension]
 static UnityEngine::Bounds Transform(UnityEngine::Bounds bounds, UnityEngine::Matrix4x4 transformMatrix);
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 'Bounds' instance which must be transformed.

transformMatrix
UnityEngine.Matrix4x4

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

Returns

UnityEngine.Bounds

The transformed 'Bounds' instance.

Remarks

Transforming a 'Bounds' instance means that the function will construct a new 'Bounds' instance 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 'Bounds' instance will be calculated in such a way that it will contain the old 'Bounds'.

Applies to