Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
c0ebf022
Commit
c0ebf022
authored
May 04, 2020
by
Joseph Mirabel
Browse files
[test] add a unit test for the GJK guess
parent
e35c3430
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/gjk.cpp
View file @
c0ebf022
...
...
@@ -366,9 +366,17 @@ void test_gjk_triangle_capsule (Vec3f T, bool expect_collision,
if
(
expect_collision
)
BOOST_CHECK_EQUAL
(
status
,
details
::
GJK
::
Inside
);
else
else
{
BOOST_CHECK_EQUAL
(
status
,
details
::
GJK
::
Valid
);
// Check that guess works as expected
Vec3f
guess
=
gjk
.
getGuessFromSimplex
();
// TODO the max number of iteration should be 0
details
::
GJK
gjk2
(
0
,
1e-6
);
details
::
GJK
::
Status
status2
=
gjk2
.
evaluate
(
shape
,
guess
);
BOOST_CHECK_EQUAL
(
status2
,
details
::
GJK
::
Valid
);
}
Vec3f
w0
,
w1
;
if
(
status
==
details
::
GJK
::
Valid
||
gjk
.
hasPenetrationInformation
(
shape
))
{
gjk
.
getClosestPoints
(
shape
,
w0
,
w1
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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