diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 546031b9..fc8b23aa 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -156,7 +156,7 @@ set(ARGOS3_SOURCES_CORE utility/math/cylinder.cpp utility/math/convex_hull.cpp utility/math/pose2.cpp - utility/math/transforms.h + utility/math/transforms.cpp utility/math/vector2.cpp utility/math/vector3.cpp utility/math/plane.cpp diff --git a/src/core/utility/math/transforms.cpp b/src/core/utility/math/transforms.cpp index ffb4b463..a0725f15 100644 --- a/src/core/utility/math/transforms.cpp +++ b/src/core/utility/math/transforms.cpp @@ -1,29 +1,30 @@ #include "transforms.h" -using namespace argos; +namespace argos { -/****************************************/ -/****************************************/ + /****************************************/ + /****************************************/ -CVector3 GlobalToLocal(const CVector3& c_global, - const CVector3& c_translation, - const CQuaternion& c_orientation) { - CVector3 cLocal = c_global - c_translation; - cLocal.Rotate(c_orientation.Inverse()); - return cLocal; -} + CVector3 GlobalToLocal(CVector3 c_global, + CVector3 c_translation, + CQuaternion c_orientation) { + CVector3 cLocal = c_global - c_translation; + cLocal.Rotate(c_orientation.Inverse()); + return cLocal; + } -/****************************************/ -/****************************************/ + /****************************************/ + /****************************************/ -CVector3 LocalToGlobal(const CVector3& c_local, - const CVector3& c_translation, - const CQuaternion& c_orientation) { - CVector cGlobal = c_local.Rotate(c_orientation); - cGlobal += c_translation; - return cGlobal; -} + CVector3 LocalToGlobal(CVector3 c_local, + CVector3 c_translation, + CQuaternion c_orientation) { + CVector3 cGlobal = c_local.Rotate(c_orientation); + cGlobal += c_translation; + return cGlobal; + } -/****************************************/ -/****************************************/ + /****************************************/ + /****************************************/ +} diff --git a/src/core/utility/math/transforms.h b/src/core/utility/math/transforms.h index dfdc8a82..7a47c8b8 100644 --- a/src/core/utility/math/transforms.h +++ b/src/core/utility/math/transforms.h @@ -6,13 +6,13 @@ namespace argos { - CVector3 GlobalToLocal(const CVector3& c_global, - const CVector3& c_translation, - const CQuaternion& c_orientation); + CVector3 GlobalToLocal(CVector3 c_global, + CVector3 c_translation, + CQuaternion c_orientation); - CVector3 LocalToGlobal(const CVector3& c_local, - const CVector3& c_translation, - const CQuaternion& c_orientation); + CVector3 LocalToGlobal(CVector3 c_local, + CVector3 c_translation, + CQuaternion c_orientation); }