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 '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
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'.