Created
April 27, 2018 08:41
-
-
Save adujardin/8133a0c49317b18fb3545f76c1bec5db to your computer and use it in GitHub Desktop.
Functions to cast the ZED SDK sl::Matrix4f to Eigen::Matrix4f
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
void Transform2Matrix4f(const sl::Matrix4f &array_, Eigen::Matrix4f &mat_) { | |
for(int y = 0; y < 4; y++) { | |
for(int x = 0; x < 4; x++) | |
mat_(y, x) = array_.m[y * 4 + x]; | |
} | |
} | |
void Matrix4f2Transform(const Eigen::Matrix4f &mat_, sl::Matrix4f &array_) { | |
for(int y = 0; y < 4; y++) { | |
for(int x = 0; x < 4; x++) | |
array_.m[y * 4 + x] = mat_(y, x); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment