I know that Posit calculates the translation and rotation between your camera and a 3d object. the only problem i have right now is, i have no idea how the coordinate systems of the camera and the object are defined. So for example if i get 90° around the z-axis, in which direction is the z axis pointing and is the object rotating around this axis or is the camera rotating around it?
Edit: After some testing and playing around with different coordinate systems, i think this is right: definition of the camera coordinate system: z-axis is pointing in the direction, in which the camera is looking. x-axis is pointing to the right, while looking in z-direction. y-axis is pointing up, while looking in z-direction.
the object is defined in the same coordinate system, but each point is defined relative to the starting point and not to the coordinate systems origin.
the translation vector you get, tells you how point[0] of the object is moved away from the origin of the camera coordinate system. the rotationmatrix tells you how to rotate the object in the cameras coordinate system, in order to get the objects starting orientation. so the rotation matrix basically doesnt tell you how the object is rotated right now, but it tells you how you have to reverse its current orientation.
can anyone approve this?