Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
38ad98f5
Commit
38ad98f5
authored
Mar 24, 2015
by
Davis King
Browse files
Fixed some bug in the point rotation code and added more unit tests.
parent
898c948f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
dlib/geometry/point_transforms.h
dlib/geometry/point_transforms.h
+2
-2
dlib/test/geometry.cpp
dlib/test/geometry.cpp
+10
-0
No files found.
dlib/geometry/point_transforms.h
View file @
38ad98f5
...
...
@@ -747,7 +747,7 @@ namespace dlib
matrix
<
double
,
3
,
3
>
m
;
m
=
ca
,
0
,
sa
,
0
,
0
,
0
,
0
,
1
,
0
,
-
sa
,
0
,
ca
;
vector
<
double
,
3
>
b
;
...
...
@@ -767,7 +767,7 @@ namespace dlib
matrix
<
double
,
3
,
3
>
m
;
m
=
ca
,
-
sa
,
0
,
sa
,
ca
,
0
,
0
,
0
,
0
;
0
,
0
,
1
;
vector
<
double
,
3
>
b
;
...
...
dlib/test/geometry.cpp
View file @
38ad98f5
...
...
@@ -812,17 +812,27 @@ namespace
const
dlib
::
vector
<
double
>
x
(
1
,
0
,
0
);
const
dlib
::
vector
<
double
>
y
(
0
,
1
,
0
);
const
dlib
::
vector
<
double
>
z
(
0
,
0
,
1
);
const
dlib
::
vector
<
double
>
e
(
1
,
1
,
1
);
const
dlib
::
vector
<
double
>
ex
(
-
1
,
1
,
1
);
const
dlib
::
vector
<
double
>
ey
(
1
,
-
1
,
1
);
const
dlib
::
vector
<
double
>
ez
(
1
,
1
,
-
1
);
dlib
::
vector
<
double
>
w
;
w
=
rotate_around_z
(
pi
/
2
)(
x
);
DLIB_TEST
(
length
(
w
-
y
)
<
1e-12
);
w
=
rotate_around_z
(
pi
/
2
)(
e
);
DLIB_TEST
(
length
(
w
-
ex
)
<
1e-12
);
w
=
rotate_around_y
(
-
pi
/
2
)(
x
);
DLIB_TEST
(
length
(
w
-
z
)
<
1e-12
);
w
=
rotate_around_y
(
pi
/
2
)(
e
);
DLIB_TEST
(
length
(
w
-
ez
)
<
1e-12
);
w
=
rotate_around_x
(
pi
/
2
)(
y
);
DLIB_TEST
(
length
(
w
-
z
)
<
1e-12
);
w
=
rotate_around_x
(
pi
/
2
)(
e
);
DLIB_TEST
(
length
(
w
-
ey
)
<
1e-12
);
w
=
translate_point
(
x
)(
y
);
DLIB_TEST
(
length
(
w
-
x
-
y
)
<
1e-12
);
...
...
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