Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
46163d47
Commit
46163d47
authored
Nov 08, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added links for map - scene markers
parent
0757ceae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
align_functions.js
js/align_functions.js
+9
-0
x3dom_deltas.js
js/x3dom_deltas.js
+72
-0
viewer.html
viewer.html
+2
-0
No files found.
js/align_functions.js
View file @
46163d47
...
@@ -270,11 +270,20 @@ function hll3_r_i(i,v){
...
@@ -270,11 +270,20 @@ function hll3_r_i(i,v){
var
f1
=
hll_f_3d_i
(
i
,[
v
[
0
],
v
[
1
],
heading
]);
var
f1
=
hll_f_3d_i
(
i
,[
v
[
0
],
v
[
1
],
heading
]);
var
f2
=
hll_f_map_i
(
i
,[
v
[
0
],
v
[
1
],
heading
]);
var
f2
=
hll_f_map_i
(
i
,[
v
[
0
],
v
[
1
],
heading
]);
console
.
log
(
"f1 vs f2 == start"
);
console
.
log
(
"1: "
+
f1
+
" vs "
+
f2
);
f1
-=
heading
;
f1
-=
heading
;
f2
-=
heading
;
f2
-=
heading
;
console
.
log
(
"2: "
+
f1
+
" vs "
+
f2
);
f1
=
bring_degrees_to_n180_180
(
f1
);
f1
=
bring_degrees_to_n180_180
(
f1
);
f2
=
bring_degrees_to_n180_180
(
f2
);
f2
=
bring_degrees_to_n180_180
(
f2
);
console
.
log
(
"3: "
+
f1
+
" vs "
+
f2
);
console
.
log
(
"f1 vs f2 == stop"
);
//return (f1-f2+360)%360;
//return (f1-f2+360)%360;
return
(
f1
-
f2
);
return
(
f1
-
f2
);
}
}
...
...
js/x3dom_deltas.js
0 → 100644
View file @
46163d47
var
theLastMovedMarker
=
null
;
function
x3dom_delta_markers
(){
// what's the last dragged marker? (over map?)
// see leaflet_init.js
var
index
=
theLastMovedMarker
;
var
marker
=
Data
.
markers
[
index
];
//console.log(marker.latitude+", "+marker.longitude);
var
Camera
=
Map
.
marker
;
var
p_mark_ll
=
new
L
.
LatLng
(
marker
.
latitude
,
marker
.
longitude
);
var
p_cam_ll
=
Camera
.
_latlng
;
var
p_w
=
x3dom_delta_map2scene
(
p_cam_ll
,
p_mark_ll
);
$
(
"#deltasphere"
).
remove
();
$
(
"#deltalink"
).
remove
();
var
transl
=
[
p_w
.
x
,
p_w
.
y
,
p_w
.
z
].
join
(
","
);
var
html
=
[
'<group id="deltasphere" class="deltasphere">'
,
' <switch whichChoice="0">'
,
' <transform translation="'
+
transl
+
'" >'
,
' <shape>'
,
' <appearance>'
,
' <material diffuseColor="green" transparency="0.5"></material>'
,
' </appearance>'
,
' <sphere radius="'
+
(
x3dom_markersize
()
/
2
)
+
'"></sphere>'
,
' </shape>'
,
' </transform>'
,
' </switch>'
,
'</group>'
].
join
(
'
\
n'
);
var
sphere_element
=
$
(
html
);
$
(
'scene'
,
Scene
.
element
).
append
(
sphere_element
);
//$(".my-markers").find("material").attr("transparency","0.5");
var
coords
=
[
p_w
.
x
+
" "
+
p_w
.
y
+
" "
+
p_w
.
z
,
marker
.
x
+
" "
+
marker
.
y
+
" "
+
marker
.
z
,
].
join
(
" "
);
var
html
=
[
'<group id="deltalink" class="deltalink">'
,
' <switch whichChoice="0">'
,
' <transform>'
,
' <shape>'
,
' <appearance>'
,
' <material emissiveColor="white" transparency="0.0"></material>'
,
' </appearance>'
,
' <lineset vertexCount="2" solid="true" ccw="true" lit="true">'
,
' <coordinate point="'
+
coords
+
'"></coordinate>'
,
' </lineset>'
,
' </shape>'
,
' </transform>'
,
' </switch>'
,
'</group>'
].
join
(
'
\
n'
);
var
sphere_element
=
$
(
html
);
$
(
'scene'
,
Scene
.
element
).
append
(
sphere_element
);
}
viewer.html
View file @
46163d47
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
<!---script type='text/javascript' src='js/x3dom/x3dom-full.debug.js'></script-->
<!---script type='text/javascript' src='js/x3dom/x3dom-full.debug.js'></script-->
<script
type=
'text/javascript'
src=
'js/x3dom_init.js'
></script>
<script
type=
'text/javascript'
src=
'js/x3dom_init.js'
></script>
<script
type=
'text/javascript'
src=
'js/x3dom_functions.js'
></script>
<script
type=
'text/javascript'
src=
'js/x3dom_functions.js'
></script>
<script
type=
'text/javascript'
src=
'js/x3dom_deltas.js'
></script>
<script
type=
'text/javascript'
src=
'js/leaflet_init.js'
></script>
<script
type=
'text/javascript'
src=
'js/leaflet_init.js'
></script>
<script
type=
'text/javascript'
src=
'js/x3l.js'
></script>
<script
type=
'text/javascript'
src=
'js/x3l.js'
></script>
...
@@ -110,6 +111,7 @@ Instructions:
...
@@ -110,6 +111,7 @@ Instructions:
5. To save the result click upload button (Camera initial position and orientation data) in the menu.'
class=
'edit'
></div>
5. To save the result click upload button (Camera initial position and orientation data) in the menu.'
class=
'edit'
></div>
<div
id=
'align_button_heading'
title=
'variable heading, fixed location'
class=
'edit'
></div>
<div
id=
'align_button_heading'
title=
'variable heading, fixed location'
class=
'edit'
></div>
<div
id=
'align_button_location'
title=
'variable location, fixed heading'
class=
'edit'
></div>
<div
id=
'align_button_location'
title=
'variable location, fixed heading'
class=
'edit'
></div>
<div
id=
'markers_delta_button'
title=
'link marker from model to marker from map (height==viewer height)'
class=
'edit'
></div>
<!--<div id='align_tr_button' title='Align tilt and roll' class='edit'></div>-->
<!--<div id='align_tr_button' title='Align tilt and roll' class='edit'></div>-->
<div
id=
'align_tr_button'
title=
'Run least squares fitting algorithm (Gauss-Newton) for camera tilt, roll and altitude (relative).
<div
id=
'align_tr_button'
title=
'Run least squares fitting algorithm (Gauss-Newton) for camera tilt, roll and altitude (relative).
Instructions:
Instructions:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment