Frustum.html 3.5 KB

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