Commit a0d0d970 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

toggle LIDAR mode

parent 9124fdc1
Pipeline #644 failed with stages
......@@ -200,6 +200,7 @@ html, body, #x3d_wrapper {
height:25px;
}
#toggle_lidar_button,
#exit_button,
#align_button,
#align_button_heading,
......@@ -221,6 +222,10 @@ html, body, #x3d_wrapper {
margin-bottom: 2px;
}
#toggle_lidar_button{
background-image:url('images/baseline_track_changes_black_48dp.png');
}
#exit_button{
background-image:url('images/ic_exit_to_app_black_48dp_1x.png');
}
......@@ -253,6 +258,7 @@ html, body, #x3d_wrapper {
background-color: rgba(240,150,150,1);
}
#toggle_lidar_button:hover,
#align_button:hover,
#align_button_heading:hover,
#align_button_location:hover,
......
......@@ -80,8 +80,8 @@ var SETTINGS = {
y: 0,
z: -0.12
},
'clipnear': -20000,
'clipfar' : 20000
'clipnear': 0,
'clipfar' : 200
// 'kml' : "scene.kml"
}
......@@ -111,6 +111,8 @@ var MPR = {
// recorded marks restored
var MPR_MARKS_LOADED = false;
var LIDAR_MODE = false;
// no comments
function parseURL(){
var parameters=location.href.replace(/\?/ig,"&").split("&");
......@@ -286,8 +288,8 @@ function light_init(){
' <transform id=\'x3d_transform\' class=\'inline_wrapper\'>',
' <transform translation=\''+([SETTINGS.mountshift.x,SETTINGS.mountshift.y,SETTINGS.mountshift.z].join(','))+'\'>',
' <inline name="x3d_'+model_name+'" namespacename="x3d_'+model_name+'" url="'+model_url+'"></inline>',
' <clipplane id=\'clipfar_cp\' enabled="true" on="true" plane="0,0,1,20000"></clipplane>',
' <clipplane id=\'clipnear_cp\' enabled="true" on="true" plane="0,0,-1,20000"></clipplane>',
' <clipplane id=\'clipfar_cp\' class=\'clipplanes\' enabled="true" on="false" plane="0,0,1,200"></clipplane>',
' <clipplane id=\'clipnear_cp\' class=\'clipplanes\' enabled="true" on="false" plane="0,0,-1,0"></clipplane>',
' </transform>',
' </transform>',
' </switch>',
......
......@@ -103,6 +103,20 @@ function menu_init(){
});
$("#toggle_lidar_button").on('click',function(e){
if (LIDAR_MODE===false){
$(this).css({"background-color": "rgba(200,250,200,1)"});
$('.clipplanes').attr('on',true);
}else{
$(this).css({"background-color": "white"});
$('.clipplanes').attr('on',false);
}
LIDAR_MODE = !LIDAR_MODE;
});
$("#window-error").on('click',function(){
$(this).hide();
});
......
......@@ -98,6 +98,8 @@
<div id='download_button_ml' title='Download source files for ml'></div>
<div id='view_src_images_button' title='View/slideshow source images (processed)'></div>
<div id='menu_button' title='Menu'></div>
<div id='toggle_lidar_button' title='Toggle LIDAR mode. This limits the distance of the displayed model to the maximum acquisition distance of a LIDAR.
To change LIDAR scan distance, edit near and far clipping planes in the menu'></div>
<div id='extra_models_button' title='Load extra models' class='experimental'></div>
<div id='align_button' title='Run least squares fitting algorithm (Gauss-Newton) for camera heading and location using markers.
Instructions:
......
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