1 | <!DOCTYPE html>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>CurveLocation</title>
|
---|
6 | <base target="class-frame">
|
---|
7 | <link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
---|
8 | <script src="../assets/js/paper.js"></script>
|
---|
9 | <script src="../assets/js/jquery.js"></script>
|
---|
10 | <script src="../assets/js/codemirror.js"></script>
|
---|
11 | <script src="../assets/js/docs.js"></script>
|
---|
12 | </head>
|
---|
13 | <body class="reference">
|
---|
14 | <div class="reference-class">
|
---|
15 | <h1>CurveLocation</h1>
|
---|
16 |
|
---|
17 | <p>CurveLocation objects describe a location on <a href="../classes/Curve.html"><tt>Curve</tt></a>
|
---|
18 | objects, as defined by the curve <a href="../classes/CurveLocation.html#parameter" onclick="return toggleMember('parameter', true);"><tt>parameter</tt></a>, a value between
|
---|
19 | <tt>0</tt> (beginning of the curve) and <tt>1</tt> (end of the curve). If
|
---|
20 | the curve is part of a <a href="../classes/Path.html"><tt>Path</tt></a> item, its <a href="../classes/CurveLocation.html#index" onclick="return toggleMember('index', true);"><tt>index</tt></a> inside the
|
---|
21 | <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array is also provided.</p>
|
---|
22 | <p>The class is in use in many places, such as
|
---|
23 | {@link Path#getLocationAt(offset, isParameter)},
|
---|
24 | <a href="../classes/Path.html#getlocationof-point"><tt>path.getLocationOf(point)</tt></a>,
|
---|
25 | {@link Path#getNearestLocation(point),
|
---|
26 | <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a>,
|
---|
27 | etc.</p>
|
---|
28 |
|
---|
29 | </div>
|
---|
30 |
|
---|
31 | <!-- ============================== constructors ========================= -->
|
---|
32 | <div class="reference-members"><h2>Constructors</h2>
|
---|
33 |
|
---|
34 |
|
---|
35 | <div id="curvelocation-curve-parameter-point-_curve2-_parameter2-_point2-_distance" class="member">
|
---|
36 | <div class="member-link">
|
---|
37 | <a name="curvelocation-curve-parameter-point-_curve2-_parameter2-_point2-_distance" href="#curvelocation-curve-parameter-point-_curve2-_parameter2-_point2-_distance"><tt><b>CurveLocation</b>(curve, parameter, point)</tt></a>
|
---|
38 | </div>
|
---|
39 | <div class="member-description hidden">
|
---|
40 | <div class="member-text">
|
---|
41 | <p>Creates a new CurveLocation object.</p>
|
---|
42 |
|
---|
43 | <ul><b>Parameters:</b>
|
---|
44 |
|
---|
45 | <li>
|
---|
46 | <tt>curve:</tt>
|
---|
47 | <a href="../classes/Curve.html"><tt>Curve</tt></a>
|
---|
48 |
|
---|
49 |
|
---|
50 | </li>
|
---|
51 |
|
---|
52 | <li>
|
---|
53 | <tt>parameter:</tt>
|
---|
54 | <tt>Number</tt>
|
---|
55 |
|
---|
56 |
|
---|
57 | </li>
|
---|
58 |
|
---|
59 | <li>
|
---|
60 | <tt>point:</tt>
|
---|
61 | <a href="../classes/Point.html"><tt>Point</tt></a>
|
---|
62 |
|
---|
63 |
|
---|
64 | </li>
|
---|
65 |
|
---|
66 | </ul>
|
---|
67 |
|
---|
68 |
|
---|
69 |
|
---|
70 |
|
---|
71 | </div>
|
---|
72 | </div>
|
---|
73 | </div>
|
---|
74 |
|
---|
75 | </div>
|
---|
76 |
|
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 |
|
---|
81 | <div class="reference-members"><h2>Properties</h2>
|
---|
82 |
|
---|
83 |
|
---|
84 | <div id="segment" class="member">
|
---|
85 | <div class="member-link">
|
---|
86 | <a name="segment" href="#segment"><tt><b>segment</b></tt></a>
|
---|
87 | </div>
|
---|
88 | <div class="member-description hidden">
|
---|
89 |
|
---|
90 | <div class="member-text">
|
---|
91 | <p>The segment of the curve which is closer to the described location.</p>
|
---|
92 |
|
---|
93 | <p>Read only.</p>
|
---|
94 |
|
---|
95 |
|
---|
96 | <ul><b>Type:</b>
|
---|
97 | <li>
|
---|
98 | <a href="../classes/Segment.html"><tt>Segment</tt></a>
|
---|
99 | </li>
|
---|
100 | </ul>
|
---|
101 |
|
---|
102 |
|
---|
103 | </div>
|
---|
104 |
|
---|
105 | </div>
|
---|
106 | </div>
|
---|
107 |
|
---|
108 |
|
---|
109 | <div id="curve" class="member">
|
---|
110 | <div class="member-link">
|
---|
111 | <a name="curve" href="#curve"><tt><b>curve</b></tt></a>
|
---|
112 | </div>
|
---|
113 | <div class="member-description hidden">
|
---|
114 |
|
---|
115 | <div class="member-text">
|
---|
116 | <p>The curve by which the location is defined.</p>
|
---|
117 |
|
---|
118 | <p>Read only.</p>
|
---|
119 |
|
---|
120 |
|
---|
121 | <ul><b>Type:</b>
|
---|
122 | <li>
|
---|
123 | <a href="../classes/Curve.html"><tt>Curve</tt></a>
|
---|
124 | </li>
|
---|
125 | </ul>
|
---|
126 |
|
---|
127 |
|
---|
128 | </div>
|
---|
129 |
|
---|
130 | </div>
|
---|
131 | </div>
|
---|
132 |
|
---|
133 |
|
---|
134 | <div id="intersection" class="member">
|
---|
135 | <div class="member-link">
|
---|
136 | <a name="intersection" href="#intersection"><tt><b>intersection</b></tt></a>
|
---|
137 | </div>
|
---|
138 | <div class="member-description hidden">
|
---|
139 |
|
---|
140 | <div class="member-text">
|
---|
141 | <p>The curve location on the intersecting curve, if this location is the
|
---|
142 | result of a call to <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a> /
|
---|
143 | <tt>Curve#getIntersections(curve)</tt>.</p>
|
---|
144 |
|
---|
145 | <p>Read only.</p>
|
---|
146 |
|
---|
147 |
|
---|
148 | <ul><b>Type:</b>
|
---|
149 | <li>
|
---|
150 | <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
|
---|
151 | </li>
|
---|
152 | </ul>
|
---|
153 |
|
---|
154 |
|
---|
155 | </div>
|
---|
156 |
|
---|
157 | </div>
|
---|
158 | </div>
|
---|
159 |
|
---|
160 |
|
---|
161 | <div id="path" class="member">
|
---|
162 | <div class="member-link">
|
---|
163 | <a name="path" href="#path"><tt><b>path</b></tt></a>
|
---|
164 | </div>
|
---|
165 | <div class="member-description hidden">
|
---|
166 |
|
---|
167 | <div class="member-text">
|
---|
168 | <p>The path this curve belongs to, if any.</p>
|
---|
169 |
|
---|
170 | <p>Read only.</p>
|
---|
171 |
|
---|
172 |
|
---|
173 | <ul><b>Type:</b>
|
---|
174 | <li>
|
---|
175 | <a href="../classes/Item.html"><tt>Item</tt></a>
|
---|
176 | </li>
|
---|
177 | </ul>
|
---|
178 |
|
---|
179 |
|
---|
180 | </div>
|
---|
181 |
|
---|
182 | </div>
|
---|
183 | </div>
|
---|
184 |
|
---|
185 |
|
---|
186 | <div id="index" class="member">
|
---|
187 | <div class="member-link">
|
---|
188 | <a name="index" href="#index"><tt><b>index</b></tt></a>
|
---|
189 | </div>
|
---|
190 | <div class="member-description hidden">
|
---|
191 |
|
---|
192 | <div class="member-text">
|
---|
193 | <p>The index of the curve within the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> list, if the
|
---|
194 | curve is part of a <a href="../classes/Path.html"><tt>Path</tt></a> item.</p>
|
---|
195 |
|
---|
196 | <p>Read only.</p>
|
---|
197 |
|
---|
198 |
|
---|
199 | <ul><b>Type:</b>
|
---|
200 | <li>
|
---|
201 | <tt>Index</tt>
|
---|
202 | </li>
|
---|
203 | </ul>
|
---|
204 |
|
---|
205 |
|
---|
206 | </div>
|
---|
207 |
|
---|
208 | </div>
|
---|
209 | </div>
|
---|
210 |
|
---|
211 |
|
---|
212 | <div id="offset" class="member">
|
---|
213 | <div class="member-link">
|
---|
214 | <a name="offset" href="#offset"><tt><b>offset</b></tt></a>
|
---|
215 | </div>
|
---|
216 | <div class="member-description hidden">
|
---|
217 |
|
---|
218 | <div class="member-text">
|
---|
219 | <p>The length of the path from its beginning up to the location described
|
---|
220 | by this object.</p>
|
---|
221 |
|
---|
222 | <p>Read only.</p>
|
---|
223 |
|
---|
224 |
|
---|
225 | <ul><b>Type:</b>
|
---|
226 | <li>
|
---|
227 | <tt>Number</tt>
|
---|
228 | </li>
|
---|
229 | </ul>
|
---|
230 |
|
---|
231 |
|
---|
232 | </div>
|
---|
233 |
|
---|
234 | </div>
|
---|
235 | </div>
|
---|
236 |
|
---|
237 |
|
---|
238 | <div id="curveoffset" class="member">
|
---|
239 | <div class="member-link">
|
---|
240 | <a name="curveoffset" href="#curveoffset"><tt><b>curveOffset</b></tt></a>
|
---|
241 | </div>
|
---|
242 | <div class="member-description hidden">
|
---|
243 |
|
---|
244 | <div class="member-text">
|
---|
245 | <p>The length of the curve from its beginning up to the location described
|
---|
246 | by this object.</p>
|
---|
247 |
|
---|
248 | <p>Read only.</p>
|
---|
249 |
|
---|
250 |
|
---|
251 | <ul><b>Type:</b>
|
---|
252 | <li>
|
---|
253 | <tt>Number</tt>
|
---|
254 | </li>
|
---|
255 | </ul>
|
---|
256 |
|
---|
257 |
|
---|
258 | </div>
|
---|
259 |
|
---|
260 | </div>
|
---|
261 | </div>
|
---|
262 |
|
---|
263 |
|
---|
264 | <div id="parameter" class="member">
|
---|
265 | <div class="member-link">
|
---|
266 | <a name="parameter" href="#parameter"><tt><b>parameter</b></tt></a>
|
---|
267 | </div>
|
---|
268 | <div class="member-description hidden">
|
---|
269 |
|
---|
270 | <div class="member-text">
|
---|
271 | <p>The curve parameter, as used by various bezier curve calculations. It is
|
---|
272 | value between <tt>0</tt> (beginning of the curve) and <tt>1</tt> (end of
|
---|
273 | the curve).</p>
|
---|
274 |
|
---|
275 | <p>Read only.</p>
|
---|
276 |
|
---|
277 |
|
---|
278 | <ul><b>Type:</b>
|
---|
279 | <li>
|
---|
280 | <tt>Number</tt>
|
---|
281 | </li>
|
---|
282 | </ul>
|
---|
283 |
|
---|
284 |
|
---|
285 | </div>
|
---|
286 |
|
---|
287 | </div>
|
---|
288 | </div>
|
---|
289 |
|
---|
290 |
|
---|
291 | <div id="point" class="member">
|
---|
292 | <div class="member-link">
|
---|
293 | <a name="point" href="#point"><tt><b>point</b></tt></a>
|
---|
294 | </div>
|
---|
295 | <div class="member-description hidden">
|
---|
296 |
|
---|
297 | <div class="member-text">
|
---|
298 | <p>The point which is defined by the <a href="../classes/CurveLocation.html#curve" onclick="return toggleMember('curve', true);"><tt>curve</tt></a> and
|
---|
299 | <a href="../classes/CurveLocation.html#parameter" onclick="return toggleMember('parameter', true);"><tt>parameter</tt></a>.</p>
|
---|
300 |
|
---|
301 | <p>Read only.</p>
|
---|
302 |
|
---|
303 |
|
---|
304 | <ul><b>Type:</b>
|
---|
305 | <li>
|
---|
306 | <a href="../classes/Point.html"><tt>Point</tt></a>
|
---|
307 | </li>
|
---|
308 | </ul>
|
---|
309 |
|
---|
310 |
|
---|
311 | </div>
|
---|
312 |
|
---|
313 | </div>
|
---|
314 | </div>
|
---|
315 |
|
---|
316 |
|
---|
317 | <div id="tangent" class="member">
|
---|
318 | <div class="member-link">
|
---|
319 | <a name="tangent" href="#tangent"><tt><b>tangent</b></tt></a>
|
---|
320 | </div>
|
---|
321 | <div class="member-description hidden">
|
---|
322 |
|
---|
323 | <div class="member-text">
|
---|
324 | <p>The tangential vector to the <a href="../classes/CurveLocation.html#curve" onclick="return toggleMember('curve', true);"><tt>curve</tt></a> at the given location.</p>
|
---|
325 |
|
---|
326 | <p>Read only.</p>
|
---|
327 |
|
---|
328 |
|
---|
329 | <ul><b>Type:</b>
|
---|
330 | <li>
|
---|
331 | <a href="../classes/Point.html"><tt>Point</tt></a>
|
---|
332 | </li>
|
---|
333 | </ul>
|
---|
334 |
|
---|
335 |
|
---|
336 | </div>
|
---|
337 |
|
---|
338 | </div>
|
---|
339 | </div>
|
---|
340 |
|
---|
341 |
|
---|
342 | <div id="normal" class="member">
|
---|
343 | <div class="member-link">
|
---|
344 | <a name="normal" href="#normal"><tt><b>normal</b></tt></a>
|
---|
345 | </div>
|
---|
346 | <div class="member-description hidden">
|
---|
347 |
|
---|
348 | <div class="member-text">
|
---|
349 | <p>The normal vector to the <a href="../classes/CurveLocation.html#curve" onclick="return toggleMember('curve', true);"><tt>curve</tt></a> at the given location.</p>
|
---|
350 |
|
---|
351 | <p>Read only.</p>
|
---|
352 |
|
---|
353 |
|
---|
354 | <ul><b>Type:</b>
|
---|
355 | <li>
|
---|
356 | <a href="../classes/Point.html"><tt>Point</tt></a>
|
---|
357 | </li>
|
---|
358 | </ul>
|
---|
359 |
|
---|
360 |
|
---|
361 | </div>
|
---|
362 |
|
---|
363 | </div>
|
---|
364 | </div>
|
---|
365 |
|
---|
366 |
|
---|
367 | <div id="distance" class="member">
|
---|
368 | <div class="member-link">
|
---|
369 | <a name="distance" href="#distance"><tt><b>distance</b></tt></a>
|
---|
370 | </div>
|
---|
371 | <div class="member-description hidden">
|
---|
372 |
|
---|
373 | <div class="member-text">
|
---|
374 | <p>The distance from the queried point to the returned location.</p>
|
---|
375 |
|
---|
376 | <p>Read only.</p>
|
---|
377 |
|
---|
378 |
|
---|
379 | <ul><b>Type:</b>
|
---|
380 | <li>
|
---|
381 | <tt>Number</tt>
|
---|
382 | </li>
|
---|
383 | </ul>
|
---|
384 |
|
---|
385 |
|
---|
386 | </div>
|
---|
387 |
|
---|
388 | </div>
|
---|
389 | </div>
|
---|
390 |
|
---|
391 | </div>
|
---|
392 |
|
---|
393 |
|
---|
394 |
|
---|
395 | <!-- ============================== methods ================================ -->
|
---|
396 | <div class="reference-members"><h2>Methods</h2>
|
---|
397 |
|
---|
398 |
|
---|
399 | <div id="tostring" class="member">
|
---|
400 | <div class="member-link">
|
---|
401 | <a name="tostring" href="#tostring"><tt><b>toString</b>()</tt></a>
|
---|
402 | </div>
|
---|
403 | <div class="member-description hidden">
|
---|
404 | <div class="member-text">
|
---|
405 |
|
---|
406 |
|
---|
407 |
|
---|
408 | <ul><b>Returns:</b>
|
---|
409 |
|
---|
410 | <li>
|
---|
411 | <tt><tt>String</tt></tt> — a string representation of the curve location
|
---|
412 | </li>
|
---|
413 |
|
---|
414 | </ul>
|
---|
415 |
|
---|
416 |
|
---|
417 |
|
---|
418 | </div>
|
---|
419 | </div>
|
---|
420 | </div>
|
---|
421 |
|
---|
422 | </div>
|
---|
423 |
|
---|
424 |
|
---|
425 |
|
---|
426 |
|
---|
427 | <!-- =========================== copyright notice ========================= -->
|
---|
428 | <p class="footer">Copyright © 2011 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
---|
429 | <div class="content-end"></div>
|
---|
430 |
|
---|
431 | </body> |
---|