source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/docs/api/core/Object3D.html@ 28897

Last change on this file since 28897 was 28897, checked in by davidb, 10 years ago

GUI front-end to server base plus web page content

File size: 6.8 KB
Line 
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <script src="../../list.js"></script>
6 <script src="../../page.js"></script>
7 <link type="text/css" rel="stylesheet" href="../../page.css" />
8 </head>
9 <body>
10 <h1>[name]</h1>
11
12 <div class="desc">Base class for scene graph objects.</div>
13
14
15 <h2>Constructor</h2>
16
17
18 <h3>[name]()</h3>
19 <div>
20 The constructor takes no arguments.
21 </div>
22
23
24 <h2>Properties</h2>
25
26 <h3>.[page:Integer id]</h3>
27 <div>
28 Unique number of this object instance.
29 </div>
30
31 <h3>.[page:String name]</h3>
32 <div>
33 Optional name of the object (doesn't need to be unique).
34 </div>
35
36 <h3>.[page:Object3D parent]</h3>
37 <div>
38 Object's parent in the scene graph.
39 </div>
40
41 <h3>.[page:Object3D children]</h3>
42 <div>
43 Array with object's children.
44 </div>
45
46 <h3>.[page:Vector3 position]</h3>
47 <div>
48 Object's local position.
49 </div>
50
51 <h3>.[page:Euler rotation]</h3>
52 <div>
53 Object's local rotation (<a href="https://en.wikipedia.org/wiki/Euler_angles" target="_blank">Euler angles</a>), in radians.
54 </div>
55
56 <h3>.[page:String eulerOrder]</h3>
57 <div>
58 Order of axis for Euler angles.
59 </div>
60
61 <h3>.[page:Vector3 scale]</h3>
62 <div>
63 Object's local scale.
64 </div>
65
66 <h3>.[page:Vector3 up]</h3>
67 <div>
68 Up direction.
69 </div>
70
71 <h3>.[page:Matrix4 matrix]</h3>
72 <div>
73 Local transform.
74 </div>
75
76 <h3>.[page:Quaternion quaternion]</h3>
77 <div>
78 Object's local rotation as [page:Quaternion Quaternion]. Only used when useQuaternion is set to true.
79 </div>
80
81 <h3>.[page:Boolean useQuaternion]</h3>
82 <div>
83 Use quaternion instead of Euler angles for specifying local rotation.
84 </div>
85
86 <h3>.[page:Float renderDepth]</h3>
87 <div>
88 Override depth-sorting order if non *null*.
89 </div>
90
91 <h3>.[page:Boolean visible]</h3>
92 <div>
93 Object gets rendered if *true*.
94 </div>
95
96 <h3>.[page:Boolean castShadow]</h3>
97 <div>
98 Gets rendered into shadow map.
99 </div>
100
101 <h3>.[page:Boolean receiveShadow]</h3>
102 <div>
103 Material gets baked in shadow receiving.
104 </div>
105
106 <h3>.[page:Boolean frustumCulled]</h3>
107 <div>
108 When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible.
109 </div>
110
111 <h3>.[page:Boolean matrixAutoUpdate]</h3>
112 <div>
113 When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.
114 </div>
115
116 <h3>.[page:Boolean matrixWorldNeedsUpdate]</h3>
117 <div>
118 When this is set, it calculates the matrixWorld in that frame and resets this property to false.
119 </div>
120
121 <h3>.[page:Boolean rotationAutoUpdate]</h3>
122 <div>
123 When this is set, then the rotationMatrix gets calculated every frame.
124 </div>
125
126 <h3>.[page:object userData]</h3>
127 <div>
128 An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.
129 </div>
130
131 <h3>.[page:Matrix4 matrixWorld]</h3>
132 <div>
133 The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.
134 </div>
135
136
137 <h2>Methods</h2>
138
139 <h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
140
141 <h3>.applyMatrix( [page:Matrix4 matrix])</h3>
142 <div>
143 matrix - matrix
144 </div>
145 <div>
146 This updates the position, rotation and scale with the matrix.
147 </div>
148
149 <h3>.translateX( [page:Float distance] )</h3>
150 <div>
151 distance - Distance.<br />
152 </div>
153 <div>
154 Translates object along x axis by distance.
155 </div>
156
157 <h3>.translateY( [page:Float distance] )</h3>
158 <div>
159 distance - Distance.<br />
160 </div>
161 <div>
162 Translates object along y axis by distance.
163 </div>
164
165 <h3>.translateZ( [page:Float distance] )</h3>
166 <div>
167 distance - Distance.<br />
168 </div>
169 <div>
170 Translates object along z axis by distance.
171 </div>
172
173 <h3>.localToWorld( [page:Vector3 vector] )</h3>
174 <div>
175 vector - A local vector.<br />
176 </div>
177 <div>
178 Updates the vector from local space to world space.
179 </div>
180
181 <h3>.worldToLocal( [page:Vector3 vector] )</h3>
182 <div>
183 vector - A world vector.<br />
184 </div>
185 <div>
186 Updates the vector from world space to local space.
187 </div>
188
189 <h3>.lookAt( [page:Vector3 vector] )</h3>
190 <div>
191 vector - A world vector to look at.<br />
192 </div>
193 <div>
194 Rotates object to face point in space.
195 </div>
196
197 <h3>.add( [page:Object3D object] )</h3>
198 <div>
199 object - An object.<br />
200 </div>
201 <div>
202 Adds *object* as child of this object.
203 </div>
204
205 <h3>.remove( [page:Object3D object] )</h3>
206 <div>
207 object - An object.<br />
208 </div>
209 <div>
210 Removes *object* as child of this object.
211 </div>
212
213 <h3>.traverse( [page:Function callback] )</h3>
214 <div>
215 callback - An Function with as first argument an object3D object.<br />
216 </div>
217 <div>
218 Executes the callback on this object and all descendants.
219 </div>
220
221 <h3>.getDescendants( [page:Array array] )</h3>
222 <div>
223 array - optional argument that returns the the array with descendants.<br />
224 </div>
225 <div>
226 Searches whole subgraph recursively to add all objects in the array.
227 </div>
228
229 <h3>.updateMatrix()</h3>
230 <div>
231 Updates local transform.
232 </div>
233
234 <h3>.updateMatrixWorld( [page:Boolean force] )</h3>
235 <div>
236 Updates global transform of the object and its children.
237 </div>
238
239 <h3>.clone()</h3>
240 <div>
241 Creates a new clone of this object and all descendants.
242 </div>
243
244
245 <h3>.getObjectByName([page:String name], [page:Boolean recursive]) [page:Object3d Object3d]</h3>
246 <div>
247 name -- String to match to the children's Object3d.name property. <br />
248 recursive -- Boolean whether to search through the children's children. Default is false.
249 </div>
250 <div>
251 Searches through the object's children and returns the first with a matching name, optionally recursive.
252 </div>
253
254 <h3>.getObjectById([page:Integer id], [page:Boolean recursive]) [page:Object3D]</h3>
255 <div>
256 id -- Unique number of the object instance<br />
257 recursive -- Boolean whether to search through the children's children. Default is false.
258 </div>
259 <div>
260 Searches through the object's children and returns the first with a matching id, optionally recursive.
261 </div>
262
263 <h3>.translateOnAxis([page:Vector3 axis], [page:Float distance]) [page:Object3D]</h3>
264 <div>
265 axis -- A normalized vector in object space.<br />
266 distance -- The distance to translate.
267 </div>
268 <div>
269 Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
270 </div>
271
272 <h3>.rotateOnAxis([page:Vector3 axis], [page:Float angle]) [page:Object3D]</h3>
273 <div>
274 axis -- A normalized vector in object space. <br />
275 angle -- The angle in radians.
276 </div>
277 <div>
278 Rotate an object along an axis in object space. The axis is assumed to be normalized.
279 </div>
280
281 <h2>Source</h2>
282
283 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
284 </body>
285</html>
Note: See TracBrowser for help on using the repository browser.