forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplyMatrix.xml
More file actions
executable file
·63 lines (47 loc) · 1.43 KB
/
Copy pathapplyMatrix.xml
File metadata and controls
executable file
·63 lines (47 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>applyMatrix()</name>
<category>Transform</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image>applyMatrix_.gif</image>
<code><![CDATA[
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);
]]></code>
</example>
<description><![CDATA[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().]]></description>
<syntax><![CDATA[
applyMatrix(n00, n01, n02, n03<br /> n04, n05, n06, n07<br /> n08, n09, n10, n11<br /> n12, n13, n14, n15)
]]></syntax>
<parameter>
<label>n00-n15</label>
<description><![CDATA[float: numbers which define the 4x4 matrix to be multiplied]]></description>
</parameter>
<returns>None</returns>
<related>
pushMatrix()
popMatrix()
resetMatrix()
printMatrix()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
<level>Extended</level>
</root>