SbViewVolumeStereoAbsoluteAdjustments Property |
Namespace: OIV.Inventor
Stereo offset is the distance of each eye from the camera position. The right eye is moved plus offset and the left eye is moved minus offset.
Stereo balance sets the position (distance from the eye) of the zero parallax plane.
The non-absolute mode allows the stereo settings to be valid over a range of different view volume settings. If you chose absolute mode, you are responsible for modifying the stereo settings (if necessary) when the view volume changes.
When sets to true, stereo offset and balance are used as follows for the right eye view:
StereoCameraOffset = StereoAdjustment; FrustumAsymmetry = BalanceAdjustment; glTranslated (-StereoCameraOffset, 0, 0); glFrustum (FrustumLeft + FrustumAsymmetry, FrustumRight + FrustumAsymmetry, FrustumBottom, FrustumTop, NearClipDistance, FarClipDistance);
When sets to false, stereo offset and balance are used as follows for the right eye view:
Xrange is right minus left (i.e., first two arguments of glFrustum) and multiply that difference by the ratio of the distance to the desired plane of zero parallax to the near clipping plane distance.
StereoCameraOffset = Xrange * 0.035 * getStereoAdjustment(); FrustumAsymmetry = -StereoCameraOffset * getBalanceAdjustment(); ZeroParallaxDistance = (NearClipDistance + FarClipDistance)/0.5; FrustumAsymmetry *= NearClipDistance / ZeroParallaxDistance; glTranslated (-StereoCameraOffset, 0, 0); glFrustum (FrustumLeft + FrustumAsymmetry, FrustumRight + FrustumAsymmetry, FrustumBottom, FrustumTop, NearClipDistance, FarClipDistance);