[Math] Get the camera transformation matrix (Camera pose, not view matrix)

3dlinear algebralinear-transformationsmatricesrotations

Let's say that I have an object and a camera (its representation) in a 3D world coordinate system. I have the camera pose to see the object (rotation matrix and translation (eye position)). If I apply a transform matrix to the object (a certain scaling/translation/rotation), what do I need to find the correct transform matrix that'll move my camera pose in order that what the camera sees remain unchanged (like it was before the transform was applied on the object)? I can't just apply the same transform as the object (it'll work for a translation, but rotation will cause to lose its target…). Also, a restriction that I have is that I can't apply transforms directly on the world, only on the object itself and on the camera itself (rotation/scaling/translation about the world coordinate system center).

Thanks to anyone that will takes time to help me!
(Sorry for grammar errors, I speak French)

Marc-Antoine

Best Answer

I'm on the right track now, I did as I've suggest earlier :

Should I apply the object's transform to the target point and to a given vector between the camera eye point and target point, then I'll get my new target and my new camera eye point (which is the end of my new vector)? Will that be enough information to setup the camera pose properly?

but I've also applied the transform to the up-vector of the camera to get it right. Result: for any kind of translation/rotation applied to the object the camera move properly (Yeah!). The only problem that remains is when I scale the object. If I shrink it, it gets smaller in the camera view after the transform is applied (and vice-versa).