Skip to content

KBE3D / KBCore / Cesium / Spherical

类: Spherical

A set of curvilinear 3-dimensional coordinates.

参数

The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.

参数

The angular coordinate measured from the positive z-axis and toward the negative z-axis.

参数

The linear coordinate measured from the origin.

属性

clock

clock: number

The clock component.


cone

cone: number

The cone component.


magnitude

magnitude: number

The magnitude component.

方法

fromCartesian3()

static fromCartesian3(cartesian3: Cartesian3, result?: Spherical): Spherical

Converts the provided Cartesian3 into Spherical coordinates.

参数

cartesian3

Cartesian3

The Cartesian3 to be converted to Spherical.

result?

Spherical

The object in which the result will be stored, if undefined a new instance will be created.

返回

Spherical

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


clone()

static clone(spherical: Spherical, result?: Spherical): Spherical

Creates a duplicate of a Spherical.

参数

spherical

Spherical

The spherical to clone.

result?

Spherical

The object to store the result into, if undefined a new instance will be created.

返回

Spherical

The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)


normalize()

static normalize(spherical: Spherical, result?: Spherical): Spherical

Computes the normalized version of the provided spherical.

参数

spherical

Spherical

The spherical to be normalized.

result?

Spherical

The object to store the result into, if undefined a new instance will be created.

返回

Spherical

The modified result parameter or a new instance if result was undefined.


equals()

static equals(left?: Spherical, right?: Spherical): boolean

Returns true if the first spherical is equal to the second spherical, false otherwise.

参数

left?

Spherical

The first Spherical to be compared.

Spherical

The second Spherical to be compared.

返回

boolean

true if the first spherical is equal to the second spherical, false otherwise.


equalsEpsilon()

static equalsEpsilon(left: Spherical, right: Spherical, epsilon?: number): boolean

Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.

参数

left

Spherical

The first Spherical to be compared.

right

Spherical

The second Spherical to be compared.

epsilon?

number

The epsilon to compare against.

返回

boolean

true if the first spherical is within the provided epsilon of the second spherical, false otherwise.


equals()

equals(other?: Spherical): boolean

Returns true if this spherical is equal to the provided spherical, false otherwise.

参数

other?

Spherical

The Spherical to be compared.

返回

boolean

true if this spherical is equal to the provided spherical, false otherwise.


clone()

clone(result?: Spherical): Spherical

Creates a duplicate of this Spherical.

参数

result?

Spherical

The object to store the result into, if undefined a new instance will be created.

返回

Spherical

The modified result parameter or a new instance if result was undefined.


equalsEpsilon()

equalsEpsilon(other: Spherical, epsilon: number): boolean

Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.

参数

other

Spherical

The Spherical to be compared.

epsilon

number

The epsilon to compare against.

返回

boolean

true if this spherical is within the provided epsilon of the provided spherical, false otherwise.


toString()

toString(): string

Returns a string representing this instance in the format (clock, cone, magnitude).

返回

string

A string representing this instance.

构造函数

构造函数

new Spherical(clock?: number, cone?: number, magnitude?: number): Spherical

参数

clock?

number

cone?

number

magnitude?

number

返回

Spherical

KBE3D @3.0.0 Copyright © 2024-present KBE3D