Frustum.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. <p 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. </p>
  19. <h2>Constructor</h2>
  20. <h3>[name]([param:Plane p0], [param:Plane p1], [param:Plane p2], [param:Plane p3], [param:Plane p4], [param:Plane p5])</h3>
  21. <p>
  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. </p>
  30. <h2>Properties</h2>
  31. <h3>[property:Array planes]</h3>
  32. <p>Array of 6 [page:Plane planes].</p>
  33. <h2>Methods</h2>
  34. <h3>[method:Frustum clone]()</h3>
  35. <p>Return a new Frustum with the same parameters as this one.</p>
  36. <h3>[method:Boolean containsPoint]( [param:Vector3 point] )</h3>
  37. <p>
  38. [page:Vector3 point] - [page:Vector3] to test.<br /><br />
  39. Checks to see if the frustum contains the [page:Vector3 point].
  40. </p>
  41. <h3>[method:Frustum copy]( [param:Frustum frustum] )</h3>
  42. <p>
  43. [page:Frustum frustum] - The frustum to copy<br /><br />
  44. Copies the properties of the passed [page:Frustum frustum] into this one.
  45. </p>
  46. <h3>[method:Boolean intersectsBox]( [param:Box3 box] )</h3>
  47. <p>
  48. [page:Box3 box] - [page:Box3] to check for intersection.<br /><br />
  49. Return true if [page:Box3 box] intersects with this frustum.
  50. </p>
  51. <h3>[method:Boolean intersectsObject]( [param:Object3D object] )</h3>
  52. <p>
  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. </p>
  57. <h3>[method:Boolean intersectsSphere]( [param:Sphere sphere] )</h3>
  58. <p>
  59. [page:Sphere sphere] - [page:Sphere] to check for intersection.<br /><br />
  60. Return true if [page:Sphere sphere] intersects with this frustum.
  61. </p>
  62. <h3>[method:Boolean intersectsSprite]( [param:Sprite sprite] )</h3>
  63. <p>
  64. Checks whether the [page:Sprite sprite] is intersecting the Frustum.<br /><br />
  65. </p>
  66. <h3>[method:Frustum set]( [param:Plane p0], [param:Plane p1], [param:Plane p2], [param:Plane p3], [param:Plane p4], [param:Plane p5] )</h3>
  67. <p>
  68. Sets the current frustum from the passed planes. No plane order is implicitely implied.<br>
  69. Please note that this method only copies the values from the given objects.
  70. </p>
  71. <h3>[method:Frustum setFromMatrix]( [param:Matrix4 matrix] )</h3>
  72. <p>
  73. [page:Matrix4 matrix] - [page:Matrix4] used to set the [page:.planes planes]<br /><br />
  74. This is used by the [page:WebGLRenderer] to set up the Frustum from a [page:Camera Camera]'s
  75. [page:Camera.projectionMatrix projectionMatrix] and [page:Camera.matrixWorldInverse matrixWorldInverse].
  76. </p>
  77. <h2>Source</h2>
  78. <p>
  79. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  80. </p>
  81. </body>
  82. </html>