source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/docs/api/math/Box3.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.2 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">Represents a boundary box in 3d space.</div>
13
14
15 <h2>Constructor</h2>
16
17
18 <h3>[name]([page:Vector3 min], [page:Vector3 max])</h3>
19 <div>
20 min -- Lower (x, y, z) boundary of the box. <br />
21 max -- Upper (x, y, z) boundary of the box.
22 </div>
23 <div>
24 Creates a box bounded by min and max
25 </div>
26
27 <h2>Properties</h2>
28
29
30
31 <h3>.[page:Vector3 max]</h3>
32 <div>
33 Upper (x, y, z) boundary of this box.
34 </div>
35
36 <h3>.[page:Vector3 min]</h3>
37 <div>
38 Lower (x, y, z) boundary of this box.
39 </div>
40
41 <h2>Methods</h2>
42
43
44
45 <h3>.set([page:Vector3 min], [page:Vector3 max]) [page:Box3 this]</h3>
46 <div>
47 min -- Upper (x, y, z) boundary of this box. <br />
48 max -- Lower (x, y, z) boundary of this box.
49 </div>
50 <div>
51 Sets the lower and upper (x, y, z) boundaries of this box.
52 </div>
53
54 <h3>.applyMatrix4([page:Matrix4 matrix]) [page:Box3 this]</h3>
55 <div>
56 matrix -- [page:Matrix4].
57 </div>
58 <div>
59 Transform the box with a Matrix4.
60 </div>
61
62 <h3>.expandByPoint([page:Vector3 point]) [page:Box3 this]</h3>
63 <div>
64 Expands the box outwards by the point. It takes the min and max values of the box.
65 </div>
66
67 <h3>.clampPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
68 <div>
69 point -- [page:Vector3] <br />
70 optionalTarget -- [page:Vector3] An optional target point.
71 </div>
72 <div>
73 Clamp a point within the min and max boundaries of the box. Returns either a new point or the modified passed target.
74 </div>
75
76 <h3>.isIntersectionBox([page:Box3 box]) [page:Boolean]</h3>
77 <div>
78 box -- [page:Box3]
79 </div>
80 <div>
81 Return whether or not the passed box intersects with this Box3.
82 </div>
83
84 <h3>.setFromPoints([page:Array points])</h3>
85 <div>
86 points -- [page:Array] of [page:Vector3] points
87 </div>
88 <div>
89 Sets this box to the min value and max value of all the points in the array. If the array is empty, then it sets the box as empty.
90 </div>
91
92 <h3>.size([page:Vector3 optionalTarget]) [page:Vector3]</h3>
93 <div>
94 optionalTarget -- [page:Vector3] (optional)
95 </div>
96 <div>
97 Returns either a new Vector3 or the target Vector3 that represents the size of the box from the min point to max point.
98 </div>
99
100 <h3>.union([page:Box3 box]) [page:Box3 this]</h3>
101 <div>
102 box -- [page:Box3]
103 </div>
104 <div>
105 Sets the box's min and max boundaries to union of the two boxes.
106 </div>
107
108 <h3>.getParameter([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
109 <div>
110 point -- [page:Vector3]<br/>
111 optionalTarget -- [page:Vector3]
112 </div>
113 <div>
114 Returns a point as a proportion of this box's width, height, and depth. If the point is contained by the box the x, y, and z of the returned vector will be between 0 and 1.
115 </div>
116
117 <h3>.expandByScalar([page:Float scalar]) [page:Box3 this]</h3>
118 <div>
119 scalar -- [page:Float] representing the distance to expand
120 </div>
121 <div>
122 Expands or contracts the box by adding the scalar value to the box's min and max vectors.
123 </div>
124
125 <h3>.intersect([page:Box3 box]) [page:Box3 this]</h3>
126 <div>
127 box -- [page:Box3]
128 </div>
129 <div>
130 Returns the intersection of the two boxes, setting the upper bound of this box to the lesser of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes' lower bounds.
131
132 </div>
133
134 <h3>.containsBox([page:Box3 box]) [page:Boolean]</h3>
135 <div>
136 box -- [page:Box3]
137 </div>
138 <div>
139 Returns true if this box includes the entirety of box. If this and box overlap exactly, this function also returns true.
140
141 </div>
142
143 <h3>.translate([page:Vector3 offset]) [page:Box3 this]</h3>
144 <div>
145 offset -- [page:Vector3]
146 </div>
147 <div>
148 Translates the box the distance of the offset.
149 </div>
150
151 <h3>.empty() [page:Boolean]</h3>
152 <div>
153 Checks to see if the box is empty. If the lower and upper bounds of the box are equal, this function still returns false as the box would still contain one point.
154 </div>
155
156 <h3>.clone() [page:Box3]</h3>
157 <div>
158 Returns a copy of this box.
159 </div>
160
161 <h3>.equals([page:Box3 box]) [page:Boolean]</h3>
162 <div>
163 box -- [page:Box3]
164 </div>
165 <div>
166 Returns true if the boes share the same lower and upper bounds.
167 </div>
168
169 <h3>.expandByVector([page:Vector3 vector]) [page:Box3 this]</h3>
170 <div>
171 vector -- [page:Vector3] representing the amount to expand this box in each dimension.
172 </div>
173 <div>
174 Adds the passed vector to the upper boundary, and subtracts it from the lower boundary.
175 </div>
176
177 <h3>.copy([page:Box3 box]) [page:Box3 this]</h3>
178 <div>
179 box -- [page:Box3] to copy.
180 </div>
181 <div>
182 Copies the values of the passed box to this box.
183 </div>
184
185 <h3>.makeEmpty() [page:Box3 this]</h3>
186 <div>
187 Makes this box empty so that it cannot contain any points.
188 </div>
189
190 <h3>.center([page:Vector3 optionalTarget]) [page:Vector3]</h3>
191 <div>
192 optionalTarget -- [page:Vector3] If specified, the result will be copied here.
193 </div>
194 <div>
195 Returns the center point of this box.
196 </div>
197
198 <h3>.getBoundingSphere([page:Sphere optionalTarget]) [page:Sphere]</h3>
199 <div>
200 optionalTarget -- [page:Sphere]
201 </div>
202 <div>
203 Returns a bounding sphere.
204 </div>
205
206 <h3>.distanceToPoint([page:Vector3 point]) [page:Float]</h3>
207 <div>
208 point -- [page:Vector3]
209 </div>
210 <div>
211 Returns the distance from any edge of this box to the specified point. If the point lies inside of this box, the distance will be 0.
212 </div>
213
214 <h3>.containsPoint([page:Vector3 point]) [page:Boolean]</h3>
215 <div>
216 point -- [page:Vector3]
217 </div>
218 <div>
219 Returns true if the specified point lies within the boundaries of this box.
220 </div>
221
222 <h3>.setFromCenterAndSize([page:Vector3 center], [page:Vector3 size]) [page:Box3 this]</h3>
223 <div>
224 center -- [page:Vector3] representing the center position.<br />
225 size -- [page:Vector3] representing the dimensions of the box.
226 </div>
227 <div>
228 Sets this box based on a center vector, and width, height, and depth vector.
229 </div>
230
231 <h2>Source</h2>
232
233 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
234 </body>
235</html>
Note: See TracBrowser for help on using the repository browser.