Reference+
Name
applyMatrix()
Description
Multiplies the current matrix by the one specified through the parameters. This is very slow because it will try to calculate the inverse of the transform, so avoid it whenever possible. The equivalent function in OpenGL is glMultMatrix().
Examples
size(400, 400, P3D); noFill(); translate(200, 200, 0); rotateY(PI/6); stroke(153); box(140); // Set rotation angles float ct = cos(PI/9.0); float st = sin(PI/9.0); // Matrix for rotation around the Y axis applyMatrix( ct, 0.0, st, 0.0, 0.0, 1.0, 0.0, 0.0, -st, 0.0, ct, 0.0, 0.0, 0.0, 0.0, 1.0); stroke(255); box(200);
Syntax
applyMatrix(source)
applyMatrix(n00, n01, n02, n10, n11, n12)
applyMatrix(n00, n01, n02, n03, n10, n11, n12, n13, n20, n21, n22, n23, n30, n31, n32, n33)
Parameters
n00
(float)
numbers which define the 4x4 matrix to be multipliedn01
(float)
numbers which define the 4x4 matrix to be multipliedn02
(float)
numbers which define the 4x4 matrix to be multipliedn10
(float)
numbers which define the 4x4 matrix to be multipliedn11
(float)
numbers which define the 4x4 matrix to be multipliedn12
(float)
numbers which define the 4x4 matrix to be multipliedn03
(float)
numbers which define the 4x4 matrix to be multipliedn13
(float)
numbers which define the 4x4 matrix to be multipliedn20
(float)
numbers which define the 4x4 matrix to be multipliedn21
(float)
numbers which define the 4x4 matrix to be multipliedn22
(float)
numbers which define the 4x4 matrix to be multipliedn23
(float)
numbers which define the 4x4 matrix to be multipliedn30
(float)
numbers which define the 4x4 matrix to be multipliedn31
(float)
numbers which define the 4x4 matrix to be multipliedn32
(float)
numbers which define the 4x4 matrix to be multipliedn33
(float)
numbers which define the 4x4 matrix to be multiplied
Return
void
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.