forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera.xml
More file actions
executable file
·95 lines (72 loc) · 2.57 KB
/
Copy pathcamera.xml
File metadata and controls
executable file
·95 lines (72 loc) · 2.57 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>camera()</name>
<category>Lights, Camera</category>
<subcategory>Camera</subcategory>
<usage>Web & Application</usage>
<example>
<image>lookat_.gif</image>
<code><![CDATA[
size(100, 100, P3D);
noFill();
background(204);
camera(70.0, 35.0, 120.0, 50.0, 50.0, 0.0,
0.0, 1.0, 0.0);
translate(50, 50, 0);
rotateX(-PI/6);
rotateY(PI/3);
box(45);
]]></code>
</example>
<description><![CDATA[Sets the position of the camera through setting the eye position, the center of the scene, and which axis is facing upward. Moving the eye position and the direction it is pointing (the center of the scene) allows the images to be seen from different angles. The version without any parameters sets the camera to the default position, pointing to the center of the display window with the Y axis as up. The default values are camera(width/2.0, height/2.0, (height/2.0) / tan(PI*60.0 / 360.0), width/2.0, height/2.0, 0, 0, 1, 0). This function is similar to gluLookAt() in OpenGL, but it first clears the current camera settings.]]></description>
<syntax><![CDATA[
camera()
camera(<kbd>eyeX</kbd>, <kbd>eyeY</kbd>, <kbd>eyeZ</kbd>, <kbd>centerX</kbd>, <kbd>centerY</kbd>, <kbd>centerZ</kbd>, <kbd>upX</kbd>, <kbd>upY</kbd>, <kbd>upZ</kbd>)
]]></syntax>
<parameter>
<label>eyeX</label>
<description><![CDATA[float: x coordinate for the eye]]></description>
</parameter>
<parameter>
<label>eyeY</label>
<description><![CDATA[float: y coordinate for the eye]]></description>
</parameter>
<parameter>
<label>eyeZ</label>
<description><![CDATA[float: z coordinate for the eye]]></description>
</parameter>
<parameter>
<label>centerX</label>
<description><![CDATA[float: x coordinate for the center of the scene]]></description>
</parameter>
<parameter>
<label>centerY</label>
<description><![CDATA[float: y coordinate for the center of the scene]]></description>
</parameter>
<parameter>
<label>centerZ</label>
<description><![CDATA[float: z coordinate for the center of the scene]]></description>
</parameter>
<parameter>
<label>upX</label>
<description><![CDATA[float: usually 0.0, 1.0, or -1.0]]></description>
</parameter>
<parameter>
<label>upY</label>
<description><![CDATA[float: usually 0.0, 1.0, or -1.0]]></description>
</parameter>
<parameter>
<label>upZ</label>
<description><![CDATA[float: usually 0.0, 1.0, or -1.0]]></description>
</parameter>
<returns>None</returns>
<related>
camera()
endCamera()
frustum()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
<level>Extended</level>
</root>