# Find out (general) orientation of cube faces with rotated and translated camera

I have the following problem. I have a camera that is initially looking at a cube. The cube is with center at (0, 0, 0). The camera that is initially on (0, 0, 60). The camera can rotate and translate freely around the world while the cube stays fixed. I want for a given position of the camera, to determine which side of cube is oriented to "up", "left", "right", "down", "front" and "back". For example on the given picture we see thaht we are looking at left side of cube and on right side is the front.

I know how to solve the problem if the camera is fixed, but the cube rotates(apply the inverse of the transformation matrix, of the cube, to the normal of face, in which we are interested in(for example (-1, 0, 0) for left) than find face with normal with smallest angle to this vector). But I cant design an algorithm for the camera moving case.

Also I should probably add that the camera stays looking at (0, 0, 0) the whole time. I think that might be relevant...