You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
3.4 KiB
107 lines
3.4 KiB
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<base href="../../../" />
|
|
<script src="page.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
|
</head>
|
|
<body>
|
|
<h1>视锥体([name])</h1>
|
|
|
|
<p class="desc">
|
|
[link:http://en.wikipedia.org/wiki/Frustum Frustums] 用于确定相机视野内的东西。
|
|
它有助于加速渲染过程——位于摄像机视锥体外的物体可以安全地排除在渲染之外。<br /><br />
|
|
|
|
该类主要用于渲染器内部计算 [page:Camera camera] 或 [page:LightShadow.camera shadowCamera]的视锥体。
|
|
</p>
|
|
|
|
|
|
<h2>构造器(Constructor)</h2>
|
|
|
|
|
|
<h3>[name]([param:Plane p0], [param:Plane p1], [param:Plane p2], [param:Plane p3], [param:Plane p4], [param:Plane p5])</h3>
|
|
<p>
|
|
[page:Plane p0] - (可选参数) [page:Plane].<br />
|
|
[page:Plane p1] - (可选参数) [page:Plane].<br />
|
|
[page:Plane p2] - (可选参数) [page:Plane].<br />
|
|
[page:Plane p3] - (可选参数) [page:Plane].<br />
|
|
[page:Plane p4] - (可选参数) [page:Plane].<br />
|
|
[page:Plane p5] - (可选参数) [page:Plane].<br /><br />
|
|
|
|
使用6个面来构建一个视锥体。
|
|
</p>
|
|
|
|
|
|
<h2>属性(Properties)</h2>
|
|
|
|
<h3>[property:Array planes]</h3>
|
|
<p>包含6个平面 [page:Plane planes] 的数组。</p>
|
|
|
|
|
|
<h2>方法(Methods)</h2>
|
|
|
|
<h3>[method:Frustum clone]()</h3>
|
|
<p>返回一个与当前对象有相同参数的视锥体。</p>
|
|
|
|
|
|
<h3>[method:Boolean containsPoint]( [param:Vector3 point] )</h3>
|
|
<p>
|
|
[page:Vector3 point] - [page:Vector3] 被检测的点。<br /><br />
|
|
|
|
检测该点 [page:Vector3 point] 是否在视锥体内。
|
|
</p>
|
|
|
|
<h3>[method:this copy]( [param:Frustum frustum] )</h3>
|
|
<p>
|
|
[page:Frustum frustum] - 用于拷贝的视锥体。<br /><br />
|
|
|
|
将传入 [page:Frustum frustum] 的属性拷贝到当前对象。
|
|
</p>
|
|
|
|
<h3>[method:Boolean intersectsBox]( [param:Box3 box] )</h3>
|
|
<p>
|
|
[page:Box3 box] - [page:Box3] 用于检测是否要交的包围盒。<br /><br />
|
|
|
|
返回 true 如果该 [page:Box3 box] 与视锥体相交。
|
|
</p>
|
|
|
|
<h3>[method:Boolean intersectsObject]( [param:Object3D object] )</h3>
|
|
<p>
|
|
检测 [page:Object3D object] 的包围球 [page:BufferGeometry.boundingSphere bounding sphere] 是否与视锥体相交。<br /><br />
|
|
|
|
注意:该对象必须有一个 [page:BufferGeometry] ,因为这样才能计算出包围球。
|
|
</p>
|
|
|
|
<h3>[method:Boolean intersectsSphere]( [param:Sphere sphere] )</h3>
|
|
<p>
|
|
[page:Sphere sphere] - [page:Sphere] 用于检查是否相交。<br /><br />
|
|
|
|
返回true 如果球[page:Sphere sphere]与视锥体相交。
|
|
</p>
|
|
|
|
<h3>[method:Boolean intersectsSprite]( [param:Sprite sprite] )</h3>
|
|
<p>
|
|
检查精灵[page:Sprite sprite]是否与截锥体相交。<br /><br />
|
|
</p>
|
|
|
|
<h3>[method:this set]( [param:Plane p0], [param:Plane p1], [param:Plane p2], [param:Plane p3], [param:Plane p4], [param:Plane p5] )</h3>
|
|
<p>
|
|
从传入的平面设置当前视锥体。没有隐式的顺序。<br>
|
|
请注意,此方法仅复制给定对象的值。
|
|
</p>
|
|
|
|
<h3>[method:this setFromProjectionMatrix]( [param:Matrix4 matrix] )</h3>
|
|
<p>
|
|
[page:Matrix4 matrix] - 投影矩阵 [page:Matrix4] 会被用来设置该视椎体的 [page:.planes planes]<br /><br />
|
|
根据投影矩阵 matrix 来设置当前视椎体的六个面。
|
|
</p>
|
|
|
|
|
|
<h2>Source</h2>
|
|
|
|
<p>
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
</p>
|
|
</body>
|
|
</html>
|
|
|