Skip to content
Snippets Groups Projects
Commit 81639a79 authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #255 from jmirabel/topic/collisionPairs

CollisionPair does not invert indexes. Add CollisionPair::operator==
parents 6ecd3b63 ab39f4f6
No related branches found
No related tags found
No related merge requests found
......@@ -57,10 +57,12 @@ namespace se3
CollisionPair(const GeomIndex co1, const GeomIndex co2) : Base(co1,co2)
{
assert(co1 != co2 && "The index of collision objects must not be equal.");
if (co1 > co2)
{
first = co2; second = co1;
}
}
bool operator== (const CollisionPair& rhs) const
{
return (first == rhs.first && second == rhs.second)
|| (first == rhs.second && second == rhs.first);
}
void disp(std::ostream & os) const { os << "collision pair (" << first << "," << second << ")\n"; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment