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
8fd01e93
Commit
8fd01e93
authored
Jul 21, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display real world coordinates
parent
2df437f7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
17 deletions
+18
-17
ui_init.js
js/ui_init.js
+4
-7
util_functions.js
js/util_functions.js
+1
-1
x3dom_functions.js
js/x3dom_functions.js
+0
-9
x3dom_init.js
js/x3dom_init.js
+13
-0
No files found.
js/ui_init.js
View file @
8fd01e93
...
...
@@ -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
;
...
...
@@ -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
);
...
...
js/util_functions.js
View file @
8fd01e93
...
...
@@ -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
View file @
8fd01e93
...
...
@@ -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
);
...
...
@@ -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
,
...
...
js/x3dom_init.js
View file @
8fd01e93
...
...
@@ -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);
...
...
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