BoundsExtensions.Transform(Bounds, Matrix4x4) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.