Frustum.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">
  13. [link:http://en.wikipedia.org/wiki/Frustum Frustums] are used to determine what is
  14. inside the camera's field of view. They help speed up the rendering process - object which lie
  15. outside a camera's frustum can safely be excluded from rendering.<br /><br />
  16. This class is mainly intended for use internally by a renderer for calculating
  17. a [page:Camera camera] or [page:LightShadow.camera shadowCamera]'s frustum.
  18. </div>
  19. <h2>Constructor</h2>
  20. <h3>[name]([page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5])</h3>
  21. <div>
  22. [page:Plane p0] - (optional) defaults to a new [page:Plane].<br />
  23. [page:Plane p1] - (optional) defaults to a new [page:Plane].<br />
  24. [page:Plane p2] - (optional) defaults to a new [page:Plane].<br />
  25. [page:Plane p3] - (optional) defaults to a new [page:Plane].<br />
  26. [page:Plane p4] - (optional) defaults to a new [page:Plane].<br />
  27. [page:Plane p5] - (optional) defaults to a new [page:Plane].<br /><br />
  28. Creates a new [name].
  29. </div>
  30. <h2>Properties</h2>
  31. <h3>[property:Array planes]</h3>
  32. <div>Array of 6 [page:Plane planes].</div>
  33. <h2>Methods</h2>
  34. <h3>[method:Frustum clone]()</h3>
  35. <div>Return a new Frustum with the same parameters as this one.</div>
  36. <h3>[method:Boolean containsPoint]( [page:Vector3 point] )</h3>
  37. <div>
  38. [page:Vector3 point] - [page:Vector3] to test.<br /><br />
  39. Checks to see if the frustum contains the [page:Vector3 point].
  40. </div>
  41. <h3>[method:Frustum copy]( [page:Frustum frustum] )</h3>
  42. <div>
  43. [page:Frustum frustum] - The frustum to copy<br /><br />
  44. Copies the properties of the passed [page:Frustum frustum] into this one.
  45. </div>
  46. <h3>[method:Boolean intersectsBox]( [page:Box3 box] )</h3>
  47. <div>
  48. [page:Box3 box] - [page:Box3] to check for intersection.<br /><br />
  49. Return true if [page:Box3 box] intersects with this frustum.
  50. </div>
  51. <h3>[method:Boolean intersectsObject]( [page:Object3D object] )</h3>
  52. <div>
  53. Checks whether the [page:Object3D object]'s [page:Geometry.boundingSphere bounding sphere] is intersecting the Frustum.<br /><br />
  54. Note that the object must have a [page:Geometry] or [page:BufferGeometry] so that the bounding sphere
  55. can be calculated.
  56. </div>
  57. <h3>[method:Boolean intersectsSphere]( [page:Sphere sphere] )</h3>
  58. <div>
  59. [page:Sphere sphere] - [page:Sphere] to check for intersection.<br /><br />
  60. Return true if [page:Sphere sphere] intersects with this frustum.
  61. </div>
  62. <h3>[method:Boolean intersectsSprite]( [page:Sprite sprite] )</h3>
  63. <div>
  64. Checks whether the [page:Sprite sprite] is intersecting the Frustum.<br /><br />
  65. </div>
  66. <h3>[method:Frustum set]( [page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5] )</h3>
  67. <div>
  68. Sets the current frustum from the passed planes. No plane order is implicitely implied.
  69. </div>
  70. <h3>[method:Frustum setFromMatrix]( [page:Matrix4 matrix] )</h3>
  71. <div>
  72. [page:Matrix4 matrix] - [page:Matrix4] used to set the [page:.planes planes]<br /><br />
  73. This is used by the [page:WebGLRenderer] to set up the Frustum from a [page:Camera Camera's]
  74. [page:Camera.projectionMatrix projectionMatrix] and [page:Camera.matrixWorldInverse matrixWorldInverse].
  75. </div>
  76. <h2>Source</h2>
  77. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  78. </body>
  79. </html>