HalfEdge.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">
  12. The basis for a half-edge data structure, also known as doubly connected edge list (DCEL).
  13. </p>
  14. <h2>Import</h2>
  15. <p>
  16. [name] is an add-on, and must be imported explicitly.
  17. See [link:#manual/introduction/Installation Installation / Addons].
  18. </p>
  19. <code>
  20. import { HalfEdge } from 'three/addons/math/ConvexHull.js';
  21. </code>
  22. <h2>Constructor</h2>
  23. <h3>[name]( [param:VertexNode vertex], [param:Face face] )</h3>
  24. <p>
  25. [page:VertexNode vertex] - [page:VertexNode] A reference to its destination vertex.<br />
  26. [page:Face face] - [page:Face] A reference to its face.<br /><br />
  27. Creates a new instance of [name].
  28. </p>
  29. <h2>Properties</h2>
  30. <h3>[property:VertexNode vertex]</h3>
  31. <p>
  32. 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.
  33. </p>
  34. <h3>[property:HalfEdge prev]</h3>
  35. <p>
  36. Reference to the previous half-edge of the same face. Default is null.
  37. </p>
  38. <h3>[property:HalfEdge next]</h3>
  39. <p>
  40. Reference to the next half-edge of the same face. Default is null.
  41. </p>
  42. <h3>[property:HalfEdge twin]</h3>
  43. <p>
  44. Reference to the twin half-edge to reach the opposite face. Default is null.
  45. </p>
  46. <h3>[property:Face face]</h3>
  47. <p>
  48. Each half-edge bounds a single face and thus has a reference to that face. Default is undefined.
  49. </p>
  50. <h2>Methods</h2>
  51. <h3>[method:VertexNode head]()</h3>
  52. <p>Returns the destination vertex.</p>
  53. <h3>[method:VertexNode tail]()</h3>
  54. <p>Returns the origin vertex.</p>
  55. <h3>[method:Float length]()</h3>
  56. <p>Returns the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
  57. (straight-line length) of the edge.</p>
  58. <h3>[method:Float lengthSquared]()</h3>
  59. <p>Returns the square of the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
  60. (straight-line length) of the edge.</p>
  61. <h3>[method:this setTwin]( [param:HalfEdge edge] )</h3>
  62. <p>
  63. [page:HalfEdge edge] - Any half-edge.<br /><br />
  64. Sets the twin edge of this half-edge. It also ensures that the twin reference of the given half-edge is correctly set.
  65. </p>
  66. <h2>Source</h2>
  67. <p>
  68. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]
  69. </p>
  70. </body>
  71. </html>