new Cesium.Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2)

3x3 矩阵,可以作为列主序数组索引 . 构造参数按代码可读性的行主序排列.
Name Type Default Description
column0Row0 number 0.0 optional 第0栏,第0行的值.
column1Row0 number 0.0 optional 第1栏第0行的值.
column2Row0 number 0.0 optional 第2栏第0行的值.
column0Row1 number 0.0 optional 第0栏第1行的值.
column1Row1 number 0.0 optional 第1栏第1行的值.
column2Row1 number 0.0 optional 第2栏第1行的值.
column0Row2 number 0.0 optional 第0栏第2行的值.
column1Row2 number 0.0 optional 第1栏第2行的值.
column2Row2 number 0.0 optional 第2栏第2行的值.
See:

Members

length : number

获取收藏中的项目数.

static constant Cesium.Matrix3.COLUMN0ROW0 : number

0栏,第0行的索引为 NT 0 .

static constant Cesium.Matrix3.COLUMN0ROW1 : number

0栏第1行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN0ROW2 : number

第0栏第2行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN1ROW0 : number

第1栏第0行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN1ROW1 : number

第1栏第1行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN1ROW2 : number

第1栏第2行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN2ROW0 : number

第2栏第0行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN2ROW1 : number

第2栏第1行的索引为 Matrix3 .

static constant Cesium.Matrix3.COLUMN2ROW2 : number

第2栏第2行的索引为 Matrix3 .

static constant Cesium.Matrix3.IDENTITY : Matrix3

不可改变的 NT 0 实例初始化为身份矩阵.

static Cesium.Matrix3.packedLength : number

用于将对象组合成数组的元素数量.

static constant Cesium.Matrix3.ZERO : Matrix3

不可改变的 NT 0 实例初始化为零矩阵.

Methods

clone(result)Matrix3

Duplicates the provided Matrix3 instance.
Name Type Description
result Matrix3 optional 存储结果的对象 .
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .

equals(right)boolean

将这个矩阵与所提供的矩阵组件进行比较并返回 -NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
Name Type Description
right Matrix3 optional 右手侧矩阵.
Returns:
-NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.

equalsEpsilon(right, epsilon)boolean

将这个矩阵与所提供的矩阵组件进行比较并返回 如果它们位于提供的epsilon范围内, -NT+0+false NT+1+否则.
Name Type Default Description
right Matrix3 optional 右手侧矩阵.
epsilon number 0 optional The epsilon to use for equality testing.
Returns:
NT##############################################################################################################################################################################################################################################################.

toString()string

创建一个代表这个矩阵的字符串,每行都是 单行,格式为“(栏0,栏1,栏2)”.
Returns:
代表所提供矩阵的字符串,每行在单独的行上,格式为“(栏0,栏1,栏2)”.

static Cesium.Matrix3.abs(matrix, result)Matrix3

计算矩阵,其中包含所提供矩阵元素的绝对值(未签名).
Name Type Description
matrix Matrix3 带有签名元素的矩阵 .
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.add(left, right, result)Matrix3

计算两个矩阵的总和.
Name Type Description
left Matrix3 第一个矩阵.
right Matrix3 第二矩阵.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.clone(matrix, result)Matrix3

Duplicates a Matrix3 instance.
Name Type Description
matrix Matrix3 要复制的矩阵 .
result Matrix3 optional 存储结果的对象 .
Returns:
The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)

static Cesium.Matrix3.computeEigenDecomposition(matrix, result)object

计算对称矩阵的精度和精度值.

返回对角矩阵和单一矩阵,以便: matrix = unitary matrix * diagonal matrix * transpose(unitary matrix)

沿对角矩阵的对角值为eigen值. 栏目 的公式.

Name Type Description
matrix Matrix3 将矩阵分解成对角矩阵和单一矩阵。 应该是对称的.
result object optional 具有单体和对角特性的天体,是存储结果的矩阵.
Returns:
具有统一和对角特性的物体,分别是统一和对角矩阵.
Example:
const a = //... symetric matrix
const result = {
    unitary : new Cesium.Matrix3(),
    diagonal : new Cesium.Matrix3()
};
Cesium.Matrix3.computeEigenDecomposition(a, result);

