forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbeginCamera.xml
More file actions
executable file
·61 lines (44 loc) · 1.89 KB
/
Copy pathbeginCamera.xml
File metadata and controls
executable file
·61 lines (44 loc) · 1.89 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>beginCamera()</name>
<category>Lights, Camera</category>
<subcategory>Camera</subcategory>
<usage>Web & Application</usage>
<example>
<image>beginCamera_.gif</image>
<code><![CDATA[
// The image for this example has not been updated.
size(100, 100, P3D);
noFill();
beginCamera();
camera();
rotateX(-PI/6);
endCamera();
translate(50, 50, 0);
rotateY(PI/3);
box(45);
]]></code>
</example>
<description><![CDATA[The <b>beginCamera()</b> and <b>endCamera()</b> functions enable advanced customization of the camera space. The functions are useful if you want to more control over camera movement, however for most users, the <b>camera()</b> function will be sufficient.<br /><br />The camera functions will replace any transformations (such as <b>rotate()</b> or <b>translate()</b>) that occur before them in <b>draw()</b>, but they will not automatically replace the camera transform itself. For this reason, camera functions should be placed at the beginning of <b>draw()</b> (so that transformations happen afterwards), and the <b>camera()</b> function can be used after <b>beginCamera()</b> if you want to reset the camera before applying transformations.<br /><br />This function sets the matrix mode to the camera matrix so calls such as <b>translate()</b>, <b>rotate()</b>, applyMatrix() and resetMatrix() affect the camera. <b>beginCamera()</b> should always be used with a following <b>endCamera()</b> and pairs of <b>beginCamera()</b> and <b>endCamera()</b> cannot be nested.]]></description>
<syntax><![CDATA[
beginCamera()
]]></syntax>
<parameter>
<label></label>
<description></description>
</parameter>
<returns>None</returns>
<related>
camera()
endCamera()
applyMatrix()
resetMatrix()
translate()
rotate()
scale()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
<level>Extended</level>
</root>