var viewer = new Cesium.Viewer('cesiumContainer');Sandcastle.addToolbarButton('camera up', function() { console.log("up "+viewer.scene.camera.up); console.log("upWC "+viewer.scene.camera.upWC);});
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var viewer = new Cesium.Viewer('cesiumContainer');Sandcastle.addToolbarButton('camera up', function() {
console.log("pos "+viewer.scene.camera.position); console.log("posWC "+viewer.scene.camera.positionWC); console.log("dir "+viewer.scene.camera.direction); console.log("dirWC "+viewer.scene.camera.directionWC); console.log("rig "+viewer.scene.camera.right); console.log("rigWC "+viewer.scene.camera.rightWC);
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;
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);
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));