diff --git a/include/hpp/fcl/collision_object.h b/include/hpp/fcl/collision_object.h index 31fc86d82fb3fc6b73409e413e67d1ccfe1cc15a..91c149b903deea1e74677ad7e052237f64463501 100644 --- a/include/hpp/fcl/collision_object.h +++ b/include/hpp/fcl/collision_object.h @@ -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; diff --git a/include/hpp/fcl/internal/traversal_node_octree.h b/include/hpp/fcl/internal/traversal_node_octree.h index e2857da225d33f3a4c1e843d84914ac518a30539..7ece5fd0c31fe0a2eef54aa6ddb7e68eee67c9ac 100644 --- a/include/hpp/fcl/internal/traversal_node_octree.h +++ b/include/hpp/fcl/internal/traversal_node_octree.h @@ -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)); } } diff --git a/include/hpp/fcl/profile.h b/include/hpp/fcl/profile.h index a7e3f2780503a26cc021676e95cfec25d0f3dcbb..497a0a44aea80e4dc92afe9aa4a83618e4d9f0aa 100644 --- a/include/hpp/fcl/profile.h +++ b/include/hpp/fcl/profile.h @@ -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); } diff --git a/src/narrowphase/details.h b/src/narrowphase/details.h index 58036184bf7a6e40b6d75fbb9e73ac39e19f6375..7c4efa3fa69351ba113c9ccc4793f39979fec2f8 100644 --- a/src/narrowphase/details.h +++ b/src/narrowphase/details.h @@ -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