Skip to content

Commit

Permalink
Change the signature of ConvexHullProjectionConstraint::projectAlongD…
Browse files Browse the repository at this point in the history
…irection() and ConvexHullProjectionConstraint::setProjectionAlongDirection() methods
  • Loading branch information
GiulioRomualdi committed Feb 4, 2021
1 parent e4e8f74 commit 5a57812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/inverse-kinematics/include/iDynTree/ConvexHullHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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);

};
}
Expand Down
4 changes: 2 additions & 2 deletions src/inverse-kinematics/src/ConvexHullHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ namespace iDynTree
return margin;
}

void ConvexHullProjectionConstraint::setProjectionAlongDirection(Vector3 direction)
void ConvexHullProjectionConstraint::setProjectionAlongDirection(const Vector3& direction)
{
Vector3 xProjection, yProjection;

Expand All @@ -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);
Expand Down

0 comments on commit 5a57812

Please sign in to comment.