This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

Name | ## applyMatrix() |
||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Examples | size(100, 100, P3D); noFill(); translate(50, 50, 0); rotateY(PI/6); stroke(153); box(35); // 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(50); | ||||||||||||||||||||||||||||||||

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(). | ||||||||||||||||||||||||||||||||

Syntax | applyMatrix( | ||||||||||||||||||||||||||||||||

Parameters |
| ||||||||||||||||||||||||||||||||

Returns | void | ||||||||||||||||||||||||||||||||

Related | pushMatrix() popMatrix() resetMatrix() printMatrix() |

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.