FrustumArray.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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.</p>
  33. <p>Default is <code>WebGLCoordinateSystem</code>.</p>
  34. </div>
  35. </div>
  36. <h2 class="subsection-title">Methods</h2>
  37. <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>
  38. <div class="method">
  39. <div class="description">
  40. <p>Returns a new frustum array with copied values from this instance.</p>
  41. </div>
  42. <dl class="details">
  43. <dt class="tag-returns"><strong>Returns:</strong> A clone of this instance.</dt>
  44. </dl>
  45. </div>
  46. <h3 class="name name-method" id="containsPoint" translate="no">.<a href="#containsPoint">containsPoint</a><span class="signature">( point : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  47. <div class="method">
  48. <div class="description">
  49. <p>Returns <code>true</code> if the given point lies within any frustum
  50. from the camera array.</p>
  51. </div>
  52. <table class="params">
  53. <tbody>
  54. <tr>
  55. <td class="name">
  56. <strong>point</strong>
  57. </td>
  58. <td class="description last">
  59. <p>The point to test.</p>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="name">
  64. <strong>cameraArray</strong>
  65. </td>
  66. <td class="description last">
  67. <p>An object with a cameras property containing an array of cameras.</p>
  68. </td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. <dl class="details">
  73. <dt class="tag-returns"><strong>Returns:</strong> Whether the point is visible in any camera.</dt>
  74. </dl>
  75. </div>
  76. <h3 class="name name-method" id="intersectsBox" translate="no">.<a href="#intersectsBox">intersectsBox</a><span class="signature">( box : <span class="param-type"><a href="Box3.html">Box3</a></span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>Returns <code>true</code> if the given bounding box is intersecting any frustum
  80. from the camera array.</p>
  81. </div>
  82. <table class="params">
  83. <tbody>
  84. <tr>
  85. <td class="name">
  86. <strong>box</strong>
  87. </td>
  88. <td class="description last">
  89. <p>The bounding box to test.</p>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td class="name">
  94. <strong>cameraArray</strong>
  95. </td>
  96. <td class="description last">
  97. <p>An object with a cameras property containing an array of cameras.</p>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. <dl class="details">
  103. <dt class="tag-returns"><strong>Returns:</strong> Whether the box is visible in any camera.</dt>
  104. </dl>
  105. </div>
  106. <h3 class="name name-method" id="intersectsObject" translate="no">.<a href="#intersectsObject">intersectsObject</a><span class="signature">( object : <span class="param-type"><a href="Object3D.html">Object3D</a></span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  107. <div class="method">
  108. <div class="description">
  109. <p>Returns <code>true</code> if the 3D object's bounding sphere is intersecting any frustum
  110. from the camera array.</p>
  111. </div>
  112. <table class="params">
  113. <tbody>
  114. <tr>
  115. <td class="name">
  116. <strong>object</strong>
  117. </td>
  118. <td class="description last">
  119. <p>The 3D object to test.</p>
  120. </td>
  121. </tr>
  122. <tr>
  123. <td class="name">
  124. <strong>cameraArray</strong>
  125. </td>
  126. <td class="description last">
  127. <p>An object with a cameras property containing an array of cameras.</p>
  128. </td>
  129. </tr>
  130. </tbody>
  131. </table>
  132. <dl class="details">
  133. <dt class="tag-returns"><strong>Returns:</strong> Whether the 3D object is visible in any camera.</dt>
  134. </dl>
  135. </div>
  136. <h3 class="name name-method" id="intersectsSphere" translate="no">.<a href="#intersectsSphere">intersectsSphere</a><span class="signature">( sphere : <span class="param-type"><a href="Sphere.html">Sphere</a></span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  137. <div class="method">
  138. <div class="description">
  139. <p>Returns <code>true</code> if the given bounding sphere is intersecting any frustum
  140. from the camera array.</p>
  141. </div>
  142. <table class="params">
  143. <tbody>
  144. <tr>
  145. <td class="name">
  146. <strong>sphere</strong>
  147. </td>
  148. <td class="description last">
  149. <p>The bounding sphere to test.</p>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td class="name">
  154. <strong>cameraArray</strong>
  155. </td>
  156. <td class="description last">
  157. <p>An object with a cameras property containing an array of cameras.</p>
  158. </td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. <dl class="details">
  163. <dt class="tag-returns"><strong>Returns:</strong> Whether the sphere is visible in any camera.</dt>
  164. </dl>
  165. </div>
  166. <h3 class="name name-method" id="intersectsSprite" translate="no">.<a href="#intersectsSprite">intersectsSprite</a><span class="signature">( sprite : <span class="param-type"><a href="Sprite.html">Sprite</a></span>, cameraArray : <span class="param-type">Object</span> )</span><span class="type-signature"> : boolean</span> </h3>
  167. <div class="method">
  168. <div class="description">
  169. <p>Returns <code>true</code> if the given sprite is intersecting any frustum
  170. from the camera array.</p>
  171. </div>
  172. <table class="params">
  173. <tbody>
  174. <tr>
  175. <td class="name">
  176. <strong>sprite</strong>
  177. </td>
  178. <td class="description last">
  179. <p>The sprite to test.</p>
  180. </td>
  181. </tr>
  182. <tr>
  183. <td class="name">
  184. <strong>cameraArray</strong>
  185. </td>
  186. <td class="description last">
  187. <p>An object with a cameras property containing an array of cameras.</p>
  188. </td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. <dl class="details">
  193. <dt class="tag-returns"><strong>Returns:</strong> Whether the sprite is visible in any camera.</dt>
  194. </dl>
  195. </div>
  196. <h2 class="subsection-title">Source</h2>
  197. <p>
  198. <a href="https://github.com/mrdoob/three.js/blob/master/src/math/FrustumArray.js" translate="no" target="_blank" rel="noopener">src/math/FrustumArray.js</a>
  199. </p>
  200. </article>
  201. </section>
  202. <script src="../scripts/linenumber.js"></script>
  203. <script src="../scripts/page.js"></script>
  204. </body>
  205. </html>
粤ICP备19079148号