Face.html 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. Represents a section bounded by a specific amount of half-edges. The current implementation
  13. assumes that a face always consist of three edges.
  14. </p>
  15. <h2>Import</h2>
  16. <p>
  17. [name] is an add-on, and must be imported explicitly.
  18. See [link:#manual/introduction/Installation Installation / Addons].
  19. </p>
  20. <code>
  21. import { Face } from 'three/addons/math/ConvexHull.js';
  22. </code>
  23. <h2>Constructor</h2>
  24. <h3>[name]()</h3>
  25. <p>
  26. Creates a new instance of [name].
  27. </p>
  28. <h2>Properties</h2>
  29. <h3>[property:Vector3 normal]</h3>
  30. <p>
  31. The normal vector of the face. Default is a [page:Vector3] at (0, 0, 0).
  32. </p>
  33. <h3>[property:Vector3 midpoint]</h3>
  34. <p>
  35. The midpoint or centroid of the face. Default is a [page:Vector3] at (0, 0, 0).
  36. </p>
  37. <h3>[property:Float area]</h3>
  38. <p>
  39. The area of the face. Default is 0.
  40. </p>
  41. <h3>[property:Float constant]</h3>
  42. <p>
  43. Signed distance from face to the origin. Default is 0.
  44. </p>
  45. <h3>[property:VertexNode outside]</h3>
  46. <p>
  47. Reference to a vertex in a vertex list this face can see. Default is null.
  48. </p>
  49. <h3>[property:Integer mark]</h3>
  50. <p>
  51. Marks if a face is visible or deleted. Default is 'Visible'.
  52. </p>
  53. <h3>[property:HalfEdge edge]</h3>
  54. <p>
  55. Reference to the base edge of a face. To retrieve all edges, you can use the 'next' reference of the current edge. Default is null.
  56. </p>
  57. <h2>Methods</h2>
  58. <h3>[method:Face create]( [param:VertexNode a], [param:VertexNode b], [param:VertexNode c] )</h3>
  59. <p>
  60. [page:VertexNode a] - First vertex of the face.<br />
  61. [page:VertexNode b] - Second vertex of the face.<br />
  62. [page:VertexNode c] - Third vertex of the face.<br /><br />
  63. Creates a face.
  64. </p>
  65. <h3>[method:HalfEdge getEdge]( [param:Integer i] )</h3>
  66. <p>
  67. [page:Integer i] - The index of the edge.<br /><br />
  68. Returns an edge by the given index.
  69. </p>
  70. <h3>[method:this compute] ()</h3>
  71. <p>Computes all properties of the face.</p>
  72. <h3>[method:Float distanceToPoint]( [param:Vector3 point] )</h3>
  73. <p>
  74. [page:Vector3 point] - Any point in 3D space.<br /><br />
  75. Returns the signed distance from a given point to the plane representation of this face.
  76. </p>
  77. <h2>Source</h2>
  78. <p>
  79. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]
  80. </p>
  81. </body>
  82. </html>