source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/docs/api/math/Sphere.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: 3.6 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">A geometric sphere defined by a center position and radius.</div>
13
14
15 <h2>Constructor</h2>
16
17
18 <h3>[name]([page:Vector3 center], [page:Float radius])</h3>
19 <div>
20 center -- [page:Vector3] <br />
21 radius -- [page:Float]
22 </div>
23
24
25 <h2>Properties</h2>
26
27
28 <h3>.[page:Vector3 center]</h3>
29
30 <h3>.[page:Float radius]</h3>
31
32
33 <h2>Methods</h2>
34
35
36
37 <h3>.set([page:Vector3 center], [page:Float radius]) [page:this:Sphere]</h3>
38 <div>
39 center -- [page:Vector3] <br />
40 radius -- [page:Float]
41 </div>
42 <div>
43 Sets the center and radius.
44 </div>
45
46 <h3>.applyMatrix4([page:Matrix4 matrix]) [page:Sphere this]</h3>
47 <div>
48 matrix -- [page:Matrix4]
49 </div>
50 <div>
51 Transforms this sphere with the provided [page:Matrix4].
52 </div>
53
54 <h3>.clampPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
55 <div>
56 point -- [page:Vector3] The point to clamp <br />
57 optionalTarget -- [page:Vector3] The optional target point to return
58 </div>
59 <div>
60 Clamps a point within the sphere. If the point is is outside the sphere, it will clamp it to the closets point on the edge of the sphere.
61 </div>
62
63 <h3>.translate([page:Vector3 offset]) [page:Sphere this]</h3>
64 <div>
65 offset -- [page:Vector3]
66 </div>
67 <div>
68 Translate the sphere's center by the provided offset vector.
69 </div>
70
71 <h3>.clone() [page:Sphere]</h3>
72 <div>
73 Provides a new copy of the sphere.
74 </div>
75
76 <h3>.equals([page:Sphere sphere]) [page:Boolean]</h3>
77 <div>
78 sphere -- [page:Sphere]
79 </div>
80 <div>
81 Checks to see if the two spheres' centers and radii are equal.
82 </div>
83
84 <h3>.setFromPoints([page:Array points], [page:Vector3 optionalCenter]) [page:Sphere this]</h3>
85 <div>
86 points -- [page:Array] of [page:Vector3] positions.<br />
87 optionalCenter -- Optional [page:Vector3] position for the sphere's center.<br />
88 </div>
89 <div>
90 Computes the minimum bounding sphere for *points*. If *optionalCenter* is given, it is used as the sphere's center. Otherwise, the center of the axis-aligned bounding box encompassing *points* is calculated.
91 </div>
92
93 <h3>.distanceToPoint([page:Vector3 point]) [page:Float]</h3>
94 <div>
95 point -- [page:Vector3]
96 </div>
97 <div>
98 Returns the closest distance from the boundary of the sphere to the point. If the sphere contains the point, the distance will be negative.
99 </div>
100
101 <h3>.getBoundingBox([page:Box optionalTarget]) [page:Box]</h3>
102 <div>
103 optionalTarget -- [page:Box]
104 </div>
105 <div>
106 Returns a bounding box for the sphere, optionally setting a provided box target.
107 </div>
108
109 <h3>.containsPoint([page:Vector3 point]) [page:Boolean]</h3>
110 <div>
111 point -- [page:Vector3]
112 </div>
113 <div>
114 Checks to see if the sphere contains the provided point inclusive of the edge of the sphere.
115 </div>
116
117 <h3>.copy([page:Sphere sphere]) [page:Sphere]</h3>
118 <div>
119 sphere -- [page:Sphere] to copy
120 </div>
121 <div>
122 Copies the values of the passed sphere to this sphere.
123 </div>
124
125 <h3>.intersectsSphere([page:Sphere sphere]) [page:Boolean]</h3>
126 <div>
127 sphere -- [page:Sphere]
128 </div>
129 <div>
130 Checks to see if two spheres intersect.
131 </div>
132
133 <h3>.empty() [page:Boolean]</h3>
134 <div>
135 Checks to see if the sphere is empty (the radius set to 0).
136 </div>
137
138 <h2>Source</h2>
139
140 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
141 </body>
142</html>
Note: See TracBrowser for help on using the repository browser.