Commit 8e9a14c7 authored by LucileRemigy's avatar LucileRemigy Committed by Joseph Mirabel
Browse files

Fix compilation warning (#111)

parent 72cb42de
......@@ -93,15 +93,15 @@ public:
}
/// @brief whether the object is completely occupied
inline bool isOccupied() const HPP_FCL_DEPRECATED
inline bool isOccupied() const
{ return cost_density >= threshold_occupied; }
/// @brief whether the object is completely free
inline bool isFree() const HPP_FCL_DEPRECATED
inline bool isFree() const
{ return cost_density <= threshold_free; }
/// @brief whether the object has some uncertainty
bool isUncertain() const HPP_FCL_DEPRECATED;
bool isUncertain() const;
/// @brief AABB center in local coordinate
Vec3f aabb_center;
......
......@@ -333,7 +333,7 @@ private:
if(solver->shapeIntersect(box, box_tf, s, tf2, NULL, NULL, NULL))
{
if(cresult->numContacts() < crequest->num_max_contacts)
cresult->addContact(Contact(tree1, &s, root1 - tree1->getRoot(), Contact::NONE));
cresult->addContact(Contact(tree1, &s, static_cast<int>(root1 - tree1->getRoot()), Contact::NONE));
}
}
else
......@@ -345,7 +345,7 @@ private:
if(solver->shapeIntersect(box, box_tf, s, tf2, &contact, &depth, &normal))
{
if(cresult->numContacts() < crequest->num_max_contacts)
cresult->addContact(Contact(tree1, &s, root1 - tree1->getRoot(), Contact::NONE, contact, normal, depth));
cresult->addContact(Contact(tree1, &s, static_cast<int>(root1 - tree1->getRoot()), Contact::NONE, contact, normal, depth));
}
}
......@@ -808,7 +808,7 @@ private:
if(obb1.overlap(obb2))
{
if(cresult->numContacts() < crequest->num_max_contacts)
cresult->addContact(Contact(tree1, tree2, root1 - tree1->getRoot(), root2 - tree2->getRoot()));
cresult->addContact(Contact(tree1, tree2, static_cast<int>(root1 - tree1->getRoot()), static_cast<int>(root2 - tree2->getRoot())));
}
}
else
......@@ -824,7 +824,7 @@ private:
if(solver->shapeIntersect(box1, box1_tf, box2, box2_tf, &contact, &depth, &normal))
{
if(cresult->numContacts() < crequest->num_max_contacts)
cresult->addContact(Contact(tree1, tree2, root1 - tree1->getRoot(), root2 - tree2->getRoot(), contact, normal, depth));
cresult->addContact(Contact(tree1, tree2, static_cast<int>(root1 - tree1->getRoot()), static_cast<int>(root2 - tree2->getRoot()), contact, normal, depth));
}
}
......
......@@ -86,8 +86,8 @@ inline point now(void)
/// @brief Return the time duration representing a given number of seconds
inline duration seconds(double sec)
{
long s = (long)sec;
long us = (long)((sec - s) * 1000000);
long int s = static_cast<long int>(sec);
long int us = ((static_cast<long int>(sec) - s) * 1000000);
return boost::posix_time::seconds(s) + boost::posix_time::microseconds(us);
}
......
......@@ -151,6 +151,7 @@ namespace fcl {
Vec3f S (tf1.getTranslation ());
// axis of the cylinder
Vec3f u (tf2.getRotation ().col (2));
/// @todo a tiny performance improvement could be achieved using the abscissa with S as the origin
assert ((B - A - (s2.halfLength * 2) * u).norm () < eps);
Vec3f AS (S - A);
// abscissa of S on cylinder axis with A as the origin
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment