Cartesian3 API

When I look at the terrain example, it zoom to the location and view the map at specific angle. it use Cartesian3 which accept x, y, z values. I cannot figure out the coordinate system it use and what’s the information between eye, target and up:

if (scene.mode === Cesium.SceneMode.SCENE3D) {

eye = new Cesium.Cartesian3(-2496304.1498512086, -4391818.97382059, 3884176.4503971986);

target = Cesium.Cartesian3.add(eye, new Cesium.Cartesian3(0.9279518715011381, -0.29488412129953234, -0.22792252890604328));

up = new Cesium.Cartesian3(-0.11836693744723503, -0.8130611584421428, 0.5700182635106171);

scene.getCamera().controller.lookAt(eye, target, up);

}

how it zoom to ‘Half Dome’. Obviously this (x: -2496304.1498512086,y: -4391818.97382059) is in not the EPSG 4326; And what’s the z:3884176.4503971986 value. Thank you.

Shengqi

Hi,

Those are earth-centered, earth-fixed (ECF or ECEF) coordinates. http://en.wikipedia.org/wiki/ECEF

You can convert EPSG:4326 longitude, latitude, and height to ECF using the Ellipsoid.cartographicToCartesian method. You want to use the WGS84 ellipsoid.

Kevin