From 5a578123147858a83585f9f28629735d44427a3b Mon Sep 17 00:00:00 2001 From: Giulio Romualdi Date: Thu, 4 Feb 2021 20:27:00 +0100 Subject: [PATCH] Change the signature of ConvexHullProjectionConstraint::projectAlongDirection() and ConvexHullProjectionConstraint::setProjectionAlongDirection() methods --- src/inverse-kinematics/include/iDynTree/ConvexHullHelpers.h | 4 ++-- src/inverse-kinematics/src/ConvexHullHelpers.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/inverse-kinematics/include/iDynTree/ConvexHullHelpers.h b/src/inverse-kinematics/include/iDynTree/ConvexHullHelpers.h index a824aa990bd..a140872922f 100644 --- a/src/inverse-kinematics/include/iDynTree/ConvexHullHelpers.h +++ b/src/inverse-kinematics/include/iDynTree/ConvexHullHelpers.h @@ -238,7 +238,7 @@ namespace iDynTree * * @param direction vector along which we want to project a point */ - void setProjectionAlongDirection(Vector3 direction); + void setProjectionAlongDirection(const iDynTree::Vector3& direction); /*! * Project a point along a direction defined by the projection matrix 'Pdirection' @@ -247,7 +247,7 @@ namespace iDynTree * * @param posIn3dInAbsoluteFrame a point we want to project */ - Vector2 projectAlongDirection(iDynTree::Position& posIn3dInAbsoluteFrame); + Vector2 projectAlongDirection(const iDynTree::Position& posIn3dInAbsoluteFrame); }; } diff --git a/src/inverse-kinematics/src/ConvexHullHelpers.cpp b/src/inverse-kinematics/src/ConvexHullHelpers.cpp index d3d01c9cfde..5f7451d4b79 100644 --- a/src/inverse-kinematics/src/ConvexHullHelpers.cpp +++ b/src/inverse-kinematics/src/ConvexHullHelpers.cpp @@ -351,7 +351,7 @@ namespace iDynTree return margin; } - void ConvexHullProjectionConstraint::setProjectionAlongDirection(Vector3 direction) + void ConvexHullProjectionConstraint::setProjectionAlongDirection(const Vector3& direction) { Vector3 xProjection, yProjection; @@ -371,7 +371,7 @@ namespace iDynTree } - Vector2 ConvexHullProjectionConstraint::projectAlongDirection(iDynTree::Position& posIn3dInAbsoluteFrame) + Vector2 ConvexHullProjectionConstraint::projectAlongDirection(const iDynTree::Position& posIn3dInAbsoluteFrame) { iDynTree::Vector2 projected; toEigen(projected) = toEigen(Pdirection) * toEigen(posIn3dInAbsoluteFrame - o);