new EllipsoidGeometry()
用于定义椭球体几何结构类。
| Name | Type | Default | Description |
|---|---|---|---|
options.radii |
Cartesian3 | Cartesian3(1.0, 1.0, 1.0) |
可选
椭球体在 x、y 和 z 方向上的半径。 |
options.stackPartitions |
Number | 64 |
可选
将椭球体划分为堆栈的次数。 |
options.slicePartitions |
Number | 64 |
可选
将椭球面分割成径向切片的次数。 |
options.vertexFormat |
VertexFormat | VertexFormat.DEFAULT |
可选
要计算的顶点属性。 |
- See:
-
- EllipsoidGeometry#createGeometry
Throws:
-
-
options.slicePartitions 不能少于三个。
- Type
- DeveloperError
-
-
-
options.stackPartitions 不能少于三个。
- Type
- DeveloperError
-
Example
var ellipsoid = new SuperMap3D.EllipsoidGeometry({
vertexFormat : SuperMap3D.VertexFormat.POSITION_ONLY,
radii : new SuperMap3D.Cartesian3(1000000.0, 500000.0, 500000.0)
});
var geometry = SuperMap3D.EllipsoidGeometry.createGeometry(ellipsoid);
Members
-
static packedLengthNumber
-
用于将对象打包到数组中的元素个数。
Methods
-
static createGeometry(ellipsoidGeometry){Geometry|undefined}
-
计算椭球体的几何表示,包括其顶点、索引和包围球。
Name Type Description ellipsoidGeometryEllipsoidGeometry 对椭球体的描述。
Returns:
Type Description Geometry | undefined 计算的顶点和索引。 -
static pack(value, array, startingIndex){Array.<Number>}
-
将提供的实例存储到提供的数组中。
Name Type Default Description valueEllipsoidGeometry 要打包的值。
arrayArray.<Number> 要打包的数组。
startingIndexNumber 0 可选 开始打包元素的数组索引。
Returns:
Type Description Array.<Number> 装入的数组。 -
static unpack(array, startingIndex, result){EllipsoidGeometry}
-
从打包数组中检索实例。
Name Type Default Description arrayArray.<Number> 打包的数组。
startingIndexNumber 0 可选 要解包的元素的起始索引。
resultEllipsoidGeometry 可选 存储结果的对象。
Returns:
Type Description EllipsoidGeometry 修改后的结果参数或新的 EllipsoidGeometry 实例(如果未提供)。