NURBSVolume.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>NURBSVolume - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">NURBSVolume</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>This class represents a NURBS volume.</p>
  16. <p>Implementation is based on <code>(x, y [, z=0 [, w=1]])</code> control points with <code>w=weight</code>.</p></div>
  17. </header>
  18. <article>
  19. <h2 class="subsection-title">Import</h2>
  20. <p><span translate="no">NURBSVolume</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  21. <pre><code class="language-js">import { NURBSVolume } from 'three/addons/curves/NURBSVolume.js';</code></pre>
  22. <div class="container-overview">
  23. <h2>Constructor</h2>
  24. <h3 class="name name-method" id="NURBSVolume" translate="no">new <a href="#NURBSVolume">NURBSVolume</a><span class="signature">( degree1 : <span class="param-type">number</span>, degree2 : <span class="param-type">number</span>, degree3 : <span class="param-type">number</span>, knots1 : <span class="param-type">Array.&lt;number></span>, knots2 : <span class="param-type">Array.&lt;number></span>, knots3 : <span class="param-type">Array.&lt;number></span>, controlPoints : <span class="param-type">Array.&lt;Array.&lt;Array.&lt;(Vector2|Vector3|Vector4)>>></span> )</span> </h3>
  25. <div class="method">
  26. <div class="description">
  27. <p>Constructs a new NURBS surface.</p>
  28. </div>
  29. <table class="params">
  30. <tbody>
  31. <tr>
  32. <td class="name"><code>degree1</code></td>
  33. <td class="description last"><p>The first NURBS degree.</p></td>
  34. </tr>
  35. <tr>
  36. <td class="name"><code>degree2</code></td>
  37. <td class="description last"><p>The second NURBS degree.</p></td>
  38. </tr>
  39. <tr>
  40. <td class="name"><code>degree3</code></td>
  41. <td class="description last"><p>The third NURBS degree.</p></td>
  42. </tr>
  43. <tr>
  44. <td class="name"><code>knots1</code></td>
  45. <td class="description last"><p>The first knots as a flat array of numbers.</p></td>
  46. </tr>
  47. <tr>
  48. <td class="name"><code>knots2</code></td>
  49. <td class="description last"><p>The second knots as a flat array of numbers.</p></td>
  50. </tr>
  51. <tr>
  52. <td class="name"><code>knots3</code></td>
  53. <td class="description last"><p>The third knots as a flat array of numbers.</p></td>
  54. </tr>
  55. <tr>
  56. <td class="name"><code>controlPoints</code></td>
  57. <td class="description last"><p>An array^3 holding control points.</p></td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. </div>
  62. </div>
  63. <h2 class="subsection-title">Methods</h2>
  64. <h3 class="name name-method" id="getPoint" translate="no">.<a href="#getPoint">getPoint</a><span class="signature">( t1 : <span class="param-type">number</span>, t2 : <span class="param-type">number</span>, t3 : <span class="param-type">number</span>, target : <span class="param-type">Vector3</span> )</span> </h3>
  65. <div class="method">
  66. <div class="description">
  67. <p>This method returns a vector in 3D space for the given interpolation factor. This vector lies within the NURBS volume.</p>
  68. </div>
  69. <table class="params">
  70. <tbody>
  71. <tr>
  72. <td class="name"><code>t1</code></td>
  73. <td class="description last"><p>The first interpolation factor representing the <code>u</code> position within the volume. Must be in the range <code>[0,1]</code>.</p></td>
  74. </tr>
  75. <tr>
  76. <td class="name"><code>t2</code></td>
  77. <td class="description last"><p>The second interpolation factor representing the <code>v</code> position within the volume. Must be in the range <code>[0,1]</code>.</p></td>
  78. </tr>
  79. <tr>
  80. <td class="name"><code>t3</code></td>
  81. <td class="description last"><p>The third interpolation factor representing the <code>w</code> position within the volume. Must be in the range <code>[0,1]</code>.</p></td>
  82. </tr>
  83. <tr>
  84. <td class="name"><code>target</code></td>
  85. <td class="description last"><p>The target vector the result is written to.</p></td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </div>
  90. <h2 class="subsection-title">Source</h2>
  91. <p>
  92. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/curves/NURBSVolume.js" target="_blank" rel="noopener" translate="no">examples/jsm/curves/NURBSVolume.js</a>
  93. </p>
  94. </article>
  95. </section>
  96. <script src="../scripts/linenumber.js"></script>
  97. <script src="../scripts/page.js"></script>
  98. </body>
  99. </html>
粤ICP备19079148号