Commit bdc1185e authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

+ reset view

parent 79751523
...@@ -314,6 +314,8 @@ function x3d_initial_camera_placement(){ ...@@ -314,6 +314,8 @@ function x3d_initial_camera_placement(){
var viewpoint = $(Scene.element).find("Viewpoint"); var viewpoint = $(Scene.element).find("Viewpoint");
viewpoint.attr("orientation",AA[0].toString()+" "+AA[1]); viewpoint.attr("orientation",AA[0].toString()+" "+AA[1]);
viewpoint.attr("position",Rc_w.e3().toString());
viewpoint.attr("centerOfRotation",Rc_w.e3().toString());
} }
......
...@@ -60,9 +60,9 @@ function menu_init(){ ...@@ -60,9 +60,9 @@ function menu_init(){
// changing a checkbox will not close menu // changing a checkbox will not close menu
menu.on('click',function(e){ menu.on('click',function(e){
var class1 = $(e.target).hasClass("my-check-box"); var test = $(e.target).hasClass("donothide");
var class2 = $(e.target).hasClass("input");
if (!class1&&!class2){ if (!test){
menu.hide(); menu.hide();
} }
}); });
...@@ -86,6 +86,8 @@ function menu_init(){ ...@@ -86,6 +86,8 @@ function menu_init(){
shiftspeed_init(); shiftspeed_init();
marker_size_color_init(); marker_size_color_init();
reset_view_init();
} }
function crosshair_init(){ function crosshair_init(){
...@@ -128,3 +130,12 @@ function marker_size_color_init(){ ...@@ -128,3 +130,12 @@ function marker_size_color_init(){
} }
function reset_view_init(){
$("#reset_view").on('click',function(){
x3d_initial_camera_placement();
x3d_mouseMove();
Scene.resize();
});
}
\ No newline at end of file
...@@ -65,39 +65,48 @@ ...@@ -65,39 +65,48 @@
<table> <table>
<tr> <tr>
<td>Show marker info (satellite vs 3D model distalnce)</td> <td>Show marker info (satellite vs 3D model distalnce)</td>
<td><input id='markinfo' type='checkbox' class='my-check-box' /></td> <td><input id='markinfo' type='checkbox' class='my-check-box donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>Show view info (x, y, z, azimuth, elevation, skew)</td> <td>Show view info (x, y, z, azimuth, elevation, skew)</td>
<td><input id='viewinfo' type='checkbox' class='my-check-box' /></td> <td><input id='viewinfo' type='checkbox' class='my-check-box donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>Show more info (hitting ray: id, x, y, z, d<sub>xz</sub>, d<sub>xyz</sub>)</td> <td>Show more info (hitting ray: id, x, y, z, d<sub>xz</sub>, d<sub>xyz</sub>)</td>
<td><input id='moreinfo' type='checkbox' class='my-check-box' /></td> <td><input id='moreinfo' type='checkbox' class='my-check-box donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>Show crosshair</td> <td>Show crosshair</td>
<td><input id='crosshair' type='checkbox' class='my-check-box' /></td> <td><input id='crosshair' type='checkbox' class='my-check-box donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>Show pointer marker (green sphere over 3D scene)</td> <td>Show pointer marker (green sphere over 3D scene)</td>
<td><input id='pointer' type='checkbox' class='my-check-box' /></td> <td><input id='pointer' type='checkbox' class='my-check-box donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>Highlight 3D elements on mouse over</td> <td>Highlight 3D elements on mouse over</td>
<td><input id='highlight' type='checkbox' class='my-check-box' /></td> <td><input id='highlight' type='checkbox' class='my-check-box donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>View's parallel shift speed</td> <td>View's parallel shift speed</td>
<td><input id='shiftspeed' type='text' class='input' /></td> <td><input id='shiftspeed' type='text' class='input donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>3D marker diameter, m</td> <td>3D marker diameter, m</td>
<td><input id='markersize' type='text' class='input' /></td> <td><input id='markersize' type='text' class='input donothide' /></td>
</tr> </tr>
<tr> <tr>
<td>3D marker color</td> <td>3D marker color</td>
<td><input id='markercolor' type='text' class='input' /></td> <td><input id='markercolor' type='text' class='input donothide' /></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><button id='reset_view' class='donothide'>Reset view</button></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr> </tr>
<tr> <tr>
<td><button>Close</button></td> <td><button>Close</button></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment