SoStereoCamera Class Reference
[Cameras]

Stereo camera node. More...

#include <Inventor/nodes/SoStereoCamera.h>

Inheritance diagram for SoStereoCamera:
SoPerspectiveCamera SoCamera SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoStereoCamera ()

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFFloat offset
SoSFFloat balance
SoSFBool balanceNearFrac
SoSFBool absoluteAdjustments

Deprecated



virtual SoDEPRECATED void setStereoAdjustment (float adjustment)
virtual SoDEPRECATED void setStereoAbsoluteAdjustments (SbBool absolute)
virtual SoDEPRECATED void setBalanceAdjustment (float adjustment, SbBool nearFrac=false)
virtual SoDEPRECATED void allowStereo (SbBool allowed)

Detailed Description

Stereo camera node.

A stereo camera defines a specific perspective camera for stereo support.

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

ACTION BEHAVIOR

SEE ALSO

SbViewVolume, SoPerspectiveCamera, SoCameraInteractor


Constructor & Destructor Documentation

SoStereoCamera::SoStereoCamera (  ) 

Creates a stereo camera node with default settings.


Member Function Documentation

virtual SoDEPRECATED void SoStereoCamera::allowStereo ( SbBool  allowed  )  [virtual]

Allows the camera to render in stereo.

Do nothing here as this camera is always allowed to render in stereo.

Deprecated:

Deprecated since Open Inventor 9700
Unused

Reimplemented from SoCamera.

static SoType SoStereoCamera::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoPerspectiveCamera.

virtual SoType SoStereoCamera::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoPerspectiveCamera.

virtual SoDEPRECATED void SoStereoCamera::setBalanceAdjustment ( float  adjustment,
SbBool  nearFrac = false 
) [virtual]
Deprecated:

Deprecated since Open Inventor 9700
Use balance and balanceNearFrac fields instead.

Reimplemented from SoCamera.

virtual SoDEPRECATED void SoStereoCamera::setStereoAbsoluteAdjustments ( SbBool  absolute  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9700
Use absoluteAdjustments field instead.

Reimplemented from SoCamera.

virtual SoDEPRECATED void SoStereoCamera::setStereoAdjustment ( float  adjustment  )  [virtual]
Deprecated:

Deprecated since Open Inventor 9700
Use offset field instead.

Reimplemented from SoCamera.


Member Data Documentation

Specifies if stereo adjustments are absolute.

FALSE by default.

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:

 StereoCameraOffset = offset.getValue();
 FrustumAsymmetry   = balance.getValue();

 glTranslated (-StereoCameraOffset, 0, 0);
 glFrustum (FrustumLeft + FrustumAsymmetry, FrustumRight + FrustumAsymmetry,
            FrustumBottom, FrustumTop, NearClipDistance, FarClipDistance);

The left eye view is symmetric.

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.

 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);

The left eye view is symmetric.

The stereo balance (the position of the zero parallax plane).

Default balance is 1.0.

Specifies whether the balance value is defined as a fraction of the camera near distance.

Note: Since the projection matrix always depends on the camera's near plane, in some cases it may be necessary to detect changes to the camera near plane and adjust by setting a new stereo balance value. Open Inventor will make these adjustments automatically if the balanceNearFrac field is set to TRUE. In this case the stereo balance value is defined as a fraction of the camera near distance.

Default nearFrac is FALSE.

The stereo offset (the distance of each eye from the camera position).

The right eye is moved plus offset and the left eye is moved minus offset. Default is 0.7.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/