new Cesium.SphereGeometry(options)

以原点为中心的球体的描述.
Name Type Description
options object optional 下列属性的对象 :
Name Type Default Description
radius number 1.0 optional 球体的半径.
stackPartitions number 64 optional 将椭圆分割成堆的次数.
slicePartitions number 64 optional 将椭圆片分割成射线片的次数.
vertexFormat VertexFormat VertexFormat.DEFAULT optional The vertex attributes to be computed.
Throws:
Example:
const sphere = new Cesium.SphereGeometry({
  radius : 100.0,
  vertexFormat : Cesium.VertexFormat.POSITION_ONLY
});
const geometry = Cesium.SphereGeometry.createGeometry(sphere);
See:
  • SphereGeometry#createGeometry

Members

static Cesium.SphereGeometry.packedLength : number

用于将对象组合成数组的元素数量.

Methods

static Cesium.SphereGeometry.createGeometry(sphereGeometry)Geometry|undefined

计算一个球体的几何表示,包括它的顶点,指数,以及一个边框.
Name Type Description
sphereGeometry SphereGeometry 球体的描述.
Returns:
计算出的顶点和指数.

static Cesium.SphereGeometry.pack(value, array, startingIndex)Array.<number>

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value SphereGeometry 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

static Cesium.SphereGeometry.unpack(array, startingIndex, result)SphereGeometry

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result SphereGeometry optional 存储结果的对象.
Returns:
未提供修改的结果参数或新的球面测量实例.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.