描述以原點為中心的多維數據集。
new BoxGeometry(options)
Parameters:
options
(Object)
Name | Description |
---|---|
options.minimum
Cartesian3
|
框的最小X、Y和Z坐標。 |
options.maximum
Cartesian3
|
框的最大X、Y和Z坐標。 |
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計算的頂點屬性。 |
Example
var box = new bmgl.BoxGeometry({
vertexFormat : bmgl.VertexFormat.POSITION_ONLY,
maximum : new bmgl.Cartesian3(250000.0, 250000.0, 250000.0),
minimum : new bmgl.Cartesian3(-250000.0, -250000.0, -250000.0)
});
var geometry = bmgl.BoxGeometry.createGeometry(box);
See:
Members
(static) packedLength : Number
用于將對象打包到數組中的元素數。
Methods
(static) createGeometry(boxGeometry) → {Geometry|undefined}
計算框的幾何表示,包括其頂點、索引和邊界球。
Parameters:
從axisalignedboundingbox的維度創建多維數據集。
Parameters:
Example
var aabb = bmgl.AxisAlignedBoundingBox.fromPoints(bmgl.Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0,
-75.0, 30.0,
-70.0, 30.0,
-68.0, 40.0
]));
var box = bmgl.BoxGeometry.fromAxisAlignedBoundingBox(aabb);
根據給定的尺寸,創建一個以原點為中心的多維數據集。
Parameters:
options
(Object)
Name | Description |
---|---|
options.dimensions
Cartesian3
|
分別存儲在Cartesian3 的x、y和z坐標中的框的寬度、深度和高度。
|
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計算的頂點屬性。 |
Example
var box = bmgl.BoxGeometry.fromDimensions({
vertexFormat : bmgl.VertexFormat.POSITION_ONLY,
dimensions : new bmgl.Cartesian3(500000.0, 500000.0, 500000.0)
});
var geometry = bmgl.BoxGeometry.createGeometry(box);
Throws
-
DeveloperError : 所有維度組件必須大于或等于零。
將提供的實例存儲到提供的數組中。
Parameters:
array
(Array.<Number>)
要打包的數組。
startingIndex
(Number)
(default 0
)
數組中開始打包元素的索引。
從壓縮數組中檢索實例。
Parameters:
array
(Array.<Number>)
壓縮數組。
startingIndex
(Number)
(default 0
)
要解包的元素的起始索引。