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
eddab0f6
Commit
eddab0f6
authored
Jun 12, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. fixed camera scene-dragging bug
parent
bdf704be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
x3dom_functions.js
js/x3dom_functions.js
+13
-4
No files found.
js/x3dom_functions.js
View file @
eddab0f6
...
...
@@ -547,8 +547,12 @@ function x3dom_update_map(){
var
R0
=
Data
.
camera
.
Matrices
.
R0
;
//var T = x3dom_toYawPitchRoll();
var
p_w
=
mat
.
e3
();
var
dp_w
=
mat
.
e3
();
//var m_rw = T.mult(R0).mult(mat).mult(T.inverse());
// R0 - rw -> w
mat
=
R0
.
mult
(
mat
);
var
ypr
=
x3dom_YawPitchRoll_nc_degs
(
mat
);
...
...
@@ -559,8 +563,6 @@ function x3dom_update_map(){
// real world angle distance of some point
var
dp_w
=
mat
.
e3
();
if
(
Scene
.
old_view_translation
!=
null
){
dp_w
=
dp_w
.
subtract
(
Scene
.
old_view_translation
);
}
...
...
@@ -569,7 +571,14 @@ function x3dom_update_map(){
dp_rw
=
R0
.
multMatrixVec
(
dp_w
);
var
distance
=
Math
.
sqrt
(
dp_rw
.
x
*
dp_rw
.
x
+
dp_rw
.
z
*
dp_rw
.
z
);
var
angle
=
180
/
Math
.
PI
*
Math
.
atan2
(
dp_rw
.
x
,
-
dp_rw
.
z
);
var
angle
=
0
;
if
(
dp_rw
.
z
!=
0
){
angle
=
180
/
Math
.
PI
*
Math
.
atan2
(
dp_rw
.
x
,
-
dp_rw
.
z
);
}
//angle = angle + heading;
var
initial_coordinates
=
[
Data
.
camera
.
latitude
,
Data
.
camera
.
longitude
];
...
...
@@ -583,7 +592,7 @@ function x3dom_update_map(){
Data
.
camera
.
longitude
=
p1
.
lng
;
Data
.
camera
.
heading
=
heading
;
Scene
.
old_view_translation
=
mat
.
e3
()
;
Scene
.
old_view_translation
=
p_w
;
}
...
...
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