public class SoStereoCamera extends SoPerspectiveCamera
This class defines fields to store the stereo settings related to the camera:
See the base class SoPerspectiveCamera
for more information about the inherited fields.
File format/default:
StereoCamera {
offset | 0.7 |
balance | 1.0 |
balanceNearFrac | false |
absoluteAdjustments | false |
Action behavior:
Sets: SoStereoElement
See also:
SoCamera.StereoModes, SoCamera.ViewportMappings
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFBool |
absoluteAdjustments
Specifies if stereo adjustments are absolute.
|
SoSFFloat |
balance
The stereo balance (the position of the zero parallax plane).
|
SoSFBool |
balanceNearFrac
Specifies whether the balance value is defined as a fraction of the camera near distance.
|
SoSFFloat |
offset
The stereo offset (the distance of each eye from the camera position).
|
heightAngle
aspectRatio, farDistance, focalDistance, nearDistance, orientation, position, viewportMapping
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoStereoCamera()
Creates a stereo camera node with default settings.
|
allowStereo, getBalanceAdjustment, getStereoAbsoluteAdjustment, getStereoAdjustment, getStereoMode, getViewportBounds, getViewVolume, getViewVolume, getViewVolume, isBalanceAdjustmentNearFrac, pointAt, scaleHeight, setBalanceAdjustment, setBalanceAdjustment, setStereoAbsoluteAdjustments, setStereoAdjustment, setStereoMode, viewAll, viewAll, viewAll, viewAll, viewAll
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoSFFloat offset
public final SoSFFloat balance
public final SoSFBool balanceNearFrac
Default nearFrac is false.
public final SoSFBool absoluteAdjustments
The default 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 absolute mode is true, stereo offset and balance are used as shown in the following pseudo-code for the right eye view:
The left eye view is symmetric.StereoCameraOffset = offset.getValue(); FrustumAsymmetry = balance.getValue(); glTranslated (-StereoCameraOffset, 0, 0); glFrustum (FrustumLeft + FrustumAsymmetry, FrustumRight + FrustumAsymmetry, FrustumBottom, FrustumTop, NearClipDistance, FarClipDistance);
When absolute mode is false, stereo offset and balance are used as shown in the following pseudo-code 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.
The left eye view is symmetric.StereoCameraOffset = Xrange * 0.035 * offset.getValue(); FrustumAsymmetry = -StereoCameraOffset * balance.getValue(); ZeroParallaxDistance = (NearClipDistance + FarClipDistance)/0.5; FrustumAsymmetry *= NearClipDistance / ZeroParallaxDistance; glTranslated (-StereoCameraOffset, 0, 0); glFrustum (FrustumLeft + FrustumAsymmetry, FrustumRight + FrustumAsymmetry, FrustumBottom, FrustumTop, NearClipDistance, FarClipDistance);
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com