Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

671 lines
13 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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>
  14. <article class="reference">
  15. <div class="reference-class">
  16. <h1>CurveLocation</h1>
  17. <p>CurveLocation objects describe a location on <a href="../classes/Curve.html"><tt>Curve</tt></a> objects, as defined by the curve-time <a href="../classes/CurveLocation.html#time"><tt>time</tt></a>, a value between <code>0</code> (beginning of the curve) and <code>1</code> (end of the curve). If the curve is part of a <a href="../classes/Path.html"><tt>Path</tt></a> item, its <a href="../classes/CurveLocation.html#index"><tt>index</tt></a> inside the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> array is also provided.</p>
  18. <p>The class is in use in many places, such as <a href="../classes/Path.html#getlocationat-offset"><tt>path.getLocationAt(offset)</tt></a>, <a href="../classes/Path.html#getlocationof-point"><tt>path.getLocationOf(point)</tt></a>, <a href="../classes/PathItem.html#getnearestlocation-point"><tt>pathItem.getNearestLocation(point)</tt></a>, <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a>, etc.</p>
  19. </div>
  20. <!-- =============================== constructors ========================== -->
  21. <div class="reference-members">
  22. <h2>Constructors</h2>
  23. <div id="curvelocation-curve-time" class="member">
  24. <div class="member-link">
  25. <a name="curvelocation-curve-time" href="#curvelocation-curve-time"><tt><b>CurveLocation</b>(curve, time[, point])</tt></a>
  26. </div>
  27. <div class="member-description hidden">
  28. <div class="member-text">
  29. <p>Creates a new CurveLocation object.</p>
  30. <ul class="member-list">
  31. <h4>Parameters:</h4>
  32. <li>
  33. <tt>curve:</tt>
  34. <a href="../classes/Curve.html"><tt>Curve</tt></a>
  35. </li>
  36. <li>
  37. <tt>time:</tt>
  38. <tt>Number</tt>
  39. </li>
  40. <li>
  41. <tt>point:</tt>
  42. <a href="../classes/Point.html"><tt>Point</tt></a>
  43. &mdash;&nbsp;optional
  44. </li>
  45. </ul>
  46. <ul class="member-list">
  47. <h4>Returns:</h4>
  48. <li>
  49. <tt><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></tt>
  50. </li>
  51. </ul>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <!-- ================================ properties =========================== -->
  57. <div class="reference-members">
  58. <h2>Properties</h2>
  59. <div id="segment" class="member">
  60. <div class="member-link">
  61. <a name="segment" href="#segment"><tt><b>segment</b></tt></a>
  62. </div>
  63. <div class="member-description hidden">
  64. <div class="member-text">
  65. <p>The segment of the curve which is closer to the described location.</p>
  66. <p>Read only.</p>
  67. <ul class="member-list">
  68. <h4>Type:</h4>
  69. <li>
  70. <a href="../classes/Segment.html"><tt>Segment</tt></a>
  71. </li>
  72. </ul>
  73. </div>
  74. </div>
  75. </div>
  76. <div id="curve" class="member">
  77. <div class="member-link">
  78. <a name="curve" href="#curve"><tt><b>curve</b></tt></a>
  79. </div>
  80. <div class="member-description hidden">
  81. <div class="member-text">
  82. <p>The curve that this location belongs to.</p>
  83. <p>Read only.</p>
  84. <ul class="member-list">
  85. <h4>Type:</h4>
  86. <li>
  87. <a href="../classes/Curve.html"><tt>Curve</tt></a>
  88. </li>
  89. </ul>
  90. </div>
  91. </div>
  92. </div>
  93. <div id="path" class="member">
  94. <div class="member-link">
  95. <a name="path" href="#path"><tt><b>path</b></tt></a>
  96. </div>
  97. <div class="member-description hidden">
  98. <div class="member-text">
  99. <p>The path that this locations is situated on.</p>
  100. <p>Read only.</p>
  101. <ul class="member-list">
  102. <h4>Type:</h4>
  103. <li>
  104. <a href="../classes/Path.html"><tt>Path</tt></a>
  105. </li>
  106. </ul>
  107. </div>
  108. </div>
  109. </div>
  110. <div id="index" class="member">
  111. <div class="member-link">
  112. <a name="index" href="#index"><tt><b>index</b></tt></a>
  113. </div>
  114. <div class="member-description hidden">
  115. <div class="member-text">
  116. <p>The index of the <a href="../classes/CurveLocation.html#curve"><tt>curve</tt></a> within the <a href="../classes/Path.html#curves"><tt>path.curves</tt></a> list, if it is part of a <a href="../classes/Path.html"><tt>Path</tt></a> item.</p>
  117. <p>Read only.</p>
  118. <ul class="member-list">
  119. <h4>Type:</h4>
  120. <li>
  121. <tt>Number</tt>
  122. </li>
  123. </ul>
  124. </div>
  125. </div>
  126. </div>
  127. <div id="time" class="member">
  128. <div class="member-link">
  129. <a name="time" href="#time"><tt><b>time</b></tt></a>
  130. </div>
  131. <div class="member-description hidden">
  132. <div class="member-text">
  133. <p>The curve-time parameter, as used by various bezier curve calculations. It is value between <code>0</code> (beginning of the curve) and <code>1</code> (end of the curve).</p>
  134. <p>Read only.</p>
  135. <ul class="member-list">
  136. <h4>Type:</h4>
  137. <li>
  138. <tt>Number</tt>
  139. </li>
  140. </ul>
  141. </div>
  142. </div>
  143. </div>
  144. <div id="point" class="member">
  145. <div class="member-link">
  146. <a name="point" href="#point"><tt><b>point</b></tt></a>
  147. </div>
  148. <div class="member-description hidden">
  149. <div class="member-text">
  150. <p>The point which is defined by the <a href="../classes/CurveLocation.html#curve"><tt>curve</tt></a> and <a href="../classes/CurveLocation.html#time"><tt>time</tt></a>.</p>
  151. <p>Read only.</p>
  152. <ul class="member-list">
  153. <h4>Type:</h4>
  154. <li>
  155. <a href="../classes/Point.html"><tt>Point</tt></a>
  156. </li>
  157. </ul>
  158. </div>
  159. </div>
  160. </div>
  161. <div id="offset" class="member">
  162. <div class="member-link">
  163. <a name="offset" href="#offset"><tt><b>offset</b></tt></a>
  164. </div>
  165. <div class="member-description hidden">
  166. <div class="member-text">
  167. <p>The length of the path from its beginning up to the location described by this object. If the curve is not part of a path, then the length within the curve is returned instead.</p>
  168. <p>Read only.</p>
  169. <ul class="member-list">
  170. <h4>Type:</h4>
  171. <li>
  172. <tt>Number</tt>
  173. </li>
  174. </ul>
  175. </div>
  176. </div>
  177. </div>
  178. <div id="curveoffset" class="member">
  179. <div class="member-link">
  180. <a name="curveoffset" href="#curveoffset"><tt><b>curveOffset</b></tt></a>
  181. </div>
  182. <div class="member-description hidden">
  183. <div class="member-text">
  184. <p>The length of the curve from its beginning up to the location described by this object.</p>
  185. <p>Read only.</p>
  186. <ul class="member-list">
  187. <h4>Type:</h4>
  188. <li>
  189. <tt>Number</tt>
  190. </li>
  191. </ul>
  192. </div>
  193. </div>
  194. </div>
  195. <div id="intersection" class="member">
  196. <div class="member-link">
  197. <a name="intersection" href="#intersection"><tt><b>intersection</b></tt></a>
  198. </div>
  199. <div class="member-description hidden">
  200. <div class="member-text">
  201. <p>The curve location on the intersecting curve, if this location is the result of a call to <a href="../classes/PathItem.html#getintersections-path"><tt>pathItem.getIntersections(path)</tt></a> / <a href="../classes/Curve.html#getintersections-curve"><tt>curve.getIntersections(curve)</tt></a>.</p>
  202. <p>Read only.</p>
  203. <ul class="member-list">
  204. <h4>Type:</h4>
  205. <li>
  206. <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
  207. </li>
  208. </ul>
  209. </div>
  210. </div>
  211. </div>
  212. <div id="tangent" class="member">
  213. <div class="member-link">
  214. <a name="tangent" href="#tangent"><tt><b>tangent</b></tt></a>
  215. </div>
  216. <div class="member-description hidden">
  217. <div class="member-text">
  218. <p>The tangential vector to the <a href="../classes/CurveLocation.html#curve"><tt>curve</tt></a> at the given location.</p>
  219. <p>Read only.</p>
  220. <ul class="member-list">
  221. <h4>Type:</h4>
  222. <li>
  223. <a href="../classes/Point.html"><tt>Point</tt></a>
  224. </li>
  225. </ul>
  226. </div>
  227. </div>
  228. </div>
  229. <div id="normal" class="member">
  230. <div class="member-link">
  231. <a name="normal" href="#normal"><tt><b>normal</b></tt></a>
  232. </div>
  233. <div class="member-description hidden">
  234. <div class="member-text">
  235. <p>The normal vector to the <a href="../classes/CurveLocation.html#curve"><tt>curve</tt></a> at the given location.</p>
  236. <p>Read only.</p>
  237. <ul class="member-list">
  238. <h4>Type:</h4>
  239. <li>
  240. <a href="../classes/Point.html"><tt>Point</tt></a>
  241. </li>
  242. </ul>
  243. </div>
  244. </div>
  245. </div>
  246. <div id="curvature" class="member">
  247. <div class="member-link">
  248. <a name="curvature" href="#curvature"><tt><b>curvature</b></tt></a>
  249. </div>
  250. <div class="member-description hidden">
  251. <div class="member-text">
  252. <p>The curvature of the <a href="../classes/CurveLocation.html#curve"><tt>curve</tt></a> at the given location.</p>
  253. <p>Read only.</p>
  254. <ul class="member-list">
  255. <h4>Type:</h4>
  256. <li>
  257. <tt>Number</tt>
  258. </li>
  259. </ul>
  260. </div>
  261. </div>
  262. </div>
  263. <div id="distance" class="member">
  264. <div class="member-link">
  265. <a name="distance" href="#distance"><tt><b>distance</b></tt></a>
  266. </div>
  267. <div class="member-description hidden">
  268. <div class="member-text">
  269. <p>The distance from the queried point to the returned location.</p>
  270. <p>Read only.</p>
  271. <ul class="member-list">
  272. <h4>Type:</h4>
  273. <li>
  274. <tt>Number</tt>
  275. </li>
  276. </ul>
  277. <ul class="member-list">
  278. <h4>See also:</h4>
  279. <li><tt><a href="../classes/Curve.html#getnearestlocation-point"><tt>curve.getNearestLocation(point)</tt></a></tt></li>
  280. <li><tt><a href="../classes/PathItem.html#getnearestlocation-point"><tt>pathItem.getNearestLocation(point)</tt></a></tt></li>
  281. </ul>
  282. </div>
  283. </div>
  284. </div>
  285. </div>
  286. <!-- ============================== methods ================================ -->
  287. <div class="reference-members">
  288. <h2>Methods</h2>
  289. <div id="equals-location" class="member">
  290. <div class="member-link">
  291. <a name="equals-location" href="#equals-location"><tt><b>equals</b>(location)</tt></a>
  292. </div>
  293. <div class="member-description hidden">
  294. <div class="member-text">
  295. <p>Checks whether tow CurveLocation objects are describing the same location on a path, by applying the same tolerances as elsewhere when dealing with curve-time parameters.</p>
  296. <ul class="member-list">
  297. <h4>Parameters:</h4>
  298. <li>
  299. <tt>location:</tt>
  300. <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
  301. </li>
  302. </ul>
  303. <ul class="member-list">
  304. <h4>Returns:</h4>
  305. <li>
  306. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the locations are equal, <tt>false</tt> otherwise
  307. </li>
  308. </ul>
  309. </div>
  310. </div>
  311. </div>
  312. <div id="tostring" class="member">
  313. <div class="member-link">
  314. <a name="tostring" href="#tostring"><tt><b>toString</b>()</tt></a>
  315. </div>
  316. <div class="member-description hidden">
  317. <div class="member-text">
  318. <ul class="member-list">
  319. <h4>Returns:</h4>
  320. <li>
  321. <tt><tt>String</tt></tt>&nbsp;&mdash;&nbsp;a string representation of the curve location
  322. </li>
  323. </ul>
  324. </div>
  325. </div>
  326. </div>
  327. <h3>Tests</h3>
  328. <div id="istouching" class="member">
  329. <div class="member-link">
  330. <a name="istouching" href="#istouching"><tt><b>isTouching</b>()</tt></a>
  331. </div>
  332. <div class="member-description hidden">
  333. <div class="member-text">
  334. <p>Checks if the location is an intersection with another curve and is merely touching the other curve, as opposed to crossing it.</p>
  335. <ul class="member-list">
  336. <h4>Returns:</h4>
  337. <li>
  338. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the location is an intersection that is merely touching another curve, <tt>false</tt> otherwise
  339. </li>
  340. </ul>
  341. <ul class="member-list">
  342. <h4>See also:</h4>
  343. <li><tt><a href="../classes/CurveLocation.html#iscrossing"><tt>isCrossing</tt></a>()</tt></li>
  344. </ul>
  345. </div>
  346. </div>
  347. </div>
  348. <div id="iscrossing" class="member">
  349. <div class="member-link">
  350. <a name="iscrossing" href="#iscrossing"><tt><b>isCrossing</b>()</tt></a>
  351. </div>
  352. <div class="member-description hidden">
  353. <div class="member-text">
  354. <p>Checks if the location is an intersection with another curve and is crossing the other curve, as opposed to just touching it.</p>
  355. <ul class="member-list">
  356. <h4>Returns:</h4>
  357. <li>
  358. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the location is an intersection that is crossing another curve, <tt>false</tt> otherwise
  359. </li>
  360. </ul>
  361. <ul class="member-list">
  362. <h4>See also:</h4>
  363. <li><tt><a href="../classes/CurveLocation.html#istouching"><tt>isTouching</tt></a>()</tt></li>
  364. </ul>
  365. </div>
  366. </div>
  367. </div>
  368. <div id="hasoverlap" class="member">
  369. <div class="member-link">
  370. <a name="hasoverlap" href="#hasoverlap"><tt><b>hasOverlap</b>()</tt></a>
  371. </div>
  372. <div class="member-description hidden">
  373. <div class="member-text">
  374. <p>Checks if the location is an intersection with another curve and is part of an overlap between the two involved paths.</p>
  375. <ul class="member-list">
  376. <h4>Returns:</h4>
  377. <li>
  378. <tt><tt>Boolean</tt></tt>&nbsp;&mdash;&nbsp;<tt>true</tt> if the location is an intersection that is part of an overlap between the two involved paths, <tt>false</tt> otherwise
  379. </li>
  380. </ul>
  381. <ul class="member-list">
  382. <h4>See also:</h4>
  383. <li><tt><a href="../classes/CurveLocation.html#iscrossing"><tt>isCrossing</tt></a>()</tt></li>
  384. <li><tt><a href="../classes/CurveLocation.html#istouching"><tt>isTouching</tt></a>()</tt></li>
  385. </ul>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. <!-- =========================== copyright notice ========================== -->
  391. <p class="footer">
  392. Paper.js v0.12.15<br>
  393. Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
  394. <div class="content-end"></div>
  395. </article>
  396. </body>