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

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

GUI front-end to server base plus web page content

File size: 5.5 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 two dimensional surface that extends infinitely in 3d space.</div>
13
14
15 <h2>Constructor</h2>
16
17
18 <h3>[name]([page:Vector3 normal], [page:Float constant])</h3>
19 <div>
20 normal -- ([Page:Vector3]) normal vector defining the plane pointing towards the origin <br />
21 constant -- ([Page:Float]) the negative distance from the origin to the plane along the normal vector
22 </div>
23
24
25 <h2>Properties</h2>
26
27 <h3>.[page:Vector3 normal]</h3>
28
29 <h3>.[page:Float constant]</h3>
30
31 <h2>Methods</h2>
32
33
34
35 <h3>.normalize() [page:Plane this]</h3>
36 <div>
37 Normalizes the normal vector, and adjusts the constant value accordingly.
38 </div>
39
40 <h3>.set([page:Vector3 normal], [page:Float constant]) [page:Plane this]</h3>
41 <div>
42 normal -- [Page:Vector3] <br />
43 constant -- [Page:Float]
44 </div>
45 <div>
46 Sets the plane's values.
47 </div>
48
49 <h3>.copy([page:Plane plane]) [page:Plane this]</h3>
50 <div>
51 plane -- [page:Plane] to copy
52 </div>
53 <div>
54 Copies the values of the passed plane to this plane.
55 </div>
56
57 <h3>.applyMatrix4([page:Matrix4 matrix], [page:Matrix3 optionalNormalMatrix]) [page:Plane this]</h3>
58 <div>
59 matrix -- [Page:Matrix4] to apply <br />
60 optionalNormalMatrix -- (optional) pre-computed normal [Page:Matrix3] of the Matrix4 to apply
61 </div>
62 <div>
63 Apply a Matrix4 to the plane. The second parameter is optional.
64
65 <code>
66 var optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix )
67 </code>
68 </div>
69
70 <h3>.orthoPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
71 <div>
72 point -- [page:Vector3] <br />
73 optionalTarget -- [page:Vector3]
74 </div>
75 <div>
76 Returns a vector in the same direction as the Plane's normal, but the magnitude is passed point's original distance to the plane.
77 </div>
78
79 <h3>.isIntersectionLine([page:Line3 line]) [page:Boolean]</h3>
80 <div>
81 line -- [page:Line3]
82 </div>
83 <div>
84 Tests whether a line segment intersects with the plane. (Do not mistake this for a collinear check.)
85 </div>
86
87 <h3>.intersectLine([page:Line3 line], [page:Vector3 optionalTarget]) [page:Vector3] or [page:undefined]</h3>
88 <div>
89 line -- [page:Line3] <br />
90 optionalTarget -- [page:Vector3]
91 </div>
92 <div>
93 Returns the intersection point of the passed line and the plane. Returns undefined if the line does not intersect. Returns the line's starting point if the line is coplanar with the plane.
94 </div>
95
96 <h3>.setFromNormalAndCoplanarPoint([page:Vector3 normal], [page:Vector3 point]) [page:Vector3 this]</h3>
97 <div>
98 normal -- [page:Vector3] <br />
99 point -- [page:Vector3]
100 </div>
101 <div>
102 Sets the plane's values as defined by a normal and arbitrary coplanar point.
103 </div>
104
105 <h3>.clone() [page:Plane]</h3>
106 <div>
107 Returns a new copy of this plane.
108 </div>
109
110 <h3>.distanceToPoint([page:Vector3 point]) [page:Float]</h3>
111 <div>
112 point -- [page:Vector3]
113 </div>
114 <div>
115 Returns the smallest distance from the point to the plane.
116 </div>
117
118 <h3>.equals([page:Plane plane]) [page:Boolean]</h3>
119 <div>
120 plane -- [page:Planen]
121 </div>
122 <div>
123 Checks to see if two planes are equal (their normals and constants match)
124 </div>
125
126 <h3>.setComponents([page:Float x], [page:Float y], [page:Float z], [page:Float w]) [page:Plane this]</h3>
127 <div>
128 x -- [page:Float] x of the normal vector <br />
129 y -- [page:Float] y of the normal vector<br />
130 z -- [page:Float] z of the normal vector<br />
131 w -- [page:Float] distance of the plane from the origin along the normal vector
132 </div>
133 <div>
134 Set the individual components that make up the plane.
135 </div>
136
137 <h3>.distanceToSphere([page:Sphere sphere]) [page:Float]</h3>
138 <div>
139 sphere -- [Page:Sphere]
140 </div>
141 <div>
142 Returns the smallest distance from an edge of the sphere to the plane.
143 </div>
144
145 <h3>.setFromCoplanarPoints([page:Vector3 a], [page:Vector3 b], [page:Vector3 c]) [page:Plane this]</h3>
146 <div>
147 a -- [page:Vector3] <br />
148 b -- [page:Vector3] <br />
149 c -- [page:Vector3]
150 </div>
151 <div>
152 Defines the plane based on the 3 provided points. The winding order is counter clockwise, and determines which direction the normal will point.
153 </div>
154
155 <h3>.projectPoint([page:Vector3 point], [page:Vector3 optionalTarget]) [page:Vector3]</h3>
156 <div>
157 point -- [page:Vector3] <br />
158 optionalTarget -- [page:Vector3]
159 </div>
160 <div>
161 Projects a point onto the plane. The projected point is the closest point on the plane to the passed point, so a line drawn from the projected point and the passed point would be orthogonal to the plane.
162 </div>
163
164 <h3>.negate() [page:Plane this]</h3>
165 <div>
166 Negates both the normal vector and constant, effectively mirroring the plane across the origin.
167 </div>
168
169 <h3>.translate([page:Vector3 offset]) [page:Plane this]</h3>
170 <div>
171 offset -- [page:Vector3]
172 </div>
173 <div>
174 Translates the plane the distance defined by the vector. Note that this only affects the constant (distance from origin) and will not affect the normal vector.
175 </div>
176
177 <h3>.coplanarPoint([page:Vector3 optionalTarget]) [page:Vector3]</h3>
178 <div>
179 optionalTarget -- [page:Vector3]
180 </div>
181 <div>
182 Returns a coplanar point. (The projection of the normal vector at the origin onto the plane.)
183 </div>
184
185 <h2>Source</h2>
186
187 [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
188 </body>
189</html>
Note: See TracBrowser for help on using the repository browser.