HalfEdge.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. 半边数据结构的基础,也被称为双连通边列表 (DCEL)。
  13. </p>
  14. <h2>导入</h2>
  15. <p>
  16. [name] 是一个附加组件,必须显式导入。请参阅 [link:#manual/introduction/Installation Installation / Addons].
  17. </p>
  18. <code>
  19. import { HalfEdge } from 'three/addons/math/ConvexHull.js';
  20. </code>
  21. <h2>构造函数</h2>
  22. <h3>[name]( [param:VertexNode vertex], [param:Face face] )</h3>
  23. <p>
  24. [page:VertexNode vertex] - [page:VertexNode] 对其目标顶点的引用<br />
  25. [page:Face face] - [page:Face] 对其面的引用<br /><br />
  26. 创建一个 [name] 实例。
  27. </p>
  28. <h2>属性</h2>
  29. <h3>[property:VertexNode vertex]</h3>
  30. <p>
  31. 对目标顶点的引用。可以通过查询其孪生顶点或前一个半边的目的地来获得原点。默认值 undefined。
  32. </p>
  33. <h3>[property:HalfEdge prev]</h3>
  34. <p>
  35. 对同一面的前一半边的引用。默认值为 null。
  36. </p>
  37. <h3>[property:HalfEdge next]</h3>
  38. <p>
  39. 对同一面的下一半边的引用。默认值为 null。
  40. </p>
  41. <h3>[property:HalfEdge twin]</h3>
  42. <p>
  43. 对应到达相对面的孪生半边的引用。默认值为 null。
  44. </p>
  45. <h3>[property:Face face]</h3>
  46. <p>
  47. 每个半边限定一个面,因此具有对该面的引用。默认值 undefined。
  48. </p>
  49. <h2>方法</h2>
  50. <h3>[method:VertexNode head]()</h3>
  51. <p>返回目标顶点。</p>
  52. <h3>[method:VertexNode tail]()</h3>
  53. <p>返回原点顶点</p>
  54. <h3>[method:Float length]()</h3>
  55. <p>返回边的 [link:https://en.wikipedia.org/wiki/Euclidean_distance 欧几里得长度]
  56. (直线长度)。</p>
  57. <h3>[method:Float lengthSquared]()</h3>
  58. <p>返回边的 [link:https://en.wikipedia.org/wiki/Euclidean_distance 欧几里得长度]
  59. (直线长度)的平方。</p>
  60. <h3>[method:this setTwin]( [param:HalfEdge edge] )</h3>
  61. <p>
  62. [page:HalfEdge edge] - 任何半边缘。<br /><br />
  63. 设置这个半边的孪生边。还确保给定半边的孪生引用被正确设置。
  64. </p>
  65. <h2>源代码</h2>
  66. <p>
  67. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]
  68. </p>
  69. </body>
  70. </html>