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, dest, vec); mat4.translate(dest, dest, origin); let quatMat = mat4.create(); mat4.fromQuat(quatMat, quat); mat4.multiply(dest, dest, quatMat); mat4.scale(dest, dest, scale) mat4.translate(dest, dest, negativeOrigin);
mat4 receiving operation result
Rotation quaternion
Translation vector
Scaling vector
The origin vector around which to scale and rotate
out
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):