# Convert a transformation matrix from world-space to camera-space using Eigen

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?

Eigen::Matrix3f R0; //rotation matrix in world space