HalfEdge.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">
  13. The basis for a half-edge data structure, also known as doubly connected edge list (DCEL).<br />
  14. </div>
  15. <h2>Constructor</h2>
  16. <h3>[name]( [page:Vertex vertex], [page:Face face] )</h3>
  17. [page:Vertex vertex] - [page:Vertex] A reference to its destination vertex.<br /><br />
  18. [page:Face face] - [page:Face] A reference to its face.<br />
  19. </div>
  20. <h2>Properties</h2>
  21. <h3>[property:Vertex vertex]</h3>
  22. <div>
  23. Reference to the destination vertex. The origin vertex can be obtained by querying the destination of its twin, or of the previous half-edge. Default is undefined.
  24. </div>
  25. <h3>[property:HalfEdge prev]</h3>
  26. <div>
  27. Reference to the previous half-edge of the same face. Default is null.
  28. </div>
  29. <h3>[property:HalfEdge next]</h3>
  30. <div>
  31. Reference to the next half-edge of the same face. Default is null.
  32. </div>
  33. <h3>[property:HalfEdge twin]</h3>
  34. <div>
  35. Reference to the twin half-edge to reach the opposite face. Default is null.
  36. </div>
  37. <h3>[property:Face face]</h3>
  38. <div>
  39. Each half-edge bounds a single face and thus has a reference to that face. Default is undefined.
  40. </div>
  41. <h2>Methods</h2>
  42. <h3>[method:Vertex head]()</h3>
  43. <div>Returns the destintation vertex.</div>
  44. <h3>[method:Vertex tail]()</h3>
  45. <div>Returns the origin vertex.</div>
  46. <h3>[method:Float length]()</h3>
  47. <div>Returns the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
  48. (straight-line length) of the edge.</div>
  49. <h3>[method:Float lengthSquared]()</h3>
  50. <div>Returns the square of the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
  51. (straight-line length) of the edge.</div>
  52. <h3>[method:HalfEdge setTwin]( [page:HalfEdge edge] )</h3>
  53. [page:HalfEdge edge] - Any half-edge.<br /><br />
  54. <div>Sets the twin edge of this half-edge. It also ensures that the twin reference of the given half-edge is correctly set.</div>
  55. <h2>Source</h2>
  56. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/QuickHull.js examples/js/QuickHull.js]
  57. </body>
  58. </html>