Click or drag to resize
AB4D logo

StereoscopicCamera Class

StereoscopicCamera is a camera that warps another camera (OriginalCamera) and provides properties that allow using the camera for stereoscopic rendering with different camera for left and for right eye. The current eye is defined by CurrentEye property. The differences of the left and right cameras are defined by EyeSeparation, Parallax and InvertLeftRightView properties.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectX.CamerasStereoscopicCamera

Namespace: Ab3d.DirectX.Cameras
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public class StereoscopicCamera : ICamera

The StereoscopicCamera type exposes the following members.

Constructors
 NameDescription
Public methodStereoscopicCamera Constructor
Top
Properties
 NameDescription
Public propertyAspectRatio Gets or sets an AspectRatio property of the OriginalCamera.
Public propertyCurrentEye Gets or sets the current eye for the camera.
Public propertyEyeSeparation Gets or sets a distance between left and right eye. The distance is specified in the same coordinate system as the camera. When rendering, the camera is first shifter to the left for the half of the EyeSeparation distance. Then the whole scene is rendered. The the camera is shifter to the right for half of the EyeSeparation distance. The best value for EyeSeparation is based on the size of objects in the scene, the size of the Viewport3D, monitor DPI settings and the actual distance between eyes of the user.
Public propertyFarPlaneDistance Gets or sets a FarPlaneDistance property of the OriginalCamera.
Public propertyInvertLeftRightView Gets or sets a Boolean that specifies if positions of the eyes are inverted.
Public propertyNearPlaneDistance Gets or sets a NearPlaneDistance property of the OriginalCamera.
Public propertyOriginalCamera Gets the camera that is used to create the StereoscopicCamera. The original camera is located in the middle between left and right eye.
Public propertyParallax Parallax defines a value in degrees that specifies an angle of the left and right eye look direction. If the parallax is zero, then the look directions of left and right cameras are parallel. If parallax is bigger then zero, then the left and right look directions are pointed to each other and they cross at some position in front of the camera (the bigger the angle the closer the crossing point). Usually the best 3D effect is producted when the parallax is set so that the look directions cross at the center of the scene - look directions of human eyes cross at the point of focus.
Public propertyParentDXScene Gets or sets a ParentDXScene property of the OriginalCamera.
Public propertyParentSceneNode Gets a ParentSceneNode property of the OriginalCamera.
Public propertyProjection Gets a Projection matrix for the current eye.
Public propertyProjectionType Gets a ProjectionType property of the OriginalCamera.
Public propertyView Gets a View matrix for the current eye.
Top
Methods
 NameDescription
Public methodGetCameraPosition Returns eye position for the current eye.
Public methodGetViewProjection Gets a precalculated View * Projection matrix.
Public methodGetWorldViewProjection Returns WorldViewProjection matrix. Calculating this matrix is faster inside Camera because here we can access matrixes by reference.
Public methodUpdate Update method updates the camera matrices when needed (when there were any change in the camera properties) or when forceMatrixUpdate is set to true.
Top
Events
 NameDescription
Public eventCameraChanged CameraChanged event of the OriginalCamera.
Top
See Also