Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Florian Weik
waLBerla
Commits
4b2621b4
Commit
4b2621b4
authored
Jan 08, 2019
by
Tobias Leemann
Browse files
Fix of circle Acceptance in EPA
parent
856399e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pe/collision/EPA.cpp
View file @
4b2621b4
...
...
@@ -337,11 +337,10 @@ bool EPA::doEPA( GeomPrimitive &geom1, GeomPrimitive &geom2, const GJK& gjk, Vec
{
const
auto
ilen
=
real_t
(
1.0
)
/
center_len
;
ctr
*=
-
ilen
;
// std::cerr << "New support direction: " << ctr << std::endl;
pushSupportMargin
(
geom1
,
geom2
,
ctr
,
margin
,
epaVolume
,
supportA
,
supportB
);
support
=
epaVolume
.
back
();
// Check if support is in expected direction
real_t
supp_dist
=
support
.
length
()
real_t
supp_dist
=
support
.
length
()
;
if
(
floatIsEqual
((
support
%
ctr
).
sqrLength
()
/
support
.
sqrLength
(),
real_t
(
0.0
))
&&
supp_dist
*
supp_dist
<=
upperBoundSqr
&&
supp_dist
*
supp_dist
>=
lowerBoundSqr
)
...
...
@@ -350,7 +349,7 @@ bool EPA::doEPA( GeomPrimitive &geom1, GeomPrimitive &geom2, const GJK& gjk, Vec
contactPoint
=
real_t
(
0.5
)
*
(
supportA
.
back
()
+
supportB
.
back
());
penetrationDepth
=
-
supp_dist
+
real_t
(
2.0
)
*
margin
;
retNormal
=
-
ctr
;
// std::cerr << "Found penetration depth " << penetrationDepth << " with CurvedEPA!" << std::endl;
if
(
penetrationDepth
<
contactThreshold
){
return
true
;
}
else
{
...
...
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