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
bde2a6b4
Commit
bde2a6b4
authored
Jul 27, 2017
by
jcarpent
Browse files
[Collision] Correct DistanceResult operator==
parent
0ba0d832
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/hpp/fcl/collision_data.h
View file @
bde2a6b4
...
...
@@ -469,12 +469,26 @@ public:
/// @brief whether two DistanceResult are the same or not
inline
bool
operator
==
(
const
DistanceResult
&
other
)
const
{
return
min_distance
==
other
.
min_distance
&&
o1
==
other
.
o1
&&
o2
==
other
.
o2
&&
nearest_points
[
0
]
==
other
.
nearest_points
[
0
]
&&
nearest_points
[
1
]
==
other
.
nearest_points
[
1
];
bool
is_same
=
min_distance
==
other
.
min_distance
&&
nearest_points
[
0
]
==
other
.
nearest_points
[
0
]
&&
nearest_points
[
1
]
==
other
.
nearest_points
[
1
]
&&
o1
==
other
.
o1
&&
o2
==
other
.
o2
&&
b1
==
other
.
b1
&&
b2
==
other
.
b2
;
// TODO: check also that two GeometryObject are indeed equal.
if
(
o1
!=
NULL
xor
other
.
o1
!=
NULL
)
return
false
;
is_same
&=
(
o1
==
other
.
o1
);
// else if (o1 != NULL and other.o1 != NULL) is_same &= *o1 == *other.o1;
if
(
o2
!=
NULL
xor
other
.
o2
!=
NULL
)
return
false
;
is_same
&=
(
o2
==
other
.
o2
);
// else if (o2 != NULL and other.o2 != NULL) is_same &= *o2 == *other.o2;
return
is_same
;
}
};
}
...
...
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