Frustum.html 3.5 KB

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