| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
x |
number |
0.0
|
可选 optional X 分量。 The X component. |
y |
number |
0.0
|
可选 optional Y 分量。 The Y component. |
z |
number |
0.0
|
可选 optional Z 分量。 The Z component. |
另见: See:
成员 Members
X 分量。 The X component.
-
默认值: Default Value:
0.0
Y 分量。 The Y component.
-
默认值: Default Value:
0.0
Z 分量。 The Z component.
-
默认值: Default Value:
0.0
static constant Cesium.Cartesian3.ONE : Cartesian3
一个不可变的 Cartesian3 实例初始化为 (1.0, 1.0, 1.0)。 An immutable Cartesian3 instance initialized to (1.0, 1.0, 1.0).
用于将对象打包到数组中的元素数量。 The number of elements used to pack the object into an array.
static constant Cesium.Cartesian3.UNIT_X : Cartesian3
一个不可变的 Cartesian3 实例初始化为 (1.0, 0.0, 0.0)。 An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
static constant Cesium.Cartesian3.UNIT_Y : Cartesian3
一个不可变的 Cartesian3 实例初始化为 (0.0, 1.0, 0.0)。 An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
static constant Cesium.Cartesian3.UNIT_Z : Cartesian3
一个不可变的 Cartesian3 实例初始化为 (0.0, 0.0, 1.0)。 An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
static constant Cesium.Cartesian3.ZERO : Cartesian3
一个不可变的 Cartesian3 实例初始化为 (0.0, 0.0, 0.0)。 An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
方法 Methods
clone(result) → Cartesian3
复制此 Cartesian3 实例。 Duplicates this Cartesian3 instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 The modified result parameter or a new Cartesian3 instance if one was not provided.
将此笛卡尔与提供的笛卡尔分量进行比较并返回 Compares this Cartesian against the provided Cartesian componentwise and returns
true 如果它们相等, if they are equal, false otherwise.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
right |
Cartesian3 | 可选 optional 右手边笛卡尔。 The right hand side Cartesian. |
返回: Returns:
true 如果它们相等, if they are equal, false otherwise.
将此笛卡尔与提供的笛卡尔分量进行比较并返回 Compares this Cartesian against the provided Cartesian componentwise and returns
true 如果他们通过了绝对或相对耐受性测试, if they pass an absolute or relative tolerance test,
false otherwise.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
right |
Cartesian3 | 可选 optional 右手边笛卡尔。 The right hand side Cartesian. | |
relativeEpsilon |
number |
0
|
可选 optional 用于相等性测试的相对 epsilon 容差。 The relative epsilon tolerance to use for equality testing. |
absoluteEpsilon |
number |
relativeEpsilon
|
可选 optional 用于相等性测试的绝对 epsilon 容差。 The absolute epsilon tolerance to use for equality testing. |
返回: Returns:
true 如果它们在提供的 epsilon 范围内, if they are within the provided epsilon, false otherwise.
创建一个以“(x, y, z)”格式表示该笛卡尔坐标的字符串。 Creates a string representing this Cartesian in the format '(x, y, z)'.
返回: Returns:
以“(x, y, z)”格式表示此笛卡尔坐标的字符串。 A string representing this Cartesian in the format '(x, y, z)'.
static Cesium.Cartesian3.abs(cartesian, result) → Cartesian3
计算提供的笛卡尔坐标的绝对值。 Computes the absolute value of the provided Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要计算其绝对值的笛卡尔坐标。 The Cartesian whose absolute value is to be computed. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
static Cesium.Cartesian3.add(left, right, result) → Cartesian3
计算两个笛卡尔坐标的分量和。 Computes the componentwise sum of two Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
返回所提供的笛卡尔坐标之间的角度(以弧度为单位)。 Returns the angle, in radians, between the provided Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
返回: Returns:
笛卡尔坐标之间的角度。 The angle between the Cartesians.
static Cesium.Cartesian3.clamp(value, min, max, result) → Cartesian3
将一个值限制在两个值之间。 Constrain a value to lie between two values.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
value |
Cartesian3 | 要钳位的值。 The value to clamp. |
min |
Cartesian3 | 最小界限。 The minimum bound. |
max |
Cartesian3 | 最大界限。 The maximum bound. |
result |
Cartesian3 | 用于存储结果的对象。 The object into which to store the result. |
返回: Returns:
钳位值使得最小值 The clamped value such that min <= value <= max.
static Cesium.Cartesian3.clone(cartesian, result) → Cartesian3
复制 Cartesian3 实例。 Duplicates a Cartesian3 instance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要复制的笛卡尔坐标。 The Cartesian to duplicate. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 (如果笛卡尔未定义,则返回未定义) The modified result parameter or a new Cartesian3 instance if one was not provided. (Returns undefined if cartesian is undefined)
static Cesium.Cartesian3.cross(left, right, result) → Cartesian3
计算两个笛卡尔坐标的叉(外)积。 Computes the cross (outer) product of two Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
叉积。 The cross product.
计算两点之间的距离。 Computes the distance between two points.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 计算距离的第一个点。 The first point to compute the distance from. |
right |
Cartesian3 | 要计算到的距离的第二个点。 The second point to compute the distance to. |
返回: Returns:
两点之间的距离。 The distance between two points.
示例: Example:
// Returns 1.0
const d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0));
计算两点之间的平方距离。使用此函数比较平方距离比使用以下函数比较距离更有效 Computes the squared distance between two points. Comparing squared distances using this function is more efficient than comparing distances using
Cartesian3#distance.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 计算距离的第一个点。 The first point to compute the distance from. |
right |
Cartesian3 | 要计算到的距离的第二个点。 The second point to compute the distance to. |
返回: Returns:
两点之间的距离。 The distance between two points.
示例: Example:
// Returns 4.0, not 2.0
const d = Cesium.Cartesian3.distanceSquared(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(3.0, 0.0, 0.0));
static Cesium.Cartesian3.divideByScalar(cartesian, scalar, result) → Cartesian3
将提供的笛卡尔分量除以提供的标量。 Divides the provided Cartesian componentwise by the provided scalar.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 笛卡尔坐标系要除。 The Cartesian to be divided. |
scalar |
number | 要除以的标量。 The scalar to divide by. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
static Cesium.Cartesian3.divideComponents(left, right, result) → Cartesian3
计算两个笛卡尔坐标的分量商。 Computes the componentwise quotient of two Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
计算两个笛卡尔的点(标量)积。 Computes the dot (scalar) product of two Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
返回: Returns:
点积。 The dot product.
按组件比较提供的笛卡尔坐标并返回 Compares the provided Cartesians componentwise and returns
true 如果它们相等, if they are equal, false otherwise.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 可选 optional 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 可选 optional 第二个笛卡尔。 The second Cartesian. |
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
按组件比较提供的笛卡尔坐标并返回 Compares the provided Cartesians componentwise and returns
true 如果他们通过了绝对或相对耐受性测试, if they pass an absolute or relative tolerance test,
false otherwise.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
left |
Cartesian3 | 可选 optional 第一个笛卡尔。 The first Cartesian. | |
right |
Cartesian3 | 可选 optional 第二个笛卡尔。 The second Cartesian. | |
relativeEpsilon |
number |
0
|
可选 optional 用于相等性测试的相对 epsilon 容差。 The relative epsilon tolerance to use for equality testing. |
absoluteEpsilon |
number |
relativeEpsilon
|
可选 optional 用于相等性测试的绝对 epsilon 容差。 The absolute epsilon tolerance to use for equality testing. |
返回: Returns:
true 如果 left 和 right 在提供的 epsilon 范围内, if left and right are within the provided epsilon, false otherwise.
static Cesium.Cartesian3.fromArray(array, startingIndex, result) → Cartesian3
从数组中的三个连续元素创建 Cartesian3。 Creates a Cartesian3 from three consecutive elements in an array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
array |
Array.<number> | 三个连续元素分别对应于 x、y 和 z 分量的数组。 The array whose three consecutive elements correspond to the x, y, and z components, respectively. | |
startingIndex |
number |
0
|
可选 optional 第一个元素在数组中的偏移量,对应于 x 分量。 The offset into the array of the first element, which corresponds to the x component. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 The modified result parameter or a new Cartesian3 instance if one was not provided.
示例: Example:
// Create a Cartesian3 with (1.0, 2.0, 3.0)
const v = [1.0, 2.0, 3.0];
const p = Cesium.Cartesian3.fromArray(v);
// Create a Cartesian3 with (1.0, 2.0, 3.0) using an offset into an array
const v2 = [0.0, 0.0, 1.0, 2.0, 3.0];
const p2 = Cesium.Cartesian3.fromArray(v2, 2);
static Cesium.Cartesian3.fromCartesian4(cartesian, result) → Cartesian3
从现有 Cartesian4 创建 Cartesian3 实例。这只是采用 Cartesian4 的 x、y 和 z 属性并删除 w。 Creates a Cartesian3 instance from an existing Cartesian4. This simply takes the x, y, and z properties of the Cartesian4 and drops w.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian4 | 用于创建 Cartesian3 实例的 Cartesian4 实例。 The Cartesian4 instance to create a Cartesian3 instance from. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 The modified result parameter or a new Cartesian3 instance if one was not provided.
static Cesium.Cartesian3.fromDegrees(longitude, latitude, height, ellipsoid, result) → Cartesian3
根据以度为单位给出的经度和纬度值返回 Cartesian3 位置。 Returns a Cartesian3 position from longitude and latitude values given in degrees.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
longitude |
number | 经度(以度为单位) The longitude, in degrees | |
latitude |
number | 纬度,以度为单位 The latitude, in degrees | |
height |
number |
0.0
|
可选 optional 椭球体上方的高度(以米为单位)。 The height, in meters, above the ellipsoid. |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 位置所在的椭球体。 The ellipsoid on which the position lies. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
位置 The position
示例: Example:
const position = Cesium.Cartesian3.fromDegrees(-115.0, 37.0);
static Cesium.Cartesian3.fromDegreesArray(coordinates, ellipsoid, result) → Array.<Cartesian3>
给定以度为单位的经度和纬度值数组,返回 Cartesian3 位置数组。 Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
coordinates |
Array.<number> | 经度和纬度值的列表。值交替[经度、纬度、经度、纬度...]。 A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...]. | |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 坐标所在的椭球体。 The ellipsoid on which the coordinates lie. |
result |
Array.<Cartesian3> | 可选 optional 用于存储结果的 Cartesian3 对象数组。 An array of Cartesian3 objects to store the result. |
返回: Returns:
位置数组。 The array of positions.
示例: Example:
const positions = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -107.0, 33.0]);
static Cesium.Cartesian3.fromDegreesArrayHeights(coordinates, ellipsoid, result) → Array.<Cartesian3>
给定经度、纬度和高度值数组,返回笛卡尔 3 位置数组,其中经度和纬度以度为单位。 Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
coordinates |
Array.<number> | 经度、纬度和高度值的列表。值交替[经度、纬度、高度、经度、纬度、高度...]。 A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...]. | |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 位置所在的椭球体。 The ellipsoid on which the position lies. |
result |
Array.<Cartesian3> | 可选 optional 用于存储结果的 Cartesian3 对象数组。 An array of Cartesian3 objects to store the result. |
返回: Returns:
位置数组。 The array of positions.
示例: Example:
const positions = Cesium.Cartesian3.fromDegreesArrayHeights([-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0]);
static Cesium.Cartesian3.fromElements(x, y, z, result) → Cartesian3
从 x、y 和 z 坐标创建 Cartesian3 实例。 Creates a Cartesian3 instance from x, y and z coordinates.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
x |
number | x 坐标。 The x coordinate. |
y |
number | y 坐标。 The y coordinate. |
z |
number | z 坐标。 The z coordinate. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 The modified result parameter or a new Cartesian3 instance if one was not provided.
static Cesium.Cartesian3.fromRadians(longitude, latitude, height, ellipsoid, result) → Cartesian3
根据以弧度给出的经度和纬度值返回 Cartesian3 位置。 Returns a Cartesian3 position from longitude and latitude values given in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
longitude |
number | 经度,以弧度为单位 The longitude, in radians | |
latitude |
number | 纬度,以弧度为单位 The latitude, in radians | |
height |
number |
0.0
|
可选 optional 椭球体上方的高度(以米为单位)。 The height, in meters, above the ellipsoid. |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 位置所在的椭球体。 The ellipsoid on which the position lies. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
位置 The position
示例: Example:
const position = Cesium.Cartesian3.fromRadians(-2.007, 0.645);
static Cesium.Cartesian3.fromRadiansArray(coordinates, ellipsoid, result) → Array.<Cartesian3>
给定以弧度给出的经度和纬度值数组,返回 Cartesian3 位置数组。 Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
coordinates |
Array.<number> | 经度和纬度值的列表。值交替[经度、纬度、经度、纬度...]。 A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...]. | |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 坐标所在的椭球体。 The ellipsoid on which the coordinates lie. |
result |
Array.<Cartesian3> | 可选 optional 用于存储结果的 Cartesian3 对象数组。 An array of Cartesian3 objects to store the result. |
返回: Returns:
位置数组。 The array of positions.
示例: Example:
const positions = Cesium.Cartesian3.fromRadiansArray([-2.007, 0.645, -1.867, .575]);
static Cesium.Cartesian3.fromRadiansArrayHeights(coordinates, ellipsoid, result) → Array.<Cartesian3>
给定经度、纬度和高度值数组,返回笛卡尔 3 位置数组,其中经度和纬度以弧度给出。 Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
coordinates |
Array.<number> | 经度、纬度和高度值的列表。值交替[经度、纬度、高度、经度、纬度、高度...]。 A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...]. | |
ellipsoid |
Ellipsoid |
Ellipsoid.default
|
可选 optional 位置所在的椭球体。 The ellipsoid on which the position lies. |
result |
Array.<Cartesian3> | 可选 optional 用于存储结果的 Cartesian3 对象数组。 An array of Cartesian3 objects to store the result. |
返回: Returns:
位置数组。 The array of positions.
示例: Example:
const positions = Cesium.Cartesian3.fromRadiansArrayHeights([-2.007, 0.645, 100000.0, -1.867, .575, 150000.0]);
static Cesium.Cartesian3.fromSpherical(spherical, result) → Cartesian3
将提供的 Spherical 坐标转换为 Cartesian3 坐标。 Converts the provided Spherical into Cartesian3 coordinates.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
spherical |
Spherical | 要转换为 Cartesian3 的 Spherical。 The Spherical to be converted to Cartesian3. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 The modified result parameter or a new Cartesian3 instance if one was not provided.
static Cesium.Cartesian3.lerp(start, end, t, result) → Cartesian3
使用提供的笛卡尔计算 t 处的线性插值或外推。 Computes the linear interpolation or extrapolation at t using the provided cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
start |
Cartesian3 | 对应于 0.0 处 t 的值。 The value corresponding to t at 0.0. |
end |
Cartesian3 | 对应于 1.0 时 t 的值。 The value corresponding to t at 1.0. |
t |
number | 沿 t 进行插值的点。 The point along t at which to interpolate. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
计算笛卡尔量值(长度)。 Computes the Cartesian's magnitude (length).
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要计算其大小的笛卡尔实例。 The Cartesian instance whose magnitude is to be computed. |
返回: Returns:
幅度。 The magnitude.
计算提供的笛卡尔平方幅值。 Computes the provided Cartesian's squared magnitude.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要计算其平方大小的笛卡尔实例。 The Cartesian instance whose squared magnitude is to be computed. |
返回: Returns:
幅度的平方。 The squared magnitude.
static Cesium.Cartesian3.maximumByComponent(first, second, result) → Cartesian3
比较两个笛卡尔坐标并计算包含所提供笛卡尔坐标的最大分量的笛卡尔坐标。 Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
first |
Cartesian3 | 进行比较的笛卡尔坐标。 A cartesian to compare. |
second |
Cartesian3 | 进行比较的笛卡尔坐标。 A cartesian to compare. |
result |
Cartesian3 | 用于存储结果的对象。 The object into which to store the result. |
返回: Returns:
具有最大分量的笛卡尔坐标。 A cartesian with the maximum components.
计算所提供的笛卡尔坐标的最大分量的值。 Computes the value of the maximum component for the supplied Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要使用的笛卡尔坐标。 The cartesian to use. |
返回: Returns:
最大分量的值。 The value of the maximum component.
static Cesium.Cartesian3.midpoint(left, right, result) → Cartesian3
计算右笛卡尔和左笛卡尔之间的中点。 Computes the midpoint between the right and left Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
中点。 The midpoint.
static Cesium.Cartesian3.minimumByComponent(first, second, result) → Cartesian3
比较两个笛卡尔坐标并计算包含所提供笛卡尔坐标的最小分量的笛卡尔坐标。 Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
first |
Cartesian3 | 进行比较的笛卡尔坐标。 A cartesian to compare. |
second |
Cartesian3 | 进行比较的笛卡尔坐标。 A cartesian to compare. |
result |
Cartesian3 | 用于存储结果的对象。 The object into which to store the result. |
返回: Returns:
具有最少组件的笛卡尔坐标。 A cartesian with the minimum components.
计算所提供的笛卡尔坐标的最小分量的值。 Computes the value of the minimum component for the supplied Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要使用的笛卡尔坐标。 The cartesian to use. |
返回: Returns:
最小分量的值。 The value of the minimum component.
static Cesium.Cartesian3.mostOrthogonalAxis(cartesian, result) → Cartesian3
返回与提供的笛卡尔坐标最正交的轴。 Returns the axis that is most orthogonal to the provided Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 在其上找到最正交轴的笛卡尔坐标。 The Cartesian on which to find the most orthogonal axis. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
最正交的轴。 The most orthogonal axis.
static Cesium.Cartesian3.multiplyByScalar(cartesian, scalar, result) → Cartesian3
将提供的笛卡尔分量乘以提供的标量。 Multiplies the provided Cartesian componentwise by the provided scalar.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要缩放的笛卡尔坐标。 The Cartesian to be scaled. |
scalar |
number | 要相乘的标量。 The scalar to multiply with. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
static Cesium.Cartesian3.multiplyComponents(left, right, result) → Cartesian3
计算两个笛卡尔坐标的分量乘积。 Computes the componentwise product of two Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
static Cesium.Cartesian3.negate(cartesian, result) → Cartesian3
否定提供的笛卡尔坐标。 Negates the provided Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 笛卡尔坐标被否定。 The Cartesian to be negated. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
static Cesium.Cartesian3.normalize(cartesian, result) → Cartesian3
计算所提供的笛卡尔坐标的标准化形式。 Computes the normalized form of the supplied Cartesian.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
cartesian |
Cartesian3 | 要归一化的笛卡尔坐标。 The Cartesian to be normalized. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
将提供的实例存储到提供的数组中。 Stores the provided instance into the provided array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
value |
Cartesian3 | 包装的价值。 The value to pack. | |
array |
Array.<number> | 要打包到的数组。 The array to pack into. | |
startingIndex |
number |
0
|
可选 optional 开始打包元素的数组索引。 The index into the array at which to start packing the elements. |
返回: Returns:
被打包成的数组 The array that was packed into
将笛卡尔三维数组展平为组件数组。 Flattens an array of Cartesian3s into an array of components.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
array |
Array.<Cartesian3> | 要打包的笛卡尔数组。 The array of cartesians to pack. |
result |
Array.<number> |
可选 optional
用于存储结果的数组。如果这是一个类型化数组,它必须有 array.length * 3 个组件,否则 The array onto which to store the result. If this is a typed array, it must have array.length * 3 components, else a DeveloperError 将被抛出。如果它是常规数组,它将被调整大小以具有 (array.length * 3) 个元素。 will be thrown. If it is a regular array, it will be resized to have (array.length * 3) elements. |
返回: Returns:
打包的数组。 The packed array.
static Cesium.Cartesian3.projectVector(a, b, result) → Cartesian3
将向量 a 投影到向量 b 上 Projects vector a onto vector b
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
a |
Cartesian3 | 需要投影的向量 The vector that needs projecting |
b |
Cartesian3 | 要投影到的向量 The vector to project onto |
result |
Cartesian3 | 结果笛卡尔 The result cartesian |
返回: Returns:
修改后的结果参数 The modified result parameter
static Cesium.Cartesian3.subtract(left, right, result) → Cartesian3
计算两个笛卡尔坐标的分量差。 Computes the componentwise difference of two Cartesians.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
left |
Cartesian3 | 第一个笛卡尔。 The first Cartesian. |
right |
Cartesian3 | 第二个笛卡尔。 The second Cartesian. |
result |
Cartesian3 | 用于存储结果的对象。 The object onto which to store the result. |
返回: Returns:
修改后的结果参数。 The modified result parameter.
static Cesium.Cartesian3.unpack(array, startingIndex, result) → Cartesian3
从打包数组中检索实例。 Retrieves an instance from a packed array.
| 名称 Name | 类型 Type | 默认值 Default | 说明 Description |
|---|---|---|---|
array |
Array.<number> | 打包的数组。 The packed array. | |
startingIndex |
number |
0
|
可选 optional 要解包的元素的起始索引。 The starting index of the element to be unpacked. |
result |
Cartesian3 | 可选 optional 用于存储结果的对象。 The object into which to store the result. |
返回: Returns:
修改后的结果参数或新的 Cartesian3 实例(如果未提供)。 The modified result parameter or a new Cartesian3 instance if one was not provided.
static Cesium.Cartesian3.unpackArray(array, result) → Array.<Cartesian3>
将笛卡尔分量数组解压缩为 Cartesian3 数组。 Unpacks an array of cartesian components into an array of Cartesian3s.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
array |
Array.<number> | 要解压的组件数组。 The array of components to unpack. |
result |
Array.<Cartesian3> | 可选 optional 用于存储结果的数组。 The array onto which to store the result. |
返回: Returns:
解压后的数组。 The unpacked array.
