| Name | Type | Default | Description |
|---|---|---|---|
x |
number |
0.0
|
optional X组件. |
y |
number |
0.0
|
optional |
See:
Members
X组件.
-
Default Value:
0.0
Y组件.
-
Default Value:
0.0
static constant Cesium.Cartesian2.ONE : Cartesian2
An immutable Cartesian2 instance initialized to (1.0, 1.0).
用于将对象组合成数组的元素数量.
static constant Cesium.Cartesian2.UNIT_X : Cartesian2
不可改变的 NT% 0 实例初始化为 (1.0, 0.0) .
static constant Cesium.Cartesian2.UNIT_Y : Cartesian2
An immutable Cartesian2 instance initialized to (0.0, 1.0).
static constant Cesium.Cartesian2.ZERO : Cartesian2
不可改变的 NT% 0 实例初始化为 (0.0, 0.0) .
Methods
clone(result) → Cartesian2
重复这个 NT+0+ 实例 .
| Name | Type | Description |
|---|---|---|
result |
Cartesian2 | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
将这个笛卡尔与提供的笛卡尔组件进行比较并返回
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
| Name | Type | Description |
|---|---|---|
right |
Cartesian2 | optional 右手侧笛卡尔琴. |
Returns:
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
将这个笛卡尔与提供的笛卡尔组件进行比较并返回
如果通过绝对或相对耐性测试,
-NT+0+false NT+1+否则.
| Name | Type | Default | Description |
|---|---|---|---|
right |
Cartesian2 | optional 右手侧笛卡尔琴. | |
relativeEpsilon |
number |
0
|
optional The relative epsilon tolerance to use for equality testing. |
absoluteEpsilon |
number |
相对Epsilon
|
optional 绝对的埃皮西隆耐受性用于平等测试. |
Returns:
NT##############################################################################################################################################################################################################################################################.
在格式“ (x, y) ” 中创建代表此笛卡尔的字符串.
Returns:
在格式“ (x, y) ” 中代表提供的笛卡尔的字符串 .
static Cesium.Cartesian2.abs(cartesian, result) → Cartesian2
计算所提供的笛卡尔的绝对值.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 要计算绝对值的笛卡尔. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.add(left, right, result) → Cartesian2
计算两个笛卡尔的组件和.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
返回弧度角度,在提供的笛卡尔之间.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
Returns:
笛卡尔人之间的角度.
static Cesium.Cartesian2.clamp(value, min, max, result) → Cartesian2
限定两个值之间的值.
| Name | Type | Description |
|---|---|---|
value |
Cartesian2 | 夹的值. |
min |
Cartesian2 | 最小范围. |
max |
Cartesian2 | 最大范围. |
result |
Cartesian2 | 存储结果的对象. |
Returns:
被夹住的值如此小 QQ 结果最大 .
static Cesium.Cartesian2.clone(cartesian, result) → Cartesian2
Duplicates a Cartesian2 instance.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔复制. |
result |
Cartesian2 | optional 存储结果的对象 . |
Returns:
The modified result parameter or a new Cartesian2 instance if one was not provided. (Returns undefined if cartesian is undefined)
计算将输入矢量的 Z 坐标暗中设置为 0 的交叉产物的大小
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
Returns:
交叉产品.
计算两点之间的距离.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 计算距离的第一点. |
right |
Cartesian2 | 计算距离的第二点. |
Returns:
两点之间的距离.
Example:
// Returns 1.0
const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(2.0, 0.0));
计算两点之间的平方距离。 比较平方距离
using this function is more efficient than comparing distances using
Cartesian2#distance.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 计算距离的第一点. |
right |
Cartesian2 | 计算距离的第二点. |
Returns:
两点之间的距离.
Example:
// Returns 4.0, not 2.0
const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(3.0, 0.0));
static Cesium.Cartesian2.divideByScalar(cartesian, scalar, result) → Cartesian2
将提供的笛卡尔元件除以所提供的斯卡尔.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔人将被分割. |
scalar |
number | 师拟分之. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.divideComponents(left, right, result) → Cartesian2
计算两个笛卡尔的组件商号.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
计算两个笛卡尔的点(scalar)产品.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
Returns:
点产品.
比较提供的笛卡尔组件并返回
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | optional 第一笛卡尔人. |
right |
Cartesian2 | optional 第二笛卡尔人. |
Returns:
如果左右对等, 则使用 NT 0 true NT 1 , 否则使用 NT 2 false NT 3 .
比较提供的笛卡尔组件并返回
如果通过绝对或相对耐性测试,
-NT+0+false NT+1+否则.
| Name | Type | Default | Description |
|---|---|---|---|
left |
Cartesian2 | optional 第一笛卡尔人. | |
right |
Cartesian2 | optional 第二笛卡尔人. | |
relativeEpsilon |
number |
0
|
optional The relative epsilon tolerance to use for equality testing. |
absoluteEpsilon |
number |
相对Epsilon
|
optional 绝对的埃皮西隆耐受性用于平等测试. |
Returns:
NT################################################################### ##########################################################################################################################################################################################.
static Cesium.Cartesian2.fromArray(array, startingIndex, result) → Cartesian2
Creates a Cartesian2 from two consecutive elements in an array.
| Name | Type | Default | Description |
|---|---|---|---|
array |
Array.<number> | 连续两个元素分别对应 x 和 y 组件的数组. | |
startingIndex |
number |
0
|
optional The offset into the array of the first element, which corresponds to the x component. |
result |
Cartesian2 | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
Example:
// Create a Cartesian2 with (1.0, 2.0)
const v = [1.0, 2.0];
const p = Cesium.Cartesian2.fromArray(v);
// Create a Cartesian2 with (1.0, 2.0) using an offset into an array
const v2 = [0.0, 0.0, 1.0, 2.0];
const p2 = Cesium.Cartesian2.fromArray(v2, 2);
static Cesium.Cartesian2.fromCartesian3(cartesian, result) → Cartesian2
Creates a Cartesian2 instance from an existing Cartesian3. This simply takes the
x and y properties of the Cartesian3 and drops z.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian3 | The Cartesian3 instance to create a Cartesian2 instance from. |
result |
Cartesian2 | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
static Cesium.Cartesian2.fromCartesian4(cartesian, result) → Cartesian2
Creates a Cartesian2 instance from an existing Cartesian4. This simply takes the
x and y properties of the Cartesian4 and drops z and w.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian4 | The Cartesian4 instance to create a Cartesian2 instance from. |
result |
Cartesian2 | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
static Cesium.Cartesian2.fromElements(x, y, result) → Cartesian2
Creates a Cartesian2 instance from x and y coordinates.
| Name | Type | Description |
|---|---|---|
x |
number | X坐标. |
y |
number | Y坐标. |
result |
Cartesian2 | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
static Cesium.Cartesian2.lerp(start, end, t, result) → Cartesian2
使用提供的笛卡尔计算 t 的线性插值或外推值.
| Name | Type | Description |
|---|---|---|
start |
Cartesian2 | T 对应的值为 0.0. |
end |
Cartesian2 | 与 t 对应的数值为1.0. |
t |
number | 沿着T的点 插入. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
计算笛卡尔的大小(长度).
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 将计算大小的笛卡尔实例. |
Returns:
The magnitude.
计算提供的笛卡尔平方大小.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 将计算平方级的笛卡尔实例. |
Returns:
平方的量级.
static Cesium.Cartesian2.maximumByComponent(first, second, result) → Cartesian2
比较两个笛卡尔,计算一个含有所供应笛卡尔最大组件的笛卡尔.
| Name | Type | Description |
|---|---|---|
first |
Cartesian2 | 一个笛卡尔比较. |
second |
Cartesian2 | 一个笛卡尔比较. |
result |
Cartesian2 | 存储结果的对象. |
Returns:
一个拥有最大组件的笛卡尔.
计算所提供的笛卡尔最大组件的值.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔人使用. |
Returns:
最大组件的值 .
static Cesium.Cartesian2.minimumByComponent(first, second, result) → Cartesian2
比较两个笛卡尔并计算一个含有所供应笛卡尔最小组件的笛卡尔.
| Name | Type | Description |
|---|---|---|
first |
Cartesian2 | 一个笛卡尔比较. |
second |
Cartesian2 | 一个笛卡尔比较. |
result |
Cartesian2 | 存储结果的对象. |
Returns:
最小组件的笛卡尔.
计算提供的笛卡尔最小组件的值.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔人使用. |
Returns:
最小组件的值 .
static Cesium.Cartesian2.mostOrthogonalAxis(cartesian, result) → Cartesian2
返回给定的笛卡尔最正弦的轴 .
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 找到最正弦轴的笛卡尔. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
最正统轴.
static Cesium.Cartesian2.multiplyByScalar(cartesian, scalar, result) → Cartesian2
将提供的笛卡尔元件以提供的scalar乘以.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔人要缩放. |
scalar |
number | 须cal以乘. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.multiplyComponents(left, right, result) → Cartesian2
计算两个笛卡尔的组件产品.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.negate(cartesian, result) → Cartesian2
忽略了提供的笛卡尔.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔人将被否定. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.normalize(cartesian, result) → Cartesian2
计算所供应的笛卡尔的普通形式.
| Name | Type | Description |
|---|---|---|
cartesian |
Cartesian2 | 笛卡尔人将实现正常化. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.pack(value, array, startingIndex) → Array.<number>|TypedArray
将所提供的实例存储到所提供的数组中.
| Name | Type | Default | Description |
|---|---|---|---|
value |
Cartesian2 | 包装的价值. | |
array |
Array.<number> | TypedArray | 装入的阵列. | |
startingIndex |
number |
0
|
optional The index into the array at which to start packing the elements. |
Returns:
装入的阵列
static Cesium.Cartesian2.packArray(array, result) → Array.<number>|TypedArray
将一个笛卡尔2的阵列平整成一个组件阵列.
| Name | Type | Description |
|---|---|---|
array |
Array.<Cartesian2> | 要装填的笛卡尔阵列. |
result |
Array.<number> | TypedArray |
optional
The array onto which to store the result. If this is a typed array, it must have array.length * 2 components, else a DeveloperError will be thrown. If it is a regular array, it will be resized to have (array.length * 2) elements. |
Returns:
装填的阵列.
static Cesium.Cartesian2.subtract(left, right, result) → Cartesian2
计算两个笛卡尔的组件差异.
| Name | Type | Description |
|---|---|---|
left |
Cartesian2 | 第一笛卡尔人. |
right |
Cartesian2 | 第二笛卡尔人. |
result |
Cartesian2 | 存储结果的对象 . |
Returns:
修改的结果参数 .
static Cesium.Cartesian2.unpack(array, startingIndex, result) → Cartesian2
从组合的数组中获取实例 .
| Name | Type | Default | Description |
|---|---|---|---|
array |
Array.<number> | TypedArray | 装填的阵列. | |
startingIndex |
number |
0
|
optional The starting index of the element to be unpacked. |
result |
Cartesian2 | optional 存储结果的对象. |
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
static Cesium.Cartesian2.unpackArray(array, result) → Array.<Cartesian2>
将一系列的笛卡尔元件拆卸成一系列的笛卡尔2.
| Name | Type | Description |
|---|---|---|
array |
Array.<number> | 要解开的组件阵列 . |
result |
Array.<Cartesian2> | optional 存储结果的数组 . |
Returns:
无包装的阵列.