Limiting the angle up to which the 3D surface can be rotated or moved manually using mouse click

Continuing the discussion from Limit to +/- 90deg of rotation on the y and x axis. No rotation on z axis - Surface 3D:

Mouse click to move/rotate the 3d surface should only allow rotation up to +/-90 deg on x and y axis. Mouse click should not allow z axis movement. Is this possible?