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\$

1 Answer 1

1
\$\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\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .