观景浮雕由6架飞机定义.
Each plane is represented by a
Cartesian4 object, where the x, y, and z components
定义平面正常的单位矢量, w 组件是
飞机从原产地/相机位置起飞.
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
具有下列属性的天体:
|
Example:
const frustum = new Cesium.PerspectiveOffCenterFrustum({
left : -1.0,
right : 1.0,
top : 1.0,
bottom : -1.0,
near : 1.0,
far : 100.0
});
See:
Members
定义底部剪贴板.
-
Default Value:
undefined
远方飞机的距离.
-
Default Value:
500000000.0
readonly infiniteProjectionMatrix : Matrix4
用无限远的平面从视图中计算出视角预测矩阵.
定义左剪辑平面.
-
Default Value:
undefined
近机之远.
-
Default Value:
1.0
readonly projectionMatrix : Matrix4
从视图中计算出视角预测矩阵.
如果任何frustum参数有变化,将重新计算预测矩阵.
定义正确的剪辑平面.
-
Default Value:
undefined
定义顶部剪辑平面.
-
Default Value:
undefined
Methods
clone(result) → PerspectiveOffCenterFrustum
返回 PerspectOffCenterFrustum 实例的复制件.
| Name | Type | Description |
|---|---|---|
result |
PerspectiveOffCenterFrustum | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新的 PerspectFrustum 实例 .
computeCullingVolume(position, direction, up) → CullingVolume
为这个 flustum 创建调制音量 .
| Name | Type | Description |
|---|---|---|
position |
Cartesian3 | 眼处. |
direction |
Cartesian3 | 风景方向. |
up |
Cartesian3 | 上升方向. |
Returns:
在给定的位置和方向上,有一个凸起的卷.
Example:
// Check if a bounding volume intersects the frustum.
const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
const intersect = cullingVolume.computeVisibility(boundingVolume);
比较所提供的 PerspectOffCenterFrustum 组件并返回
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
| Name | Type | Description |
|---|---|---|
other |
PerspectiveOffCenterFrustum | optional 右手侧透视OffCenterFrustum. 中国植物物种信息数据库. |
Returns:
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
比较所提供的 PerspectOffCenterFrustum 组件并返回
如果通过绝对或相对耐性测试,
-NT+0+false NT+1+否则.
| Name | Type | Default | Description |
|---|---|---|---|
other |
PerspectiveOffCenterFrustum | 右手侧透视OffCenterFrustum. 中国植物物种信息数据库. | |
relativeEpsilon |
number | 相对epsilon的耐受性用于平等测试. | |
absoluteEpsilon |
number |
相对Epsilon
|
optional 绝对的埃皮西隆耐受性用于平等测试. |
Returns:
NT########################################################### ##################################################################################################################################################################################################.
getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) → Cartesian2
返回像素的宽度和高度,以米计.
| Name | Type | Description |
|---|---|---|
drawingBufferWidth |
number | 绘图缓冲器的宽度 . |
drawingBufferHeight |
number | 绘画缓冲器的高度. |
distance |
number | 距离近机以米计. |
pixelRatio |
number | 从像素空间到协调空间的缩放因子. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
The modified result parameter or a new instance of
Cartesian2 with the pixel's width and height in the x and y properties, respectively.
Throws:
-
DeveloperError : drawingBufferWidth must be greater than zero.
-
DeveloperError : drawingBufferHeight must be greater than zero.
-
DeveloperError : pixelRatio must be greater than zero.
Examples:
// Example 1
// Get the width and height of a pixel.
const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
// Example 2
// Get the width and height of a pixel if the near plane was set to 'distance'.
// For example, get the size of a pixel of an image on a billboard.
const position = camera.position;
const direction = camera.direction;
const toCenter = Cesium.Cartesian3.subtract(primitive.boundingVolume.center, position, new Cesium.Cartesian3()); // vector from camera to a primitive
const toCenterProj = Cesium.Cartesian3.multiplyByScalar(direction, Cesium.Cartesian3.dot(direction, toCenter), new Cesium.Cartesian3()); // project vector onto camera direction vector
const distance = Cesium.Cartesian3.magnitude(toCenterProj);
const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, scene.pixelRatio, new Cesium.Cartesian2());