国产久_亚欧精品一区_久久亚洲美女_99精品在线观看_日韩成人三级_久久精品久久久久

PerspectiveFrustum

視錐由6個平面定義。每個平面由一個Cartesian4對象表示,其中X、Y和Z分量定義垂直于平面的單位向量,而W分量是平面與原點/相機位置之間的距離。
new PerspectiveFrustum(options)
Parameters:
options (Object) 一個
Name Description
options.fov
Number
視場的角度(FOV),以弧度表示。
options.aspectRatio
Number
截錐的寬度和高度的縱橫比。
options.near
Number
default 1.0
近平面的距離。
options.far
Number
default 500000000.0
遠平面的距離。
options.xOffset
Number
default 0.0
X方向的偏移量。
options.yOffset
Number
default 0.0
Y方向的偏移。
Example
var frustum = new bmgl.PerspectiveFrustum({
    fov : bmgl.Math.PI_OVER_THREE,
    aspectRatio : canvas.clientWidth / canvas.clientHeight
    near : 1.0,
    far : 1000.0
});
See:

Members

(static) packedLength : Number

用于將對象打包到數組中的元素數。

aspectRatio : Number

截錐的寬度和高度的縱橫比。
Default Value: undefined

far : Number

遠平面的距離。
Default Value: 500000000.0

fov : Number

視場的角度(FOV),以弧度表示。如果寬度大于高度,此角度將用作水平視野,否則將用作垂直視野。
Default Value: undefined

(readonly) fovy : Number

獲取垂直視野的角度(以弧度為單位)。
Default Value: undefined

(readonly) infiniteProjectionMatrix : Matrix4

從具有無限遠平面的視錐計算出的透視投影矩陣。
See:

near : Number

近平面的距離。
Default Value: 1.0

(readonly) projectionMatrix : Matrix4

獲取從視圖截錐計算的透視投影矩陣。
See:

xOffset : Number

沿X方向偏移截錐。
Default Value: 0.0

yOffset : Number

沿Y方向偏移截錐。
Default Value: 0.0

Methods

(static) pack(value, array, startingIndex) → {Array.<Number>}
將提供的實例存儲到提供的數組中。
Parameters:
value (PerspectiveFrustum) 要打包的值。
array (Array.<Number>) 要打包的數組。
startingIndex (Number) (default 0) 數組中開始打包元素的索引。
(static) unpack(array, startingIndex, result) → {PerspectiveFrustum}
從壓縮數組中檢索實例。
Parameters:
array (Array.<Number>) 壓縮數組。
startingIndex (Number) (default 0) 要解包的元素的起始索引。
result (PerspectiveFrustum) 存儲結果的對象。
clone(result) → {PerspectiveFrustum}
返回透視截錐實例的副本。
Parameters:
result (PerspectiveFrustum) 存儲結果的對象。
computeCullingVolume(position, direction, up) → {CullingVolume}
為此截錐創建剔除體積。
Parameters:
position (Cartesian3) 眼睛的位置。
direction (Cartesian3) 視圖方向。
up (Cartesian3) 向上方向。
Example
// Check if a bounding volume intersects the frustum.
var cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
var intersect = cullingVolume.computeVisibility(boundingVolume);
equals(other) → {Boolean}
比較所提供的透視截錐組件,如果相等則返回true,否則返回false
Parameters:
other (PerspectiveFrustum) 右手側透視截錐。
equalsEpsilon(other, relativeEpsilon, absoluteEpsilon) → {Boolean}
比較提供的透視截錐組件,如果通過絕對或相對公差測試,則返回true,否則返回false
Parameters:
other (PerspectiveFrustum) 右手側透視截錐。
relativeEpsilon (Number) 用于等同性測試的相對epsilon公差。
absoluteEpsilon (Number) (default relativeEpsilon) 用于等同性測試的絕對epsilon公差。
getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, pixelRatio, result) → {Cartesian2}
返回像素的寬度和高度(以米為單位)。
Parameters:
drawingBufferWidth (Number) 繪圖緩沖區的寬度。
drawingBufferHeight (Number) 繪圖緩沖區的高度。
distance (Number) 到近平面的距離,單位為米。
pixelRatio (Number) 從像素空間到坐標空間的比例因子。
result (Cartesian2) 存儲結果的對象。
Examples
// Example 1
// Get the width and height of a pixel.
var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new bmgl.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.
var position = camera.position;
var direction = camera.direction;
var toCenter = bmgl.Cartesian3.subtract(primitive.boundingVolume.center, position, new bmgl.Cartesian3());      // vector from camera to a primitive
var toCenterProj = bmgl.Cartesian3.multiplyByScalar(direction, bmgl.Cartesian3.dot(direction, toCenter), new bmgl.Cartesian3()); // project vector onto camera direction vector
var distance = bmgl.Cartesian3.magnitude(toCenterProj);
var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, scene.pixelRatio, new bmgl.Cartesian2());
Throws
主站蜘蛛池模板: 一区麻豆 | 天堂综合 | 全部孕妇毛片免费孕妇 | 91精品在线观看视频 | 靠逼久久| 黄色三级网站在线观看 | 不卡一区在线 | 丝袜塞逼| 欧美三级视频在线观看 | yourporn久久国产精品 | 一区二区三区精品 | 色香蕉在线 | 久久久久二区 | 亚洲最大成人综合 | 欧美一级在线免费观看 | 99国产在线拍91揄自揄视 | 二区天堂中文最新版在线 | 成人国产精品免费观看视频 | 狠狠躁夜夜躁人人爽蜜桃 | 日韩理论电影在线观看 | 伊人逼逼 | 99久久久国产精品 | 91麻豆精品国产91久久久使用方法 | 国产黄色片在线观看 | 国产成人片 | 日韩一二三四区 | 天天爱天天操 | 成人毛片区 | 麻豆电影在线播放 | 中文字幕一级毛片 | 亚洲日韩中文字幕一区 | 亚洲一区免费 | 亚洲天堂一二三 | 一级午夜 | 91精品啪在线观看国产爱臀 | 日本三级网站在线观看 | 免费三级电影网 | 成人韩免费网站 | 好吊在线视频 | 日本一区二区视频在线播放 | 91精品对白刺激国产在线 |