const unitaryTranspose = Cesium.Matrix3.transpose(result.unitary, new Cesium.Matrix3());
const b = Cesium.Matrix3.multiply(result.unitary, result.diagonal, new Cesium.Matrix3());
Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a

const lambda = Cesium.Matrix3.getColumn(result.diagonal, 0, new Cesium.Cartesian3()).x;  // first eigenvalue
const v = Cesium.Matrix3.getColumn(result.unitary, 0, new Cesium.Cartesian3());          // first eigenvector
const c = Cesium.Cartesian3.multiplyByScalar(v, lambda, new Cesium.Cartesian3());        // equal to Cesium.Matrix3.multiplyByVector(a, v)

static Cesium.Matrix3.determinant(matrix)number

计算所提供的矩阵的决定因素.
Name Type Description
matrix Matrix3 要使用的矩阵 .
Returns:
矩阵决定因素的价值.

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

比较所提供的矩阵组件并返回 -NT+0+Treal NT+1+,如果两者是相等的, NT+2+false NT+3+否则.
Name Type Description
left Matrix3 optional 第一个矩阵.
right Matrix3 optional 第二矩阵.
Returns:
如果左右对等, 则使用 NT 0 true NT 1 , 否则使用 NT 2 false NT 3 .

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

比较所提供的矩阵组件并返回 如果它们位于提供的epsilon范围内, -NT+0+false NT+1+否则.
Name Type Default Description
left Matrix3 optional 第一个矩阵.
right Matrix3 optional 第二矩阵.
epsilon number 0 optional The epsilon to use for equality testing.
Returns:
NT################################################################### ##########################################################################################################################################################################################.

static Cesium.Matrix3.fromArray(array, startingIndex, result)Matrix3

在数组中从9个连续的元素中创建 Matrix3 .
Name Type Default Description
array Array.<number> 连续9个元素对应矩阵位置的数组。 假设列主序.
startingIndex number 0 optional The offset into the array of the first element, which corresponds to first column first row position in the matrix.
result Matrix3 optional 存储结果的对象 .
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .
Example:
// Create the Matrix3:
// [1.0, 2.0, 3.0]
// [1.0, 2.0, 3.0]
// [1.0, 2.0, 3.0]

const v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];
const m = Cesium.Matrix3.fromArray(v);

// Create same Matrix3 with using an offset into an array
const v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];
const m2 = Cesium.Matrix3.fromArray(v2, 2);

static Cesium.Matrix3.fromColumnMajorArray(values, result)Matrix3

Creates a Matrix3 instance from a column-major order array.
Name Type Description
values Array.<number> 列主命令阵列 .
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .

static Cesium.Matrix3.fromCrossProduct(vector, result)Matrix3

Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.
Name Type Description
vector Cartesian3 交叉产品操作左手边的矢量.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .
Example:
// Creates
//   [0.0, -9.0,  8.0]
//   [9.0,  0.0, -7.0]
//   [-8.0, 7.0,  0.0]
const m = Cesium.Matrix3.fromCrossProduct(new Cesium.Cartesian3(7.0, 8.0, 9.0));

static Cesium.Matrix3.fromHeadingPitchRoll(headingPitchRoll, result)Matrix3

Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
Name Type Description
headingPitchRoll HeadingPitchRoll 用于标题PitchRoll.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
本标题Pitch Roll的3x3旋转矩阵.

static Cesium.Matrix3.fromQuaternion(quaternion, result)Matrix3

从提供的四角星计算一个3x3旋转矩阵.
Name Type Description
quaternion Quaternion 将使用之四.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
本之四中的3x3旋转矩阵 .

static Cesium.Matrix3.fromRotationX(angle, result)Matrix3

围绕x轴创建旋转矩阵.
Name Type Description
angle number 用弧度表示的旋转角度。 正角是逆时针.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .
Example:
// Rotate a point 45 degrees counterclockwise around the x-axis.
const p = new Cesium.Cartesian3(5, 6, 7);
const m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0));
const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());

static Cesium.Matrix3.fromRotationY(angle, result)Matrix3

围绕 Y 轴创建旋转矩阵.
Name Type Description
angle number 用弧度表示的旋转角度。 正角是逆时针.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .
Example:
// Rotate a point 45 degrees counterclockwise around the y-axis.
const p = new Cesium.Cartesian3(5, 6, 7);
const m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0));
const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());

