-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed compilation and linking issues with transform functions.
- Loading branch information
Showing
3 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
/****************************************/ | ||
/****************************************/ | ||
/****************************************/ | ||
/****************************************/ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters