Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin This is equivalent to (but much faster than):
mat4.identity(dest);mat4.translate(dest, vec);mat4.translate(dest, origin);let quatMat = mat4.create();quat4.toMat4(quat, quatMat);mat4.multiply(dest, quatMat);mat4.scale(dest, scale)mat4.translate(dest, negativeOrigin); Copy
mat4.identity(dest);mat4.translate(dest, vec);mat4.translate(dest, origin);let quatMat = mat4.create();quat4.toMat4(quat, quatMat);mat4.multiply(dest, quatMat);mat4.scale(dest, scale)mat4.translate(dest, negativeOrigin);
mat4 receiving operation result
Rotation quaternion
Translation vector
Scaling vector
The origin vector around which to scale and rotate
out
Generated using TypeDoc
Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin This is equivalent to (but much faster than):