Verified Commit 00a10361 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Justin Carpentier
Browse files

geometry: mark GeometryData::collisionObjects deprecated.

parent 24152028
......@@ -40,7 +40,10 @@ namespace pinocchio
if (joint>0) geom_data.oMg[i] = (data.oMi[joint] * geom_model.geometryObjects[i].placement);
else geom_data.oMg[i] = geom_model.geometryObjects[i].placement;
#ifdef PINOCCHIO_WITH_HPP_FCL
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
geom_data.collisionObjects[i].setTransform( toFclTransform3f(geom_data.oMg[i]) );
#pragma GCC diagnostic pop
#endif // PINOCCHIO_WITH_HPP_FCL
}
}
......
......@@ -195,7 +195,7 @@ namespace pinocchio
/// The object contains a pointer on the collision geometries contained in geomModel.geometryObjects.
/// \sa GeometryModel::geometryObjects and GeometryObjects
///
std::vector<fcl::CollisionObject> collisionObjects;
std::vector<fcl::CollisionObject> collisionObjects PINOCCHIO_DEPRECATED;
///
/// \brief Defines what information should be computed by distance computation.
......@@ -245,7 +245,8 @@ namespace pinocchio
std::map<JointIndex,GeomIndexList> outerObjects;
GeometryData(const GeometryModel & geomModel);
~GeometryData() {};
GeometryData(const GeometryData & other);
~GeometryData();
/// Fill both innerObjects and outerObjects maps, from vectors collisionObjects and
/// collisionPairs.
......
......@@ -11,6 +11,9 @@
namespace pinocchio
{
// Avoid deprecated warning of collisionObjects
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
inline GeometryData::GeometryData(const GeometryModel & geom_model)
: oMg(geom_model.ngeoms)
, activeCollisionPairs(geom_model.collisionPairs.size(), true)
......@@ -35,6 +38,25 @@ namespace pinocchio
fillInnerOuterObjectMaps(geom_model);
}
inline GeometryData::GeometryData(const GeometryData & other)
: oMg (other.oMg)
, activeCollisionPairs (other.activeCollisionPairs)
#ifdef PINOCCHIO_WITH_HPP_FCL
, collisionObjects (other.collisionObjects)
, distanceRequest (other.distanceRequest)
, distanceResults (other.distanceResults)
, collisionRequest (other.collisionRequest)
, collisionResults (other.collisionResults)
, radius (other.radius)
, collisionPairIndex (other.collisionPairIndex)
#endif // PINOCCHIO_WITH_HPP_FCL
, innerObjects (other.innerObjects)
, outerObjects (other.outerObjects)
{}
inline GeometryData::~GeometryData() {}
#pragma GCC diagnostic pop
template<typename S2, int O2, template<typename,int> class JointCollectionTpl>
GeomIndex GeometryModel::addGeometryObject(const GeometryObject & object,
const ModelTpl<S2,O2,JointCollectionTpl> & model)
......
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