四维笛卡尔坐标点类。
| Name | Type | Default | Description |
|---|---|---|---|
x |
Number |
0.0
|
optional X分量。 |
y |
Number |
0.0
|
optional Y分量。 |
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 -
用于将对象打包到数组中的元素数量。
-
staticconstantSuperMap3D.Cartesian4.UNIT_W : Cartesian4
-
一个不可变的 Cartesian4 实例,初始化为(0.0,0.0,0.0,1.0)。
-
staticconstantSuperMap3D.Cartesian4.UNIT_X : Cartesian4
-
一个不可变的 Cartesian4 实例,初始化为 (1.0, 0.0, 0.0)。
-
staticconstantSuperMap3D.Cartesian4.UNIT_Y : Cartesian4
-
一个不可变的 Cartesian4 实例,初始化为 (0.0, 1.0, 0.0)。
-
staticconstantSuperMap3D.Cartesian4.UNIT_Z : Cartesian4
-
一个不可变的 Cartesian4 实例,初始化为 (0.0, 0.0, 1.0)。
-
staticconstantSuperMap3D.Cartesian4.ZERO : Cartesian4
-
一个不可变的 Cartesian4 实例,初始化为 (0.0, 0.0, 0.0)。
Methods
-
clone(result) → Cartesian4
-
复制这个Cartesian实例。
Name Type Description resultCartesian4 optional 存储结果的对象。 Returns:
修改后的结果参数,如果没有提供新的Cartesian4实例,则提供新的Cartesian4实例。 -
将此Cartesian与提供的Cartesian分量进行比较,如果它们相等则返回 true ,否则返回 false 。
Name Type Description rightCartesian4 optional 右侧的Cartesian。 Returns:
如果它们相等,则为 true ,否则为 false 。 -
将此Cartesian与提供的Cartesian分量进行比较,如果它们通过绝对或相对容差测试,则返回 true ,否则返回 false 。
Name Type Default Description rightCartesian3 optional 右侧的Cartesian。 relativeEpsilonNumber 用于相等测试的相对 epsilon 容差。 absoluteEpsilonNumber relativeEpsilonoptional 用于相等测试的绝对 epsilon 容差。 Returns:
如果它们在提供的 epsilon 内,则为 true ,否则为 false 。 -
以'(x, y)'的格式创建一个表示此Cartesian坐标的字符串。
Returns:
以'(x, y)'格式表示所提供的Cartesian坐标的字符串。 -
staticSuperMap3D.Cartesian4.abs(cartesian, result) → Cartesian4
-
计算提供的Cartesian坐标的绝对值。
Name Type Description cartesianCartesian4 要计算其绝对值的Cartesian坐标。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.add(left, right, result) → Cartesian4
-
计算两个Cartesians的分量和。
Name Type Description leftCartesian4 第一个Cartesian。 rightCartesian4 第二个Cartesian。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.clone(cartesian, result) → Cartesian4
-
复制 Cartesian4 实例。
Name Type Description cartesianCartesian4 要复制的Cartesian坐标。 resultCartesian4 optional 存储结果的对象。 Returns:
修改后的结果参数或新的 Cartesian4 实例(如果未提供)。(如果Cartesian未定义,则返回未定义) -
计算两点之间的空间距离。
Name Type Description leftCartesian4 计算距离的第一个点。 rightCartesian4 计算距离的第二个点。 Returns:
两点之间的距离。Example:
// Returns 1.0 var d = SuperMap3D.Cartesian4.distance( new SuperMap3D.Cartesian4(1.0, 0.0, 0.0, 0.0), new SuperMap3D.Cartesian4(2.0, 0.0, 0.0, 0.0)); -
计算两点之间的平方距离。使用此函数比较距离的平方比使用
Cartesian4#distance比较距离更有效。Name Type Description leftCartesian4 计算距离的第一个点 rightCartesian4 计算距离的第二个点。 Returns:
两点之间的距离。Example:
// Returns 4.0, not 2.0 var d = SuperMap3D.Cartesian4.distance( new SuperMap3D.Cartesian4(1.0, 0.0, 0.0, 0.0), new SuperMap3D.Cartesian4(3.0, 0.0, 0.0, 0.0)); -
staticSuperMap3D.Cartesian4.divideByScalar(cartesian, scalar, result) → Cartesian4
-
将提供的Cartesian分量除以提供的标量。
Name Type Description cartesianCartesian4 被划分的 Cartesian。 scalarNumber 要除以的标量。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.divideComponents(left, right, result) → Cartesian4
-
计算两个Cartesians的分量商。
Name Type Description leftCartesian4 第一个Cartesian。 rightCartesian4 第二个Cartesian。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
计算两个Cartesian的点(标量)积。
Name Type Description leftCartesian4 第一个 Cartesian。 rightCartesian4 第二个 Cartesian。 Returns:
点积。 -
比较提供的Cartesian分量,如果相等则返回 true ,否则返回 false 。
Name Type Description leftCartesian4 optional 第一个 Cartesian。 rightCartesian4 optional 第二个 Cartesian。 Returns:
如果它们相等,则为 true ,否则为 false 。 -
比较提供的Cartesian分量,如果它们通过绝对或相对容差测试,则返回 true ,否则返回 false 。
Name Type Default Description leftCartesian4 optional 第一个 Cartesian. rightCartesian4 optional 第二个 Cartesian. relativeEpsilonNumber 用于相等测试的相对 epsilon 容差。 absoluteEpsilonNumber relativeEpsilonoptional 用于相等测试的绝对 epsilon 容差。 Returns:
在提供的 epsilon 内,则为 true,否则为 false 。 -
staticSuperMap3D.Cartesian4.fromArray(array, startingIndex, result) → Cartesian4
-
从数组中的四个连续元素创建 Cartesian4。
Name Type Default Description arrayArray.<Number> 其四个连续元素分别对应于 x、y、z 和 w 分量的数组。 startingIndexNumber 0optional 第一个元素在数组中的偏移量,对应于 x 分量。 resultCartesian4 optional 存储结果的对象。 Returns:
修改后的结果参数或新的 Cartesian4 实例(如果未提供)。Example:
// Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) var v = [1.0, 2.0, 3.0, 4.0]; var p = SuperMap3D.Cartesian4.fromArray(v); // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array var v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0]; var p2 = SuperMap3D.Cartesian4.fromArray(v2, 2); -
staticSuperMap3D.Cartesian4.fromColor(color, result) → Cartesian4
-
从 Color 创建一个 Cartesian4 实例。red 、green 、blue 和 alpha 分别映射到 x 、 y 、 z 和 w 。
Name Type Description colorColor 源色。 resultCartesian4 optional 存储结果的对象。 Returns:
修改后的结果参数或新的 Cartesian4 实例(如果未提供)。 -
staticSuperMap3D.Cartesian4.fromElements(x, y, z, w, result) → Cartesian4
-
从 x、y、z 和 w 坐标创建 Cartesian4 实例。
Name Type Description xNumber x 坐标。 yNumber y 坐标。 zNumber z 坐标。 wNumber w 坐标。 resultCartesian4 optional 存储结果的对象。 Returns:
修改后的结果参数或新的 Cartesian4 实例(如果未提供)。 -
staticSuperMap3D.Cartesian4.lerp(start, end, t, result) → Cartesian4
-
使用提供的Cartesian计算在 t 处的线性插值或外插。
Name Type Description startCartesian4 在 0.0 时对应于 t 的值。 endCartesian4 在 1.0 时对应于 t 的值。 tNumber 沿 t 进行插值的点。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
计算Cartesian的大小(长度)。
Name Type Description cartesianCartesian4 要计算其大小的Cartesian实例。 Returns:
幅度。 -
计算提供的Cartesian平方幅度。
Name Type Description cartesianCartesian4 要计算其平方幅度的Cartesian实例。 Returns:
平方幅度。 -
staticSuperMap3D.Cartesian4.maximumByComponent(first, second, result) → Cartesian4
-
比较两个Cartesians并计算包含所提供Cartesian的最大分量的Cartesian。
Name Type Description firstCartesian4 第一个Cartesian坐标。 secondCartesian4 第二个Cartesian坐标。 resultCartesian4 存储结果的对象。 Returns:
具有最大分量的Cartesian坐标。 -
计算提供的Cartesian坐标的最大分量的值。
Name Type Description cartesianCartesian4 要使用的cartesian。 Returns:
最大分量的值。 -
staticSuperMap3D.Cartesian4.minimumByComponent(first, second, result) → Cartesian4
-
比较两个Cartesians并计算包含所提供Cartesian的最小分量的Cartesian。
Name Type Description firstCartesian4 第一个Cartesian。 secondCartesian4 第二个Cartesian。 resultCartesian4 存储结果的对象。 Returns:
具有最少分量的Cartesian。 -
计算提供的Cartesian坐标的最小分量的值。
Name Type Description cartesianCartesian4 要使用的cartesian。 Returns:
最小分量的值。 -
staticSuperMap3D.Cartesian4.mostOrthogonalAxis(cartesian, result) → Cartesian4
-
返回与提供的Cartesian坐标最正交的轴。
Name Type Description cartesianCartesian4 找到最正交轴的Cartesian坐标。 resultCartesian4 存储结果的对象。 Returns:
最正交的轴。 -
staticSuperMap3D.Cartesian4.multiplyByScalar(cartesian, scalar, result) → Cartesian4
-
将提供的Cartesian分量乘以提供的标量。
Name Type Description cartesianCartesian4 要缩放的Cartesian。 scalarNumber 要与之相乘的标量。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.multiplyComponents(left, right, result) → Cartesian4
-
计算两个Cartesian的分量乘积。
Name Type Description leftCartesian4 第一个 Cartesian。 rightCartesian4 第二个 Cartesian。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.negate(cartesian, result) → Cartesian4
-
否定所提供的Cartesian。
Name Type Description cartesianCartesian4 要被否定的Cartesian。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.normalize(cartesian, result) → Cartesian4
-
计算提供的Cartesian坐标的规范化形式。
Name Type Description cartesianCartesian4 要规范化的Cartesian坐标。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
将提供的实例存储到提供的数组中。
Name Type Default Description valueCartesian4 要打包的值。 arrayArray.<Number> 要打包的数组。 startingIndexNumber 0optional 开始打包元素的数组索引。 Returns:
装入的数组。 -
将 Cartesian4 数组展平为组件数组。
Name Type Description arrayArray.<Cartesian4> 要打包的cartesians数组。 resultArray.<Number> 要在其中存储结果的数组。 Returns:
打包的数组。 -
staticSuperMap3D.Cartesian4.subtract(left, right, result) → Cartesian4
-
计算两个Cartesians的分量差。
Name Type Description leftCartesian4 第一个Cartesian。 rightCartesian4 第二个Cartesian。 resultCartesian4 存储结果的对象。 Returns:
修改后的结果参数。 -
staticSuperMap3D.Cartesian4.unpack(array, startingIndex, result) → Cartesian4
-
从打包数组中检索实例。
Name Type Default Description arrayArray.<Number> 打包的数组。 startingIndexNumber 0optional 要解包的元素的起始索引。 resultCartesian4 optional 存储结果的对象。 Returns:
修改后的结果参数或新的 Cartesian4 实例(如果未提供)。 -
staticSuperMap3D.Cartesian4.unpackArray(array, result) → Array.<Cartesian4>
-
将一组cartesian分量解包成一组Cartesian4s。
Name Type Description arrayArray.<Number> 要解包的组件数组。 resultArray.<Cartesian4> 存储结果的数组。 Returns:
解压后的数组。
