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
ba3f0fab
Commit
ba3f0fab
authored
Aug 29, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
critical error
parent
eddacfc2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
align_functions.js
js/align_functions.js
+2
-1
ui_align.js
js/ui_align.js
+3
-0
util_functions.js
js/util_functions.js
+22
-0
No files found.
js/align_functions.js
View file @
ba3f0fab
...
...
@@ -53,7 +53,8 @@ function hll_f_3d_i(i,v){
var
mark
=
Data
.
markers
[
i
];
//var xyz_real = x3dom_scene_to_real(mark.align.x-base.x,mark.align.y-base.y,mark.align.z-base.z);
var
xyz_real
=
x3dom_scene_to_heading
(
mark
.
align
.
x
-
base
.
x
,
mark
.
align
.
y
-
base
.
y
,
mark
.
align
.
z
-
base
.
z
);
//var xyz_real = x3dom_scene_to_heading(mark.align.x-base.x,mark.align.y-base.y,mark.align.z-base.z);
var
xyz_real
=
x3dom_scene_to_heading
(
mark
.
align
.
x
,
mark
.
align
.
y
,
mark
.
align
.
z
);
var
vec
=
new
x3dom
.
fields
.
SFVec3f
(
xyz_real
.
x
,
xyz_real
.
y
,
xyz_real
.
z
);
//var vec = new x3dom.fields.SFVec3f(mark.align.x-base.x,mark.align.y-base.y,mark.align.z-base.z);
...
...
js/ui_align.js
View file @
ba3f0fab
...
...
@@ -305,6 +305,9 @@ function x3dom_align_art(){
result
.
v
[
0
]
=
result
.
v
[
0
]
*
180
/
Math
.
PI
;
result
.
v
[
1
]
=
result
.
v
[
1
]
*
180
/
Math
.
PI
;
result
.
v
[
0
]
=
bring_angle_to_range_deg
(
result
.
v
[
0
],
-
180
,
180
);
result
.
v
[
1
]
=
bring_angle_to_range_deg
(
result
.
v
[
1
],
-
180
,
180
);
apply_alignment_dialog_art
([
0
,
0
,
0
],
result
.
v
,
result
.
count
,
result
.
error
,
true
);
}
...
...
js/util_functions.js
View file @
ba3f0fab
...
...
@@ -87,3 +87,25 @@ function xyz_to_real_world(x,y,z){
return
{
x
:
p_rw
.
x
,
y
:
p_rw
.
y
,
z
:
p_rw
.
z
};
}
function
bring_angle_to_range_deg
(
a
,
a0
,
a1
){
var
res
=
a
;
var
c
=
0
;
while
((
res
<
a0
)
||
(
res
>
a1
)){
c
++
;
if
(
res
<
a0
)
{
res
+=
360
;
}
else
if
(
res
>
a1
){
res
-=
360
;
}
if
(
c
==
100
){
console
.
log
(
"test"
);
break
;
}
}
return
res
;
}
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