English中文

Spherical

new Cesium.Spherical(clock, cone, magnitude)

一组曲线 3 维坐标。 A set of curvilinear 3-dimensional coordinates.
名称 Name 类型 Type 默认值 Default 说明 Description
clock number 0.0 可选 optional 位于 xy 平面中从正 x 轴向正 y 轴测量的角坐标。 The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
cone number 0.0 可选 optional 从正 z 轴向负 z 轴测量的角坐标。 The angular coordinate measured from the positive z-axis and toward the negative z-axis.
magnitude number 1.0 可选 optional 从原点测量的线性坐标。 The linear coordinate measured from the origin.

成员 Members

时钟组件。 The clock component.
默认值: Default Value: 0.0
圆锥体分量。 The cone component.
默认值: Default Value: 0.0
幅度分量。 The magnitude component.
默认值: Default Value: 1.0

方法 Methods

static Cesium.Spherical.clone(spherical, result)Spherical

创建球体的副本。 Creates a duplicate of a Spherical.
名称 Name 类型 Type 说明 Description
spherical Spherical 要克隆的球形。 The spherical to clone.
result Spherical 可选 optional 用于存储结果的对象,如果未定义,将创建一个新实例。 The object to store the result into, if undefined a new instance will be created.
返回: Returns:
修改后的结果参数或新实例(如果结果未定义)。 (如果球形未定义,则返回未定义) The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)

static Cesium.Spherical.equals(left, right)boolean

如果第一个球面等于第二个球面,则返回 true,否则返回 false。 Returns true if the first spherical is equal to the second spherical, false otherwise.
名称 Name 类型 Type 说明 Description
left Spherical 可选 optional 要比较的第一个球体。 The first Spherical to be compared.
right Spherical 可选 optional 要比较的第二个球形。 The second Spherical to be compared.
返回: Returns:
如果第一个球面等于第二个球面,则为 true,否则为 false。 true if the first spherical is equal to the second spherical, false otherwise.

static Cesium.Spherical.equalsEpsilon(left, right, epsilon)boolean

如果第一个球面位于第二个球面的指定 epsilon 范围内,则返回 true,否则返回 false。 Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
名称 Name 类型 Type 默认值 Default 说明 Description
left Spherical 要比较的第一个球体。 The first Spherical to be compared.
right Spherical 要比较的第二个球形。 The second Spherical to be compared.
epsilon number 0.0 可选 optional 要比较的 epsilon。 The epsilon to compare against.
返回: Returns:
如果第一个球面位于第二个球面提供的 epsilon 范围内,则为 true,否则为 false。 true if the first spherical is within the provided epsilon of the second spherical, false otherwise.

static Cesium.Spherical.fromCartesian3(cartesian3, result)Spherical

将提供的 Cartesian3 转换为球坐标。 Converts the provided Cartesian3 into Spherical coordinates.
名称 Name 类型 Type 说明 Description
cartesian3 Cartesian3 要转换为 Spherical 的 Cartesian3。 The Cartesian3 to be converted to Spherical.
result Spherical 可选 optional 将存储结果的对象,如果未定义,将创建一个新实例。 The object in which the result will be stored, if undefined a new instance will be created.
返回: Returns:
修改后的结果参数,或新实例(如果未提供)。 The modified result parameter, or a new instance if one was not provided.

static Cesium.Spherical.normalize(spherical, result)Spherical

计算所提供球面的标准化版本。 Computes the normalized version of the provided spherical.
名称 Name 类型 Type 说明 Description
spherical Spherical 要标准化的球面。 The spherical to be normalized.
result Spherical 可选 optional 用于存储结果的对象,如果未定义,将创建一个新实例。 The object to store the result into, if undefined a new instance will be created.
返回: Returns:
修改后的结果参数或新实例(如果结果未定义)。 The modified result parameter or a new instance if result was undefined.
创建此球体的副本。 Creates a duplicate of this Spherical.
名称 Name 类型 Type 说明 Description
result Spherical 可选 optional 用于存储结果的对象,如果未定义,将创建一个新实例。 The object to store the result into, if undefined a new instance will be created.
返回: Returns:
修改后的结果参数或新实例(如果结果未定义)。 The modified result parameter or a new instance if result was undefined.

equals(other)boolean

如果此球面等于提供的球面,则返回 true,否则返回 false。 Returns true if this spherical is equal to the provided spherical, false otherwise.
名称 Name 类型 Type 说明 Description
other Spherical 可选 optional 要比较的球面。 The Spherical to be compared.
返回: Returns:
如果此球面等于提供的球面,则为 true,否则为 false。 true if this spherical is equal to the provided spherical, false otherwise.

equalsEpsilon(other, epsilon)boolean

如果该球面位于所提供球面的 epsilon 范围内,则返回 true,否则返回 false。 Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
名称 Name 类型 Type 说明 Description
other Spherical 要比较的球面。 The Spherical to be compared.
epsilon number 要比较的 epsilon。 The epsilon to compare against.
返回: Returns:
如果该球面位于所提供球面的 epsilon 范围内,则为 true,否则为 false。 true if this spherical is within the provided epsilon of the provided spherical, false otherwise.

toString()string

返回以(时钟、锥体、幅度)格式表示此实例的字符串。 Returns a string representing this instance in the format (clock, cone, magnitude).
返回: Returns:
表示此实例的字符串。 A string representing this instance.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.