Appearance
KBE3D / KBCore / Cesium / SphereGeometry
类: SphereGeometry
A description of a sphere centered at the origin.
示例
ts
const sphere = new Cesium.SphereGeometry({
radius : 100.0,
vertexFormat : Cesium.VertexFormat.POSITION_ONLY
});
const geometry = Cesium.SphereGeometry.createGeometry(sphere);参数
Object with the following properties:
参数
The radius of the sphere.
参数
The number of times to partition the ellipsoid into stacks.
参数
The number of times to partition the ellipsoid into radial slices.
参数
The vertex attributes to be computed.
属性
packedLength
staticpackedLength:number
The number of elements used to pack the object into an array.
方法
pack()
staticpack(value:SphereGeometry,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
SphereGeometry
The value to pack.
array
number[]
The array to pack into.
startingIndex?
number
The index into the array at which to start packing the elements.
返回
number[]
The array that was packed into
unpack()
staticunpack(array:number[],startingIndex?:number,result?:SphereGeometry):SphereGeometry
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
SphereGeometry
The object into which to store the result.
返回
SphereGeometry
The modified result parameter or a new SphereGeometry instance if one was not provided.
createGeometry()
staticcreateGeometry(sphereGeometry:SphereGeometry):Geometry|undefined
Computes the geometric representation of a sphere, including its vertices, indices, and a bounding sphere.
参数
sphereGeometry
SphereGeometry
A description of the sphere.
返回
Geometry | undefined
The computed vertices and indices.
构造函数
构造函数
new SphereGeometry(
options?: {radius?:number;stackPartitions?:number;slicePartitions?:number;vertexFormat?:VertexFormat; }):SphereGeometry
参数
options?
radius?
number
stackPartitions?
number
slicePartitions?
number
vertexFormat?
返回
SphereGeometry