static Cesium.Matrix3.fromRotationZ(angle, result)Matrix3

围绕 Z 轴创建旋转矩阵.
Name Type Description
angle number 用弧度表示的旋转角度。 正角是逆时针.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .
Example:
// Rotate a point 45 degrees counterclockwise around the z-axis.
const p = new Cesium.Cartesian3(5, 6, 7);
const m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0));
const rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());

static Cesium.Matrix3.fromRowMajorArray(values, result)Matrix3

Creates a Matrix3 instance from a row-major order array. 所产生的矩阵将按列次排列.
Name Type Description
values Array.<number> 行主命令阵列 .
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .

static Cesium.Matrix3.fromScale(scale, result)Matrix3

计算代表非统一比例表的 Matrix3 例.
Name Type Description
scale Cartesian3 X, y, 和 z 比例因子.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .
Example:
// Creates
//   [7.0, 0.0, 0.0]
//   [0.0, 8.0, 0.0]
//   [0.0, 0.0, 9.0]
const m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));

static Cesium.Matrix3.fromUniformScale(scale, result)Matrix3

计算代表统一比例尺的 Matrix3 实例.
Name Type Description
scale number 统一比例系数.
result Matrix3 optional 如果创建了未定义的新实例, 结果将存储的对象 .
Returns:
已修改的结果参数, 或如果未提供新的 NT% 0 实例 .
Example:
// Creates
//   [2.0, 0.0, 0.0]
//   [0.0, 2.0, 0.0]
//   [0.0, 0.0, 2.0]
const m = Cesium.Matrix3.fromUniformScale(2.0);

static Cesium.Matrix3.getColumn(matrix, index, result)Cartesian3

Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.
Name Type Description
matrix Matrix3 要使用的矩阵 .
index number 要检索的列的零基索引 .
result Cartesian3 存储结果的对象 .
Returns:
修改的结果参数 .
Throws:

static Cesium.Matrix3.getElementIndex(column, row)number

在提供的行和列上计算元素的数组索引.
Name Type Description
column number 列的零基索引.
row number 行零基指数.
Returns:
提供的行和列的元素索引 .
Throws:
Example:
const myMatrix = new Cesium.Matrix3();
const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);
const column1Row0 = myMatrix[column1Row0Index]
myMatrix[column1Row0Index] = 10.0;

static Cesium.Matrix3.getMaximumScale(matrix)number

计算最大尺度,假设矩阵是affine转换. 最大尺度是列向量的最大长度.
Name Type Description
matrix Matrix3 The matrix.
Returns:
最大范围.

static Cesium.Matrix3.getRotation(matrix, result)Matrix3

提取旋转矩阵,假设矩阵是近缘变换.
Name Type Description
matrix Matrix3 The matrix.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
See:

static Cesium.Matrix3.getRow(matrix, index, result)Cartesian3

Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.
Name Type Description
matrix Matrix3 要使用的矩阵 .
index number 要检索的行零基索引 .
result Cartesian3 存储结果的对象 .
Returns:
修改的结果参数 .
Throws:

static Cesium.Matrix3.getScale(matrix, result)Cartesian3

提取非统一比例表,假设矩阵是亲和转换.
Name Type Description
matrix Matrix3 The matrix.
result Cartesian3 存储结果的对象 .
Returns:
修改的结果参数 .
See:

static Cesium.Matrix3.inverse(matrix, result)Matrix3

计算所提供的矩阵的反向.
Name Type Description
matrix Matrix3 矩阵为反转.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
Throws:

static Cesium.Matrix3.inverseTranspose(matrix, result)Matrix3

计算矩阵的反转式.
Name Type Description
matrix Matrix3 要转换和反转的矩阵 .
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.multiply(left, right, result)Matrix3

计算两个矩阵的产物.
Name Type Description
left Matrix3 第一个矩阵.
right Matrix3 第二矩阵.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.multiplyByScalar(matrix, scalar, result)Matrix3

计算矩阵和标尺的产物.
Name Type Description
matrix Matrix3 The matrix.
scalar number 要乘之数.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.multiplyByScale(matrix, scale, result)Matrix3

