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