Registered Member
|
Is there a simple way to map a Eigen::Matrix4d content to a Qt QMatrix4x4?
Since I'm using a QGlShaderProgram that takes a QMatrix4x4 as uniform for the GLSL mat4 type, I have to copy the content of my Eigen matrices to Qt QMatrix4x4 with a double nested for loop. I don't want to write the loop everytime, nor I don't want to write a conversion function, I think that since I already have the data, they should be mapped simply.
|
Moderator
|
That's more a Qt question, but you can simply do QMatrix4x4(eMVP.data()).
|
Registered Member
|
I do something like this
Something similar should work with regular matrices as well. Regards, Hauke |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]