计算矩阵乘以(非统一)尺度的产物,仿佛尺度是尺度矩阵.
Name Type Description
matrix Matrix3 左侧的矩阵.
scale Cartesian3 右侧非统一尺度.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
Example:
// Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);
Cesium.Matrix3.multiplyByScale(m, scale, m);
See:

static Cesium.Matrix3.multiplyByUniformScale(matrix, scale, result)Matrix3

计算矩阵乘以统一尺度的产物,仿佛尺度是尺度矩阵.
Name Type Description
matrix Matrix3 左侧的矩阵.
scale number 右侧的统一尺尺.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
Example:
// Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);
Cesium.Matrix3.multiplyByUniformScale(m, scale, m);
See:

static Cesium.Matrix3.multiplyByVector(matrix, cartesian, result)Cartesian3

计算矩阵和柱向量的产物.
Name Type Description
matrix Matrix3 The matrix.
cartesian Cartesian3 The column.
result Cartesian3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.negate(matrix, result)Matrix3

创建所提供矩阵的否定副本.
Name Type Description
matrix Matrix3 否定的矩阵.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.pack(value, array, startingIndex)Array.<number>

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value Matrix3 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

static Cesium.Matrix3.packArray(array, result)Array.<number>

将矩阵3的阵列平整成组件阵列。 构成部分 以列主要顺序存储.
Name Type Description
array Array.<Matrix3> 要打包的矩阵阵列 .
result Array.<number> optional The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a DeveloperError will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.
Returns:
装填的阵列.

static Cesium.Matrix3.setColumn(matrix, index, cartesian, result)Matrix3

计算一个新的矩阵,用所提供的 NT 0 例取代所提供的矩阵中指定的列.
Name Type Description
matrix Matrix3 要使用的矩阵 .
index number 要设置的列的零基索引 .
cartesian Cartesian3 指定的列将指定其值的笛卡尔 .
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
Throws:

static Cesium.Matrix3.setRotation(matrix, rotation, result)Matrix3

设定旋转假设矩阵是affine 转换.
Name Type Description
matrix Matrix3 The matrix.
rotation Matrix3 旋转矩阵.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
See:

static Cesium.Matrix3.setRow(matrix, index, cartesian, result)Matrix3

Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.
Name Type Description
matrix Matrix3 要使用的矩阵 .
index number 要设置的行零基索引 .
cartesian Cartesian3 指定行将分配其值的笛卡尔 .
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
Throws:

static Cesium.Matrix3.setScale(matrix, scale, result)Matrix3

计算新的矩阵,用提供的尺度取代比例表. 这假设矩阵是一种亲缘转变.
Name Type Description
matrix Matrix3 要使用的矩阵 .
scale Cartesian3 替换所提供矩阵的尺度.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
See:

static Cesium.Matrix3.setUniformScale(matrix, scale, result)Matrix3

计算新的矩阵,用所提供的统一尺度来取代比例表. 这假设矩阵是一种亲缘转变.
Name Type Description
matrix Matrix3 要使用的矩阵 .
scale number 用来取代所提供矩阵比例的统一比例表.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .
See:

static Cesium.Matrix3.subtract(left, right, result)Matrix3

计算两个矩阵的差异.
Name Type Description
left Matrix3 第一个矩阵.
right Matrix3 第二矩阵.
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.toArray(matrix, result)Array.<number>

Creates an Array from the provided Matrix3 instance. 阵列将按列主序排列.
Name Type Description
matrix Matrix3 要使用的矩阵...
result Array.<number> optional 存储结果的矩阵 .
Returns:
未提供修改的矩阵参数或新的矩阵实例 .

static Cesium.Matrix3.transpose(matrix, result)Matrix3

计算所提供矩阵的转写.
Name Type Description
matrix Matrix3 变换矩阵 .
result Matrix3 存储结果的对象 .
Returns:
修改的结果参数 .

static Cesium.Matrix3.unpack(array, startingIndex, result)Matrix3

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result Matrix3 optional 存储结果的对象.
Returns:
未提供修改的结果参数或新的 NT% 0 实例 .

static Cesium.Matrix3.unpackArray(array, result)Array.<Matrix3>

将一组列主要矩阵组件解析成一组矩阵3.
Name Type Description
array Array.<number> 要解开的组件阵列 .
result Array.<Matrix3> optional 存储结果的数组 .
Returns:
无包装的阵列.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.