static Matrix CreateScale( Vector3 scales )
static Matrix CreateScale( Vector3 scales, Vector3 centerPoint )

book_4_sparkGenerated
code_blocksInput

Description

The Matrix.CreateScale method is a static method that generates a scaling matrix based on the provided scale factors for the x, y, and z axes. This method is useful for transforming objects in 3D space by scaling them according to the specified vector.

Usage

To use the CreateScale method, call it with a Vector3 parameter that specifies the scale factors for each axis. The method returns a Matrix that can be used to scale objects in 3D space.

Example

// Example of using Matrix.CreateScale
Vector3 scaleFactors = new Vector3(2.0f, 3.0f, 4.0f);
Matrix scaleMatrix = Matrix.CreateScale(scaleFactors);

// Use the scaleMatrix to transform objects
// For example, apply it to a model's transformation matrix