Files
apt-nl-map/static/Magic4/js/three.js-dev/docs/api/zh/math/Frustum.html
2024-12-04 10:21:04 +08:00

108 lines
3.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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] to test.<br /><br />
检测该点 [page:Vector3 point] 是否在视锥体内。
</p>
<h3>[method:Frustum 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>
Note that this method only copies the values from the given objects.
</p>
<h3>[method:this setFromProjectionMatrix]( [param:Matrix4 matrix] )</h3>
<p>
[page:Matrix4 matrix] - Projection [page:Matrix4] used to set the [page:.planes planes]<br /><br />
Sets the frustum planes from the projection matrix.
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>