|
@@ -10,7 +10,14 @@
|
|
|
<body>
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc"><a href="http://en.wikipedia.org/wiki/Frustum">Frustums</a> are used to determine what is inside the camera's field of view. They help speed up the rendering process.</div>
|
|
|
+ <div class="desc">
|
|
|
+ [link:http://en.wikipedia.org/wiki/Frustum Frustums] are used to determine what is
|
|
|
+ inside the camera's field of view. They help speed up the rendering process - object which lie
|
|
|
+ outside a camera's frustum can safely be excluded from rendering.<br /><br />
|
|
|
+
|
|
|
+ This class is mainly intended for use internally by a renderer for calculating
|
|
|
+ a [page:Camera camera] or [page:LightShadow.camera shadowCamera]'s frustum.
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
<h2>Constructor</h2>
|
|
@@ -18,85 +25,95 @@
|
|
|
|
|
|
<h3>[name]([page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5])</h3>
|
|
|
<div>
|
|
|
- p0 -- [page:Plane] <br />
|
|
|
- p1 -- [page:Plane] <br />
|
|
|
- p2 -- [page:Plane] <br />
|
|
|
- p3 -- [page:Plane] <br />
|
|
|
- p4 -- [page:Plane] <br />
|
|
|
- p5 -- [page:Plane]
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- Creates a frustum from the designated planes.
|
|
|
+ [page:Plane p0] - (optional) defaults to a new [page:Plane].<br />
|
|
|
+ [page:Plane p1] - (optional) defaults to a new [page:Plane].<br />
|
|
|
+ [page:Plane p2] - (optional) defaults to a new [page:Plane].<br />
|
|
|
+ [page:Plane p3] - (optional) defaults to a new [page:Plane].<br />
|
|
|
+ [page:Plane p4] - (optional) defaults to a new [page:Plane].<br />
|
|
|
+ [page:Plane p5] - (optional) defaults to a new [page:Plane].<br /><br />
|
|
|
+
|
|
|
+ Creates a new [name].
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
|
|
|
<h3>[property:Array planes]</h3>
|
|
|
- <div>
|
|
|
- Array of 6 [page:Plane planes].
|
|
|
- </div>
|
|
|
+ <div>Array of 6 [page:Plane planes].</div>
|
|
|
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
- <h3>[method:Frustum setFromMatrix]( [page:Matrix4 matrix] )</h3>
|
|
|
+ <h3>[method:Frustum clone]()</h3>
|
|
|
+ <div>Return a new Frustum with the same parameters as this one.</div>
|
|
|
|
|
|
- <h3>[method:Boolean intersectsObject]( [page:Object3D object] )</h3>
|
|
|
- <div>
|
|
|
- Checks whether the object's bounding sphere is intersecting the Frustum.
|
|
|
- </div>
|
|
|
|
|
|
- <h3>[method:Frustum clone]()</h3>
|
|
|
+ <h3>[method:Boolean containsPoint]( [page:Vector3 point] )</h3>
|
|
|
<div>
|
|
|
- Return a copy of this Frustum
|
|
|
- </div>
|
|
|
+ [page:Vector3 point] - [page:Vector3] to test.<br /><br />
|
|
|
|
|
|
- <h3>[method:Frustum set]( [page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5] )</h3>
|
|
|
- <div>
|
|
|
- p0 -- [page:Plane] <br />
|
|
|
- p1 -- [page:Plane] <br />
|
|
|
- p2 -- [page:Plane] <br />
|
|
|
- p3 -- [page:Plane] <br />
|
|
|
- p4 -- [page:Plane] <br />
|
|
|
- p5 -- [page:Plane]
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- Sets the current frustum from the passed planes. No plane order is implicitely implied.
|
|
|
+ Checks to see if the frustum contains the [page:Vector3 point].
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Frustum copy]( [page:Frustum frustum] ) [page:Frustum this]</h3>
|
|
|
+ <h3>[method:Frustum copy]( [page:Frustum frustum] )</h3>
|
|
|
<div>
|
|
|
- frustum -- The frustum to copy
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- Copies the values of the passed frustum.
|
|
|
+ [page:Frustum frustum] - The frustum to copy<br /><br />
|
|
|
+
|
|
|
+ Copies the properties of the passed [page:Frustum frustum] into this one.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Boolean containsPoint]( [page:Vector3 point] )</h3>
|
|
|
+ <h3>[method:Boolean intersectsBox]( [page:Box3 box] )</h3>
|
|
|
<div>
|
|
|
- point -- [page:Vector3] to test
|
|
|
+ [page:Box3 box] - [page:Box3] to check for intersection.<br /><br />
|
|
|
+
|
|
|
+ Return true if [page:Box3 box] intersects with this frustum.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Boolean intersectsObject]( [page:Object3D object] )</h3>
|
|
|
<div>
|
|
|
- Checks to see if the frustum contains the point.
|
|
|
+ Checks whether the [page:Object3D object]'s [page:Geometry.boundingSphere bounding sphere] is intersecting the Frustum.<br /><br />
|
|
|
+
|
|
|
+ Note that the object must have a [page:Geometry] or [page:BufferGeometry] so that the bounding sphere
|
|
|
+ can be calculated.
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Boolean intersectsBox]( [page:Box3 box] )</h3>
|
|
|
+ <h3>[method:Boolean intersectsSphere]( [page:Sphere sphere] )</h3>
|
|
|
<div>
|
|
|
- box -- [page:Box3]
|
|
|
+ [page:Sphere sphere] - [page:Sphere] to check for intersection.<br /><br />
|
|
|
+
|
|
|
+ Return true if [page:Sphere sphere] intersects with this frustum.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Boolean intersectsSprite]( [page:Sprite sprite] )</h3>
|
|
|
<div>
|
|
|
- Check to see if the box intersects with the frustum.
|
|
|
+ Checks whether the [page:Sprite sprite] is intersecting the Frustum.<br /><br />
|
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Boolean intersectsSphere]( [page:Sphere sphere] )</h3>
|
|
|
+ <h3>[method:Frustum set]( [page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5] )</h3>
|
|
|
<div>
|
|
|
- sphere -- [page:Sphere]
|
|
|
+ Sets the current frustum from the passed planes. No plane order is implicitely implied.
|
|
|
</div>
|
|
|
+
|
|
|
+ <h3>[method:Frustum setFromMatrix]( [page:Matrix4 matrix] )</h3>
|
|
|
<div>
|
|
|
- Check to see if the sphere intersects with the frustum.
|
|
|
+ [page:Matrix4 matrix] - [page:Matrix4] used to set the [page:.planes planes]<br /><br />
|
|
|
+
|
|
|
+ This is used by the [page:WebGLRenderer] to set up the Frustum from a [page:Camera Camera's]
|
|
|
+ [page:Camera.projectionMatrix projectionMatrix] and [page:Camera.matrixWorldInverse matrixWorldInverse].
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<h2>Source</h2>
|
|
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|