以原點為中心的球體的描述。
new SphereGeometry(options)
Parameters:
options
(Object)
Name | Description |
---|---|
options.radius
Number
default 1.0
|
球體的半徑。 |
options.stackPartitions
Number
default 64
|
將橢球體分成堆棧的次數。 |
options.slicePartitions
Number
default 64
|
將橢球分割為徑向切片的次數。 |
options.vertexFormat
VertexFormat
default VertexFormat.DEFAULT
|
要計算的頂點屬性。 |
Example
var sphere = new bmgl.SphereGeometry({
radius : 100.0,
vertexFormat : bmgl.VertexFormat.POSITION_ONLY
});
var geometry = bmgl.SphereGeometry.createGeometry(sphere);
Throws
-
DeveloperError : options.slicePartitions不能少于三個。
-
DeveloperError : options.stackpartitions不能少于三個。
- SphereGeometry#createGeometry
See:
Members
(static) packedLength : Number
用于將對象打包到數組中的元素數。
Methods
(static) createGeometry(sphereGeometry) → {Geometry}
計算球體的幾何表示,包括其頂點、索引和邊界球體。
Parameters:
將提供的實例存儲到提供的數組中。
Parameters:
array
(Array.<Number>)
要打包的數組。
startingIndex
(Number)
(default 0
)
數組中開始打包元素的索引。
從壓縮數組中檢索實例。
Parameters:
array
(Array.<Number>)
壓縮數組。
startingIndex
(Number)
(default 0
)
要解包的元素的起始索引。