Repository navigation
Expand file tree
/
Copy pathPlane.html
More file actions
191 lines (158 loc) · 5.68 KB
/
Copy pathPlane.html
File metadata and controls
191 lines (158 loc) · 5.68 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<div class="desc">A two dimensional surface that extends infinitely in 3d space.</div>
<h2>Constructor</h2>
<h3>[name]([page:Vector3 normal], [page:Float constant])</h3>
<div>
normal -- ([Page:Vector3]) normal vector defining the plane pointing towards the origin <br />
constant -- ([Page:Float]) the negative distance from the origin to the plane along the normal vector
</div>
<h2>Properties</h2>
<h3>[property:Vector3 normal]</h3>
<h3>[property:Float constant]</h3>
<h2>Methods</h2>
<h3>[method:Plane normalize]() [page:Plane this]</h3>
<div>
Normalizes the normal vector, and adjusts the constant value accordingly.
</div>
<h3>[method:Plane set]([page:Vector3 normal], [page:Float constant]) [page:Plane this]</h3>
<div>
normal -- [Page:Vector3] <br />
constant -- [Page:Float]
</div>
<div>
Sets the plane's values.
</div>
<h3>[method:Plane copy]([page:Plane plane]) [page:Plane this]</h3>
<div>
plane -- [page:Plane] to copy
</div>
<div>
Copies the values of the passed plane to this plane.
</div>
<h3>[method:Plane applyMatrix4]([page:Matrix4 matrix], [page:Matrix3 optionalNormalMatrix]) [page:Plane this]</h3>
<div>
matrix -- [Page:Matrix4] to apply <br />
optionalNormalMatrix -- (optional) pre-computed normal [Page:Matrix3] of the Matrix4 to apply
</div>
<div>
Apply a Matrix4 to the plane. The matrix must be an affine, homogeneous transform.
The second parameter is optional.
<code>
var optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix )
</code>
</div>
<h3>[method:Vector3 orthoPoint]([page:Vector3 point], [page:Vector3 optionalTarget])</h3>
<div>
point -- [page:Vector3] <br />
optionalTarget -- [page:Vector3]
</div>
<div>
Returns a vector in the same direction as the Plane's normal, but the magnitude is passed point's original distance to the plane.
</div>
<h3>[method:Boolean intersectsLine]([page:Line3 line])</h3>
<div>
line -- [page:Line3]
</div>
<div>
Tests whether a line segment intersects with the plane. (Do not mistake this for a collinear check.)
</div>
<h3>[method:Vector3 intersectLine]([page:Line3 line], [page:Vector3 optionalTarget]) or [page:undefined]</h3>
<div>
line -- [page:Line3] <br />
optionalTarget -- [page:Vector3]
</div>
<div>
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.
</div>
<h3>[method:Vector3 setFromNormalAndCoplanarPoint]([page:Vector3 normal], [page:Vector3 point]) [page:Vector3 this]</h3>
<div>
normal -- [page:Vector3] <br />
point -- [page:Vector3]
</div>
<div>
Sets the plane's values as defined by a normal and arbitrary coplanar point.
</div>
<h3>[method:Plane clone]()</h3>
<div>
Returns a new copy of this plane.
</div>
<h3>[method:Float distanceToPoint]([page:Vector3 point])</h3>
<div>
point -- [page:Vector3]
</div>
<div>
Returns the smallest distance from the point to the plane.
</div>
<h3>[method:Boolean equals]([page:Plane plane])</h3>
<div>
plane -- [page:Planen]
</div>
<div>
Checks to see if two planes are equal (their normals and constants match)
</div>
<h3>[method:Plane setComponents]([page:Float x], [page:Float y], [page:Float z], [page:Float w]) [page:Plane this]</h3>
<div>
x -- [page:Float] x of the normal vector <br />
y -- [page:Float] y of the normal vector<br />
z -- [page:Float] z of the normal vector<br />
w -- [page:Float] distance of the plane from the origin along the normal vector
</div>
<div>
Set the individual components that make up the plane.
</div>
<h3>[method:Float distanceToSphere]([page:Sphere sphere])</h3>
<div>
sphere -- [Page:Sphere]
</div>
<div>
Returns the smallest distance from an edge of the sphere to the plane.
</div>
<h3>[method:Plane setFromCoplanarPoints]([page:Vector3 a], [page:Vector3 b], [page:Vector3 c]) [page:Plane this]</h3>
<div>
a -- [page:Vector3] <br />
b -- [page:Vector3] <br />
c -- [page:Vector3]
</div>
<div>
Defines the plane based on the 3 provided points. The winding order is counter clockwise, and determines which direction the normal will point.
</div>
<h3>[method:Vector3 projectPoint]([page:Vector3 point], [page:Vector3 optionalTarget])</h3>
<div>
point -- [page:Vector3] <br />
optionalTarget -- [page:Vector3]
</div>
<div>
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.
</div>
<h3>[method:Plane negate]() [page:Plane this]</h3>
<div>
Negates both the normal vector and constant, effectively mirroring the plane across the origin.
</div>
<h3>[method:Plane translate]([page:Vector3 offset]) [page:Plane this]</h3>
<div>
offset -- [page:Vector3]
</div>
<div>
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.
</div>
<h3>[method:Vector3 coplanarPoint]([page:Vector3 optionalTarget])</h3>
<div>
optionalTarget -- [page:Vector3]
</div>
<div>
Returns a coplanar point. (The projection of the normal vector at the origin onto the plane.)
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>