A 3D camera is located at position $(eye_x,eye_y,eye_z)$ and looking at some object located at position $(0,0,0)$.
How can I achieve the same visual result but rotating the object (and having a static camera) instead of translating the camera around?
For example, if the camera eye is located at position $(2,2,2)$ looking at $(0,0,0)$, I guess I should rotate at least the object around Y axis 45° degrees. However, I don't know what calculations starting from the camera vectors (eye,at) should I apply in order to get there.





After struggling with the problem I found a solution that may not be optimal but at least solves the use case.
Here are the steps to rotate an object instead of moving the camera and have the same result:
Get the matrix of the camera:
Matrix.setLookAtM(cameraMatrix, 0, camera.xPos, camera.yPos, camera.zPos, camera.xView, camera.yView, camera.zView, camera.xUp, camera.yUp, camera.zUp);
Extract the rotation matrix:
float[] rotationMatrix = extractRotationMatrix(cameraMatrix); // here it's possible to extract axis and angle from rotationMatrix
Apply transformation to object:
object.applyRotation(rotationMatrix); // ModelMatrix=TranslationMatrix X ScaleMatrix X RotationMatrix