Loading js/ui_init.js +4 −7 Original line number Diff line number Diff line Loading @@ -617,12 +617,9 @@ function leaf_events(){ p_w = x3dom_delta_map2scene(p1_ll,p2_ll); //conversion to real world coordinates var p_rw = xyz_to_real_world(p_w.x,p_w.y,p_w.z); mark.x = p_rw.x; mark.y = p_rw.y; mark.z = p_rw.z; mark.x = p_w.x; mark.y = p_w.y; mark.z = p_w.z; mark.d_map = distance; Loading Loading @@ -780,7 +777,7 @@ function leaf_drag_marker(){ var index = Camera.draggedMarker._index; var p1_ll = Camera._latlng; var p2_ll = Camera.draggedMarker.__latlng; var p2_ll = Camera.draggedMarker._latlng; leaf_update_x3dom_marker(p1_ll,p2_ll,index); X3DOMObject.displayMarkInfo(index); Loading js/util_functions.js +1 −1 Original line number Diff line number Diff line Loading @@ -85,5 +85,5 @@ function xyz_to_real_world(x,y,z){ var p_w = new x3dom.fields.SFVec3f(x,y,z); var p_rw = R0.multMatrixVec(p_w); return [p_rw.x,p_rw.y,p_rw.z]; return {x: p_rw.x, y: p_rw.y, z: p_rw.z}; } js/x3dom_functions.js +0 −9 Original line number Diff line number Diff line Loading @@ -118,11 +118,6 @@ function x3dom_getXYPosOr(cnvx,cnvy,round){ var p_w = new x3dom.fields.SFVec3f(x,y,z); var p_rw = R0.multMatrixVec(p_w); //conversion to real world coordinates x = p_rw.x; y = p_rw.y; z = p_rw.z; if (valid_distance){ dist_xz = Math.sqrt(p_rw.x*p_rw.x+p_rw.z*p_rw.z); dist_xyz = Math.sqrt(p_rw.y*p_rw.y+dist_xz*dist_xz); Loading Loading @@ -190,10 +185,6 @@ function x3dom_getCameraPosOr(round){ //x3dom_matrix_test(); //conversion to real world coordinates var tmp = xyz_to_real_world(tr.x,tr.y,tr.z); tr = new x3dom.fields.SFVec3f(tmp[0],tmp[1],tmp[2]); if (!round){ return { x: tr.x, Loading js/x3dom_init.js +13 −0 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,19 @@ X3DOMObject.displayViewInfo = function(e){ var camera = x3dom_getCameraPosOr(true); //convert to real world coordinates var tmp = xyz_to_real_world(mouse.x,mouse.y,mouse.z); mouse.x = tmp.x.toFixed(2); mouse.y = tmp.y.toFixed(2); mouse.z = tmp.z.toFixed(2); //convert to real world coordinates var tmp = xyz_to_real_world(camera.x,camera.y,camera.z); camera.x = tmp.x.toFixed(2); camera.y = tmp.y.toFixed(2); camera.z = tmp.z.toFixed(2); // ?!!! //Map.marker.setAltitude(camera.y); //Map.marker.setElevation(camera.e*Math.PI/180); Loading Loading
js/ui_init.js +4 −7 Original line number Diff line number Diff line Loading @@ -617,12 +617,9 @@ function leaf_events(){ p_w = x3dom_delta_map2scene(p1_ll,p2_ll); //conversion to real world coordinates var p_rw = xyz_to_real_world(p_w.x,p_w.y,p_w.z); mark.x = p_rw.x; mark.y = p_rw.y; mark.z = p_rw.z; mark.x = p_w.x; mark.y = p_w.y; mark.z = p_w.z; mark.d_map = distance; Loading Loading @@ -780,7 +777,7 @@ function leaf_drag_marker(){ var index = Camera.draggedMarker._index; var p1_ll = Camera._latlng; var p2_ll = Camera.draggedMarker.__latlng; var p2_ll = Camera.draggedMarker._latlng; leaf_update_x3dom_marker(p1_ll,p2_ll,index); X3DOMObject.displayMarkInfo(index); Loading
js/util_functions.js +1 −1 Original line number Diff line number Diff line Loading @@ -85,5 +85,5 @@ function xyz_to_real_world(x,y,z){ var p_w = new x3dom.fields.SFVec3f(x,y,z); var p_rw = R0.multMatrixVec(p_w); return [p_rw.x,p_rw.y,p_rw.z]; return {x: p_rw.x, y: p_rw.y, z: p_rw.z}; }
js/x3dom_functions.js +0 −9 Original line number Diff line number Diff line Loading @@ -118,11 +118,6 @@ function x3dom_getXYPosOr(cnvx,cnvy,round){ var p_w = new x3dom.fields.SFVec3f(x,y,z); var p_rw = R0.multMatrixVec(p_w); //conversion to real world coordinates x = p_rw.x; y = p_rw.y; z = p_rw.z; if (valid_distance){ dist_xz = Math.sqrt(p_rw.x*p_rw.x+p_rw.z*p_rw.z); dist_xyz = Math.sqrt(p_rw.y*p_rw.y+dist_xz*dist_xz); Loading Loading @@ -190,10 +185,6 @@ function x3dom_getCameraPosOr(round){ //x3dom_matrix_test(); //conversion to real world coordinates var tmp = xyz_to_real_world(tr.x,tr.y,tr.z); tr = new x3dom.fields.SFVec3f(tmp[0],tmp[1],tmp[2]); if (!round){ return { x: tr.x, Loading
js/x3dom_init.js +13 −0 Original line number Diff line number Diff line Loading @@ -1241,6 +1241,19 @@ X3DOMObject.displayViewInfo = function(e){ var camera = x3dom_getCameraPosOr(true); //convert to real world coordinates var tmp = xyz_to_real_world(mouse.x,mouse.y,mouse.z); mouse.x = tmp.x.toFixed(2); mouse.y = tmp.y.toFixed(2); mouse.z = tmp.z.toFixed(2); //convert to real world coordinates var tmp = xyz_to_real_world(camera.x,camera.y,camera.z); camera.x = tmp.x.toFixed(2); camera.y = tmp.y.toFixed(2); camera.z = tmp.z.toFixed(2); // ?!!! //Map.marker.setAltitude(camera.y); //Map.marker.setElevation(camera.e*Math.PI/180); Loading