1
\$\begingroup\$

I have a transformation matrix, in world space. I need to convert it to local(camera) space.

I have done the reverse of this (Local - to - world) using:

Eigen::Matrix3f R0; //rotation matrix
Eigen::Vector3f T0; // xyz translation values
Eigen::Vector3f C0; //result

R0.transposeInPlace();  //invert rotation matrix

C0 = -R0 * T0;   //return world-space coordinate

Can I simply run this exact same thing to invert it the other way? Or is it a different equation?

\$\endgroup\$
0
\$\begingroup\$

Aha, to solve the reverse, i can simply use:

Eigen::Matrix3f R0; //rotation matrix in world space
Eigen::Vector3f T0; // xyz translation values in world space
Eigen::Vector3f C0; //result

R0.transposeInPlace(); 
C0 = -R0 * T0;

So it is the same equation.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.