Commit f0aa7acd authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux florent@laas.fr
Browse files

[CollisionObject] Add const access to fcl and geomData.

parent b8423bab
......@@ -73,6 +73,7 @@ namespace hpp {
/// \param d Ignored if this object represents an obstacle.
/// Otherwise, a DeviceData for the internal device.
FclCollisionObjectPtr_t fcl (DeviceData& d) const;
FclConstCollisionObjectPtr_t fcl (const DeviceData& d) const;
/// Get joint index
const JointIndex& jointIndex () const { return jointIndex_; }
......@@ -112,6 +113,7 @@ namespace hpp {
private:
GeomData& geomData() const;
GeomData& geomData(DeviceData& d) const;
const GeomData& geomData(const DeviceData& d) const;
DevicePtr_t devicePtr;
GeomModelPtr_t geomModel_;
......
......@@ -81,6 +81,12 @@ namespace hpp {
return & geomData(d).collisionObjects[geomInModelIndex];
}
FclConstCollisionObjectPtr_t CollisionObject::fcl
(const DeviceData& d) const
{
return & geomData(d).collisionObjects[geomInModelIndex];
}
JointPtr_t CollisionObject::joint ()
{
if (!devicePtr) return JointPtr_t();
......@@ -134,5 +140,11 @@ namespace hpp {
if (geomData_) return *geomData_;
else return *d.geomData_;
}
const GeomData& CollisionObject::geomData (const DeviceData& d) const
{
if (geomData_) return *geomData_;
else return *d.geomData_;
}
} // namespace pinocchio
} // namespace hpp
Supports Markdown
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