Appearance
KBE3D / KBCore / Cesium / Transforms / computeFixedToIcrfMatrix
函数: computeFixedToIcrfMatrix()
computeFixedToIcrfMatrix(
date:JulianDate,result?:Matrix3):Matrix3|undefined
Computes a rotation matrix to transform a point or vector from the Earth-Fixed frame axes (ITRF) to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes at a given time. This function may return undefined if the data necessary to do the transformation is not yet loaded.
参数
date
The time at which to compute the rotation matrix.
result?
The object onto which to store the result. If this parameter is not specified, a new instance is created and returned.
返回
Matrix3 | undefined
The rotation matrix, or undefined if the data necessary to do the transformation is not yet loaded.
示例
ts
// Transform a point from the Fixed axes to the ICRF axes.
const now = Cesium.JulianDate.now();
const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
const fixedToIcrf = Cesium.Transforms.computeFixedToIcrfMatrix(now);
let pointInInertial = new Cesium.Cartesian3();
if (Cesium.defined(fixedToIcrf)) {
pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
}