From 1f9889ec801537af59a637e0ae2834be98ae93fa Mon Sep 17 00:00:00 2001 From: Mansard <nmansard@laas.fr> Date: Wed, 7 Sep 2016 09:29:55 +0200 Subject: [PATCH] [C++] Geom: remove computeAllDistance and computeAllCollisions from GeomData. Issue 281.8. --- src/multibody/geometry.hpp | 20 +++----------------- src/multibody/geometry.hxx | 20 -------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/src/multibody/geometry.hpp b/src/multibody/geometry.hpp index 49dacec98..42c29d599 100644 --- a/src/multibody/geometry.hpp +++ b/src/multibody/geometry.hpp @@ -289,13 +289,6 @@ namespace se3 /// bool computeCollision(const Index & pairId); - /// - /// \brief Compute the collision result of all the collision pairs according to - /// the current placements of the geometires stored in GeometryData::oMg. - /// The results are stored in the vector GeometryData::collision_results. - /// - void computeAllCollisions(); - /// /// \brief Check if at least one of the collision pairs has its two collision objects in collision. /// The results are stored in the vector GeometryData::collision_results. @@ -314,16 +307,9 @@ namespace se3 /// fcl::DistanceResult & computeDistance(const Index & pairId); - /// - /// \brief Compute the distance result for all collision pairs according to - /// the current placements of the geometries stored in GeometryData::oMg. - /// - /// The method indeed calls computeDistance for each collision - /// pair. Consequently the results are stored in the vector - /// GeometryData::distance_results. - /// - void computeAllDistances() PINOCCHIO_DEPRECATED; - + /// Reset the vector distance_results. + /// TODO: should this be called automatically before calling computeDistance? + /// TODO: should we implement the same for collisions? void resetDistances(); /// Fill both innerObjects and outerObjects maps, from vectors collisionObjects and diff --git a/src/multibody/geometry.hxx b/src/multibody/geometry.hxx index a73801296..f0e96ea12 100644 --- a/src/multibody/geometry.hxx +++ b/src/multibody/geometry.hxx @@ -245,17 +245,6 @@ namespace se3 return collisionResult.isCollision(); } - inline void GeometryData::computeAllCollisions() - { - assert( activeCollisionPairs.size() == model_geom.collisionPairs.size() ); - assert( collision_results .size() == model_geom.collisionPairs.size() ); - for(size_t i = 0; i<model_geom.collisionPairs.size(); ++i) - { - if(activeCollisionPairs[i]) - computeCollision(i); - } - } - inline bool GeometryData::isColliding() { Index& i = collisionPairIndex; @@ -282,15 +271,6 @@ namespace se3 return distance_results[pairId]; } - inline void GeometryData::computeAllDistances () - { - assert( activeCollisionPairs.size() == model_geom.collisionPairs.size() ); - for(size_t i = 0; i<activeCollisionPairs.size(); ++i) - { - if (activeCollisionPairs[i]) computeDistance(i); - } - } - inline void GeometryData::resetDistances() { std::fill(distance_results.begin(), distance_results.end(), fcl::DistanceResult() ); -- GitLab