Class: FrustumGeometry

FrustumGeometry

new FrustumGeometry()

用于描述视锥体几何结构类。

Name Type Default Description
options.frustum PerspectiveFrustum | OrthographicFrustum

视锥体。

options.origin Cartesian3

视锥体的原点。

options.orientation Quaternion

视锥体的方向。

options.vertexFormat VertexFormat VertexFormat.DEFAULT 可选

待计算的顶点属性。

Members

packedLengthNumber

将对象打包为数组时所需的元素数量。

Methods

static createGeometry(frustumGeometry){Geometry|undefined}

计算视椎体的几何表示,包括顶点坐标、索引数组及包围球。

Name Type Description
frustumGeometry FrustumGeometry

视椎体的描述。

Returns:
Type Description
Geometry | undefined 计算出的顶点和索引。

static pack(value, array, startingIndex){Array.<Number>}

将提供的实例存储到指定的数组中。

Name Type Default Description
value FrustumGeometry

要打包的实例。

array Array.<Number>

用于存储打包数据的目标数组。

startingIndex Number 0 可选

开始打包元素的起始索引。

Returns:
Type Description
Array.<Number> 被打包的数组。

static unpack(array, startingIndex, result)

从打包后的数组中解包实例。

Name Type Default Description
array Array.<Number>

要打包的数组。

startingIndex Number 0 可选

待解包元素的起始索引。

result FrustumGeometry 可选

存储计算结果的目标对象。