forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLine3.html
More file actions
137 lines (109 loc) · 3.55 KB
/
Line3.html
File metadata and controls
137 lines (109 loc) · 3.55 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
<!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 geometric line segment represented by a start and end point.</div>
<h2>Constructor</h2>
<h3>[name]( [page:Vector3 start], [page:Vector3 end] )</h3>
<div>
start -- [page:Vector3] Start of the line segment<br />
end -- [page:Vector3] End of the line segment
</div>
<div>
The start and end vectors default to origin vectors if none are set.
</div>
<h2>Properties</h2>
<h3>[property:Vector3 start]</h3>
<h3>[property:Vector3 end]</h3>
<h2>Methods</h2>
<h3>[method:Line3 set]( [page:Vector3 start], [page:Vector3 end] )</h3>
<div>
start -- [page:Vector3] <br />
end -- [page:Vector3]
</div>
<div>
Sets the start and end values by copying the provided vectors.
</div>
<h3>[method:Line3 copy]( [page:Line3 line] )</h3>
<div>
line -- [page:Line3]
</div>
<div>
Copies the passed line's start and end vectors to this line.
</div>
<h3>[method:Line3 clone]()</h3>
<div>
Return a new copy of this [page:Line3].
</div>
<h3>[method:Boolean equals]( [page:Line3 line] )</h3>
<div>
line -- [page:Line3]
</div>
<div>
Returns true if both line's start and end points are equal.
</div>
<h3>[method:Float distance]()</h3>
<div>
Returns the length of the line segment.
</div>
<h3>[method:Float distanceSq]()</h3>
<div>
Returns the line segment's length squared.
</div>
<h3>[method:Line3 applyMatrix4]( [page:Matrix4 matrix] ) [page:Line3 this]</h3>
<div>
matrix -- [page:Matrix4]
</div>
<div>
Apply a matrix transform to the line segment.
</div>
<h3>[method:Vector3 at]( [page:Float t], [page:Vector3 optionalTarget] )</h3>
<div>
t -- [page:Float] Use values 0-1 to return a result on the line segment. <br />
optionalTarget -- [page:Vector] Optional target to set the result.
</div>
<div>
Return a vector at a certain position along the line. When t = 0, it returns the start vector, and when t=1 it returns the end vector.
</div>
<h3>[method:Vector3 center]( [page:Vector3 optionalTarget] )</h3>
<div>
optionalTarget -- [page:Vector3] Optional target to set the result.
</div>
<div>
Return the center of the line segment.
</div>
<h3>[method:Vector3 delta]( [page:Vector3 optionalTarget] )</h3>
<div>
optionalTarget -- [page:Vector3] Optional target to set the result.
</div>
<div>
Returns the delta vector of the line segment, or the end vector minus the start vector.
</div>
<h3>[method:Vector3 closestPointToPoint]( [page:Vector3 point], [page:Boolean clampToLine], [page:Vector3 optionalTarget] )</h3>
<div>
point -- [page:Vector3] <br />
clampToLine -- [page:Boolean] <br />
optionalTarget -- [page:Vector3] Optional target to set the result.
</div>
<div>
Returns the closets point on the line. If clamp to line is true, then the returned value will be clamped to the line segment.
</div>
<h3>[method:Float closestPointToPointParameter]( [page:Vector3 point], [page:Boolean clampToLine] )</h3>
<div>
point -- [page:Vector3] <br />
clampToLine -- [page:Boolean]
</div>
<div>
Returns a point parameter based on the closest point as projected on the line segement. If clamp to line is true, then the returned value will be between 0 and 1.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>