https://github.com/AnalyticalGraphicsInc/cesium/blob/1.8/Source/Scene/Camera.js#L448
if (mode === SceneMode.SCENE3D || mode === SceneMode.MORPHING) {
camera._positionCartographic = camera._projection.ellipsoid.cartesianToCartographic(camera._positionWC, camera._positionCartographic);
} else {
// The camera position is expressed in the 2D coordinate system where the Y axis is to the East,
// the Z axis is to the North, and the X axis is out of the map. Express them instead in the ENU axes where
// X is to the East, Y is to the North, and Z is out of the local horizontal plane.
var positionENU = scratchCartesian;
positionENU.x = camera._positionWC.y;
positionENU.y = camera._positionWC.z;
positionENU.z = camera._positionWC.x;
``
Why isn’t the coordinate system the same as the ENU system?
https://github.com/AnalyticalGraphicsInc/cesium/blob/1.8/Source/Scene/Camera.js#L215
Camera.TRANSFORM_2D = new Matrix4(
0.0, 0.0, 1.0, 0.0,
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 0.0, 1.0);
``
That explains the X<->Y swap, the Y<->Z swap, and the Z<->X swap. Why not just make the TRANSFORM_2D the same as Matrix4.IDENTITY ?
https://github.com/AnalyticalGraphicsInc/cesium/blob/1.8/Source/Core/Matrix4.js#L2493
Matrix4.IDENTITY = freezeObject(new Matrix4(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0));
``