FrustumArray.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>FrustumArray - 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">FrustumArray</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>FrustumArray is used to determine if an object is visible in at least one camera
  16. from an array of cameras. This is particularly useful for multi-view renderers.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="FrustumArray" translate="no">new <a href="#FrustumArray">FrustumArray</a><span class="signature">()</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new frustum array.</p>
  25. </div>
  26. </div>
  27. </div>
  28. <h2 class="subsection-title">Properties</h2>
  29. <div class="member">
  30. <h3 class="name" id="coordinateSystem" translate="no">.<a href="#coordinateSystem">coordinateSystem</a><span class="type-signature"> : <a href="global.html#WebGLCoordinateSystem">WebGLCoordinateSystem</a> | <a href="global.html#WebGPUCoordinateSystem">WebGPUCoordinateSystem</a></span> </h3>
  31. <div class="description">
  32. <p>The coordinate system to use.<br/>Default is <code>WebGLCoordinateSystem</code>.</p>
  33. </div>
  34. </div>
  35. <h2 class="subsection-title">Methods</h2>
  36. <h3 class="name name-method" id="clone" translate="no">.<a href="#clone">clone</a><span class="signature">()</span><span class="type-signature"> : <a href="FrustumArray.html">FrustumArray</a></span> </h3>
  37. <div class="method">
  38. <div class="description">
  39. <p>Returns a new frustum array with copied values from this instance.</p>
  40. </div>
  41. <dl class="details">
  42. <dt class="tag-returns"><strong>Returns:</strong> A clone of this instance.</dt>
  43. </dl>
  44. </div>
  45. <h3 class="name name-method" id="containsPoint" translate="no">.<a href="#containsPoint">containsPoint</a><span class="signature">( point : <span class="param-type">Vector3</span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  46. <div class="method">
  47. <div class="description">
  48. <p>Returns <code>true</code> if the given point lies within any frustum
  49. from the camera array.</p>
  50. </div>
  51. <table class="params">
  52. <tbody>
  53. <tr>
  54. <td class="name"><code>point</code></td>
  55. <td class="description last"><p>The point to test.</p></td>
  56. </tr>
  57. <tr>
  58. <td class="name"><code>cameraArray</code></td>
  59. <td class="description last"><p>An object with a cameras property containing an array of cameras.</p></td>
  60. </tr>
  61. </tbody>
  62. </table>
  63. <dl class="details">
  64. <dt class="tag-returns"><strong>Returns:</strong> Whether the point is visible in any camera.</dt>
  65. </dl>
  66. </div>
  67. <h3 class="name name-method" id="intersectsBox" translate="no">.<a href="#intersectsBox">intersectsBox</a><span class="signature">( box : <span class="param-type">Box3</span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  68. <div class="method">
  69. <div class="description">
  70. <p>Returns <code>true</code> if the given bounding box is intersecting any frustum
  71. from the camera array.</p>
  72. </div>
  73. <table class="params">
  74. <tbody>
  75. <tr>
  76. <td class="name"><code>box</code></td>
  77. <td class="description last"><p>The bounding box to test.</p></td>
  78. </tr>
  79. <tr>
  80. <td class="name"><code>cameraArray</code></td>
  81. <td class="description last"><p>An object with a cameras property containing an array of cameras.</p></td>
  82. </tr>
  83. </tbody>
  84. </table>
  85. <dl class="details">
  86. <dt class="tag-returns"><strong>Returns:</strong> Whether the box is visible in any camera.</dt>
  87. </dl>
  88. </div>
  89. <h3 class="name name-method" id="intersectsObject" translate="no">.<a href="#intersectsObject">intersectsObject</a><span class="signature">( object : <span class="param-type">Object3D</span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  90. <div class="method">
  91. <div class="description">
  92. <p>Returns <code>true</code> if the 3D object's bounding sphere is intersecting any frustum
  93. from the camera array.</p>
  94. </div>
  95. <table class="params">
  96. <tbody>
  97. <tr>
  98. <td class="name"><code>object</code></td>
  99. <td class="description last"><p>The 3D object to test.</p></td>
  100. </tr>
  101. <tr>
  102. <td class="name"><code>cameraArray</code></td>
  103. <td class="description last"><p>An object with a cameras property containing an array of cameras.</p></td>
  104. </tr>
  105. </tbody>
  106. </table>
  107. <dl class="details">
  108. <dt class="tag-returns"><strong>Returns:</strong> Whether the 3D object is visible in any camera.</dt>
  109. </dl>
  110. </div>
  111. <h3 class="name name-method" id="intersectsSphere" translate="no">.<a href="#intersectsSphere">intersectsSphere</a><span class="signature">( sphere : <span class="param-type">Sphere</span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  112. <div class="method">
  113. <div class="description">
  114. <p>Returns <code>true</code> if the given bounding sphere is intersecting any frustum
  115. from the camera array.</p>
  116. </div>
  117. <table class="params">
  118. <tbody>
  119. <tr>
  120. <td class="name"><code>sphere</code></td>
  121. <td class="description last"><p>The bounding sphere to test.</p></td>
  122. </tr>
  123. <tr>
  124. <td class="name"><code>cameraArray</code></td>
  125. <td class="description last"><p>An object with a cameras property containing an array of cameras.</p></td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. <dl class="details">
  130. <dt class="tag-returns"><strong>Returns:</strong> Whether the sphere is visible in any camera.</dt>
  131. </dl>
  132. </div>
  133. <h3 class="name name-method" id="intersectsSprite" translate="no">.<a href="#intersectsSprite">intersectsSprite</a><span class="signature">( sprite : <span class="param-type">Sprite</span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  134. <div class="method">
  135. <div class="description">
  136. <p>Returns <code>true</code> if the given sprite is intersecting any frustum
  137. from the camera array.</p>
  138. </div>
  139. <table class="params">
  140. <tbody>
  141. <tr>
  142. <td class="name"><code>sprite</code></td>
  143. <td class="description last"><p>The sprite to test.</p></td>
  144. </tr>
  145. <tr>
  146. <td class="name"><code>cameraArray</code></td>
  147. <td class="description last"><p>An object with a cameras property containing an array of cameras.</p></td>
  148. </tr>
  149. </tbody>
  150. </table>
  151. <dl class="details">
  152. <dt class="tag-returns"><strong>Returns:</strong> Whether the sprite is visible in any camera.</dt>
  153. </dl>
  154. </div>
  155. <h2 class="subsection-title">Source</h2>
  156. <p>
  157. <a href="https://github.com/mrdoob/three.js/blob/master/src/math/FrustumArray.js" target="_blank" rel="noopener" translate="no">src/math/FrustumArray.js</a>
  158. </p>
  159. </article>
  160. </section>
  161. <script src="../scripts/linenumber.js"></script>
  162. <script src="../scripts/page.js"></script>
  163. </body>
  164. </html>
粤ICP备19079148号