Skip to content

KBE3D / KBCore / Cesium / CylinderOutlineGeometry

类: CylinderOutlineGeometry

A description of the outline of a cylinder.

示例

ts
// create cylinder geometry
const cylinder = new Cesium.CylinderOutlineGeometry({
    length: 200000,
    topRadius: 80000,
    bottomRadius: 200000,
});
const geometry = Cesium.CylinderOutlineGeometry.createGeometry(cylinder);

参数

Object with the following properties:

参数

The length of the cylinder.

参数

The radius of the top of the cylinder.

参数

The radius of the bottom of the cylinder.

参数

The number of edges around the perimeter of the cylinder.

参数

Number of lines to draw between the top and bottom surfaces of the cylinder.

属性

packedLength

static packedLength: number

The number of elements used to pack the object into an array.

方法

pack()

static pack(value: CylinderOutlineGeometry, array: number[], startingIndex?: number): number[]

Stores the provided instance into the provided array.

参数

value

CylinderOutlineGeometry

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()

static unpack(array: number[], startingIndex?: number, result?: CylinderOutlineGeometry): CylinderOutlineGeometry

Retrieves an instance from a packed array.

参数

array

number[]

The packed array.

startingIndex?

number

The starting index of the element to be unpacked.

result?

CylinderOutlineGeometry

The object into which to store the result.

返回

CylinderOutlineGeometry

The modified result parameter or a new CylinderOutlineGeometry instance if one was not provided.


createGeometry()

static createGeometry(cylinderGeometry: CylinderOutlineGeometry): Geometry | undefined

Computes the geometric representation of an outline of a cylinder, including its vertices, indices, and a bounding sphere.

参数

cylinderGeometry

CylinderOutlineGeometry

A description of the cylinder outline.

返回

Geometry | undefined

The computed vertices and indices.

构造函数

构造函数

new CylinderOutlineGeometry(options: { length: number; topRadius: number; bottomRadius: number; slices?: number; numberOfVerticalLines?: number; }): CylinderOutlineGeometry

参数

options
length

number

topRadius

number

bottomRadius

number

slices?

number

numberOfVerticalLines?

number

返回

CylinderOutlineGeometry

KBE3D @3.0.0 Copyright © 2024-present KBE3D