ensureValidTurntableCamPos

Makes sure the camera is in an position that is compliant with turntable mode.

Details

The condition for a valid position in turntable mode is that the camera top direction vector is an in-plane vector of the plane spanned by eZ and the camera direction vector d = f - o. To ensure this, the vector p = d x eZ is detemined. This must be orthogonal to the camera top direction:

  • d = focus - origin : camera direction axis, correction axis
  • p = d x eZ : vector in turntable plate plane
  • gamma = angle( p, top ) - PI / 2 : correction angle