Skip to content
GitLab
Menu
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
15ff829d
Commit
15ff829d
authored
Dec 14, 2019
by
Robin Strudel
Committed by
rstrudel
Dec 14, 2019
Browse files
Remove useless redundancy
parent
1a43a995
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/distance_capsule_capsule.cpp
View file @
15ff829d
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
// http://www.boost.org/LICENSE_1_0.txt
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
//
// Modified by Florent Lamiraux 2014
#include
<cmath>
#include
<cmath>
#include
<limits>
#include
<limits>
...
@@ -74,17 +73,6 @@ namespace fcl {
...
@@ -74,17 +73,6 @@ namespace fcl {
{
{
// Check if the segments degenerate into points
// Check if the segments degenerate into points
s
=
t
=
0.0
;
s
=
t
=
0.0
;
FCL_REAL
distance
=
(
p1
-
p2
).
norm
();
Vec3f
normal
=
(
p1
-
p2
)
/
distance
;
result
.
normal
=
normal
;
distance
=
distance
-
(
radius1
+
radius2
);
result
.
min_distance
=
distance
;
if
(
request
.
enable_nearest_points
)
{
result
.
nearest_points
[
0
]
=
p1
-
radius1
*
normal
;
result
.
nearest_points
[
1
]
=
p2
+
radius2
*
normal
;
}
return
distance
;
}
}
else
if
(
a
<=
EPSILON
)
else
if
(
a
<=
EPSILON
)
{
{
...
@@ -100,7 +88,7 @@ namespace fcl {
...
@@ -100,7 +88,7 @@ namespace fcl {
}
}
else
else
{
{
// Always non-negative, equal 0 if the segments are
parallel
// Always non-negative, equal 0 if the segments are
colinear
FCL_REAL
denom
=
fmax
(
a
*
e
-
b
*
b
,
0
);
FCL_REAL
denom
=
fmax
(
a
*
e
-
b
*
b
,
0
);
if
(
denom
>
EPSILON
)
if
(
denom
>
EPSILON
)
...
...
Write
Preview
Supports
Markdown
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