Transforms
Contains functions for transforming positions to various reference frames.
Source:
Members
- 
    <static> earthOrientationParameters :EarthOrientationParameters
- 
    
    The source of Earth Orientation Parameters (EOP) data, used for computing the transformation between the Fixed and ICRF axes. By default, zero values are used for all EOP values, yielding a reasonable but not completely accurate representation of the ICRF axes.
- 
    <static> iau2006XysData :Iau2006XysData
- 
    
    The source of IAU 2006 XYS data, used for computing the transformation between the Fixed and ICRF axes.
Methods
- 
    <static> computeFixedToIcrfMatrix
- 
    
    
    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. Parameters:Name Type Argument Description dateJulianDate The time at which to compute the rotation matrix. resultMatrix3 <optional> 
 The object onto which to store the result. If this parameter is not specified, a new instance is created and returned. Returns:Matrix3 The rotation matrix, or undefined if the data necessary to do the transformation is not yet loaded.Example// Transform a point from the ICRF axes to the Fixed axes. var now = new Cesium.JulianDate(); var pointInFixed = new Cesium.Cartesian3(...); var fixedToIcrf = Cesium.Transforms.computeIcrfToFixedMatrix(now); var pointInInertial; if (Cesium.defined(fixedToIcrf)) { pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed); }
- 
    <static> computeIcrfToFixedMatrix
- 
    
    
    Computes a rotation matrix to transform a point or vector from the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes to the Earth-Fixed frame axes (ITRF) at a given time. This function may return undefined if the data necessary to do the transformation is not yet loaded. Parameters:Name Type Argument Description dateJulianDate The time at which to compute the rotation matrix. resultMatrix3 <optional> 
 The object onto which to store the result. If this parameter is not specified, a new instance is created and returned. Returns:Matrix3 The rotation matrix, or undefined if the data necessary to do the transformation is not yet loaded.Example//Set the view to the inertial frame. function updateAndRender() { var now = new Cesium.JulianDate(); scene.initializeFrame(); var icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix(now); if (Cesium.defined(icrfToFixed)) { scene.camera.transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed, Cesium.Cartesian3.ZERO); } scene.render(); Cesium.requestAnimationFrame(updateAndRender); } updateAndRender();
- 
    <static> computeTemeToPseudoFixedMatrix
- 
    
    
    Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC. Parameters:Name Type Argument Description dateJulianDate The time at which to compute the rotation matrix. resultMatrix3 <optional> 
 The object onto which to store the result. Returns:Matrix3 The modified result parameter or a new Matrix3 instance if none was provided.Example//Set the view to in the inertial frame. function updateAndRender() { var now = new Cesium.JulianDate(); scene.initializeFrame(); scene.camera.transform = Cesium.Matrix4.fromRotationTranslation(Cesium.Transforms.computeTemeToPseudoFixedMatrix(now), Cesium.Cartesian3.ZERO); scene.render(); Cesium.requestAnimationFrame(updateAndRender); } updateAndRender();
- 
    <static> eastNorthUpToFixedFrame
- 
    
    
    Computes a 4x4 transformation matrix from a reference frame with an east-north-up axes centered at the provided origin to the provided ellipsoid's fixed reference frame. The local axes are defined as: - The xaxis points in the local east direction.
- The yaxis points in the local north direction.
- The zaxis points in the direction of the ellipsoid surface normal which passes through the position.
 Parameters:Name Type Argument Default Description originCartesian3 The center point of the local reference frame. ellipsoidEllipsoid <optional> 
 Ellipsoid.WGS84 The ellipsoid whose fixed frame is used in the transformation. resultMatrix4 <optional> 
 The object onto which to store the result. Returns:Matrix4 The modified result parameter or a new Matrix4 instance if none was provided.Example// Get the transform from local east-north-up at cartographic (0.0, 0.0) to Earth's fixed frame. var ellipsoid = Cesium.Ellipsoid.WGS84; var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.ZERO); var transform = Cesium.Transforms.eastNorthUpToFixedFrame(center); 
- The 
- 
    <static> northEastDownToFixedFrame
- 
    
    
    Computes a 4x4 transformation matrix from a reference frame with an north-east-down axes centered at the provided origin to the provided ellipsoid's fixed reference frame. The local axes are defined as: - The xaxis points in the local north direction.
- The yaxis points in the local east direction.
- The zaxis points in the opposite direction of the ellipsoid surface normal which passes through the position.
 Parameters:Name Type Argument Default Description originCartesian3 The center point of the local reference frame. ellipsoidEllipsoid <optional> 
 Ellipsoid.WGS84 The ellipsoid whose fixed frame is used in the transformation. resultMatrix4 <optional> 
 The object onto which to store the result. Returns:Matrix4 The modified result parameter or a new Matrix4 instance if none was provided.Example// Get the transform from local north-east-down at cartographic (0.0, 0.0) to Earth's fixed frame. var ellipsoid = Cesium.Ellipsoid.WGS84; var center = ellipsoid.cartographicToCartesian(Cesium.Cartographic.ZERO); var transform = Cesium.Transforms.northEastDownToFixedFrame(center); 
- The 
- 
    <static> pointToWindowCoordinates
- 
    
    
    Transform a point from model coordinates to window coordinates. Parameters:Name Type Argument Description modelViewProjectionMatrixMatrix4 The 4x4 model-view-projection matrix. viewportTransformationMatrix4 The 4x4 viewport transformation. pointCartesian3 The point to transform. resultCartesian2 <optional> 
 The object onto which to store the result. Returns:Cartesian2 The modified result parameter or a new Cartesian2 instance if none was provided.
- 
    <static> preloadIcrfFixed
- 
    
    
    Preloads the data necessary to transform between the ICRF and Fixed axes, in either direction, over a given interval. This function returns a promise that, when resolved, indicates that the preload has completed. Parameters:Name Type Description timeIntervalTimeInterval The interval to preload. Returns:Promise A promise that, when resolved, indicates that the preload has completed and evaluation of the transformation between the fixed and ICRF axes will no longer return undefined for a time inside the interval.Examplevar interval = new Cesium.TimeInterval(...); when(preloadIcrfFixed(interval), function() { // the data is now loaded });
