Commit b10dc7fb authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Fix constness in ComputeCollision and ComputeDistance

parent 4a79d753
Pipeline #12903 failed with stage
in 38 minutes and 16 seconds
......@@ -97,7 +97,7 @@ public:
ComputeCollision(const CollisionGeometry* o1, const CollisionGeometry* o2);
std::size_t operator()(const Transform3f& tf1, const Transform3f& tf2,
const CollisionRequest& request, CollisionResult& result)
const CollisionRequest& request, CollisionResult& result) const
{
bool cached = request.enable_cached_gjk_guess;
solver.enable_cached_guess = cached;
......@@ -122,7 +122,7 @@ public:
}
inline std::size_t operator()(const Transform3f& tf1, const Transform3f& tf2,
CollisionRequest& request, CollisionResult& result)
CollisionRequest& request, CollisionResult& result) const
{
std::size_t res = operator()(tf1, tf2, (const CollisionRequest&) request, result);
request.updateGuess (result);
......
......@@ -93,7 +93,7 @@ public:
ComputeDistance(const CollisionGeometry* o1, const CollisionGeometry* o2);
FCL_REAL operator()(const Transform3f& tf1, const Transform3f& tf2,
const DistanceRequest& request, DistanceResult& result)
const DistanceRequest& request, DistanceResult& result) const
{
bool cached = request.enable_cached_gjk_guess;
solver.enable_cached_guess = cached;
......@@ -121,7 +121,7 @@ public:
}
inline FCL_REAL operator()(const Transform3f& tf1, const Transform3f& tf2,
DistanceRequest& request, DistanceResult& result)
DistanceRequest& request, DistanceResult& result) const
{
FCL_REAL res = operator()(tf1, tf2, (const DistanceRequest&) request, result);
request.updateGuess (result);
......
......@@ -185,6 +185,6 @@ void exposeCollisionAPI ()
.def (dv::init<ComputeCollision, const CollisionGeometry*, const CollisionGeometry*>())
.def ("__call__", static_cast< std::size_t (ComputeCollision::*)(
const Transform3f&, const Transform3f&,
CollisionRequest&, CollisionResult&) > (&ComputeCollision::operator()));
CollisionRequest&, CollisionResult&) const> (&ComputeCollision::operator()));
}
......@@ -138,6 +138,6 @@ void exposeDistanceAPI ()
.def (dv::init<ComputeDistance, const CollisionGeometry*, const CollisionGeometry*>())
.def ("__call__", static_cast< FCL_REAL (ComputeDistance::*)(
const Transform3f&, const Transform3f&,
DistanceRequest&, DistanceResult&) > (&ComputeDistance::operator()));
DistanceRequest&, DistanceResult&) const> (&ComputeDistance::operator()));
}
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