multiplyByScale

fun multiplyByScale(matrix: Matrix4, scale: Cartesian3, result: Matrix4): Matrix4(source)

Multiplies an affine transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0]) by an implicit non-uniform scale matrix. This is an optimization for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);, where m must be an affine matrix. This function performs fewer allocations and arithmetic operations.

// Instead of Matrix4.multiply(m, Matrix4.fromScale(scale), m);
Matrix4.multiplyByScale(m, scale, m);

Return

The modified result parameter.

Parameters

matrix

The affine matrix on the left-hand side.

scale

The non-uniform scale on the right-hand side.

result

The object onto which to store the result.

See also