Stereo Frustum

Detailed Description

Use these functions to fine tune the stereo frustum's stereoscopic settings and to query information such as projections and view matrices.

List of Functions

void  ZSCore::SetInterPupillaryDistance (float interPupillaryDistance)
  Set the physical separation, or inter-pupillary distance, between the eyes in meters.
float  ZSCore::GetInterPupillaryDistance ()
  Get the physical distance between the user's eyes.
void  ZSCore::SetViewerScale (float viewerScale)
  Set the viewer scale.
float  ZSCore::GetViewerScale ()
  Get the viewer scale.
void  ZSCore::SetFieldOfViewScale (float fieldOfViewScale)
  Set the field of view scale for the frustum.
float  ZSCore::GetFieldOfViewScale ()
  Get the field of view scale.
void  ZSCore::SetHeadTrackingScale (float headTrackingScale)
  Set the uniform scale to be applied to the head tracked position.
float  ZSCore::GetHeadTrackingScale ()
  Get the uniform scale that is applied to the head tracked position.
void  ZSCore::SetGlassesOffset (float glassesOffset)
  Set the glasses offset for the stereo frustum in meters.
float  ZSCore::GetGlassesOffset ()
  Get the glasses offset for the stereo frustum.
void  ZSCore::SetNearClip (float nearClip)
  Set the near clip distance for the frustum in meters.
float  ZSCore::GetNearClip ()
  Get the near clip distance.
void  ZSCore::SetFarClip (float farClip)
  Set the far clip distance for the frustum in meters.
float  ZSCore::GetFarClip ()
  Get the far clip distance.
void  ZSCore::SetPortalMode (int portalModeFlags)
  Set the frustum's portal mode.
int  ZSCore::GetPortalMode ()
  Get the frustum's portal mode.
void  ZSCore::SetCameraOffset (Vector3 cameraOffset)
  Set the frustum's camera offset. This is the distance from the center of viewport to the virtual camera.
Vector3  ZSCore::GetCameraOffset ()
  Get the frustum's camera offset. This is the distance from the center of viewport to the virtual camera.
Matrix4x4  ZSCore::GetViewMatrix (Eye eye)
  Get the view matrix for a specified eye.
Matrix4x4  ZSCore::GetProjectionMatrix (Eye eye)
  Get the projection matrix for a specified eye.
Vector3  ZSCore::GetEyePosition (Eye eye)
  Get the position of a specified eye.
void  ZSCore::GetFrustumBounds (Eye eye, float[] bounds)
  Get the frustum bounds for a specified eye.

List of Enumerations

enum   ZSCore::FrustumAttribute {
  ZSCore::Ipd = 0,
  ZSCore::ViewerScale = 1,
  ZSCore::FovScale = 2,
  ZSCore::HeadScale = 3,
  ZSCore::NearClip = 4,
  ZSCore::FarClip = 5,
  ZSCore::GlassesOffset = 6,
  ZSCore::CCLimit = 7,
  ZSCore::UCLimit = 8,
  ZSCore::CULimit = 9,
  ZSCore::UULimit = 10,
  ZSCore::CCDepth = 11,
  ZSCore::UCDepth = 12
}
enum   ZSCore::PortalMode {
  ZSCore::None = 0,
  ZSCore::Angle = 1,
  ZSCore::Position = 2,
  ZSCore::All = ~0
}
enum   ZSCore::Eye {
  ZSCore::Left = 0,
  ZSCore::Right = 1,
  ZSCore::Center = 2,
  ZSCore::NumEyes
}

List of Variables

float  ZSCore::ViewerScale = 1
float  ZSCore::FieldOfViewScale = 1
float  ZSCore::HeadTrackingScale = 1
float  ZSCore::GlassesOffset = 0.01f

Function Descriptions

Vector3 ZSCore:: GetCameraOffset ( ) [inline]

Get the frustum's camera offset. This is the distance from the center of viewport to the virtual camera.

Returns:
The camera offset in meters.
Vector3 ZSCore:: GetEyePosition ( Eye  eye ) [inline]

Get the position of a specified eye.

Parameters:
eye The eye: left, right, or center.
Returns:
The position of the eye in Vector3 format.
float ZSCore:: GetFarClip ( ) [inline]

Get the far clip distance.

Returns:
The far clip distance in meters.
float ZSCore:: GetFieldOfViewScale ( ) [inline]

Get the field of view scale.

Returns:
The field of view scale.
void ZSCore:: GetFrustumBounds ( Eye  eye,
float[]  bounds 
) [inline]

Get the frustum bounds for a specified eye.

Parameters:
eye The eye: left, right, or center.
bounds The frustum bounds corresponding to a specified eye laid out as follows:
[left, right, bottom, top, nearClip, farClip]
float ZSCore:: GetGlassesOffset ( ) [inline]

Get the glasses offset for the stereo frustum.

Returns:
The distance between the bridge of the glasses and the bridge of the nose in meters.
float ZSCore:: GetHeadTrackingScale ( ) [inline]

Get the uniform scale that is applied to the head tracked position.

Returns:
The scale applied to head tracking.
float ZSCore:: GetInterPupillaryDistance ( ) [inline]

Get the physical distance between the user's eyes.

Returns:
The physical distance in meters.
float ZSCore:: GetNearClip ( ) [inline]

Get the near clip distance.

Returns:
The near clip distance in meters.
int ZSCore:: GetPortalMode ( ) [inline]

Get the frustum's portal mode.

Returns:
A bitmask for the portal mode flags.
Matrix4x4 ZSCore:: GetProjectionMatrix ( Eye  eye ) [inline]

Get the projection matrix for a specified eye.

Parameters:
eye The eye: left, right, or center.
Returns:
The projection matrix in Matrix4x4 format.
float ZSCore:: GetViewerScale ( ) [inline]

Get the viewer scale.

Returns:
The viewer scale.
Matrix4x4 ZSCore:: GetViewMatrix ( Eye  eye ) [inline]

Get the view matrix for a specified eye.

Parameters:
eye The eye: left, right, or center.
Returns:
The view matrix in Matrix4x4 format.
void ZSCore:: SetCameraOffset ( Vector3  cameraOffset ) [inline]

Set the frustum's camera offset. This is the distance from the center of viewport to the virtual camera.

Parameters:
cameraOffset The desired camera offset in meters.
void ZSCore:: SetFarClip ( float  farClip ) [inline]

Set the far clip distance for the frustum in meters.

Parameters:
farClip The far clip distance in meters. Default: 1000
void ZSCore:: SetFieldOfViewScale ( float  fieldOfViewScale ) [inline]

Set the field of view scale for the frustum.

A value greater than 1 causes a wide angle effect, while a value less than 1 causes a zoom effect. However, large changes to the field of view scale will interfere with the mapping between the physical and virtual stylus.

Parameters:
fieldOfViewScale The field of view scale. Default: 1
void ZSCore:: SetGlassesOffset ( float  glassesOffset ) [inline]

Set the glasses offset for the stereo frustum in meters.

Parameters:
glassesOffset The distance between the bridge of the glasses and the bridge of the nose in meters. Default: 1
void ZSCore:: SetHeadTrackingScale ( float  headTrackingScale ) [inline]

Set the uniform scale to be applied to the head tracked position.

Parameters:
headTrackingScale The scale applied to head tracking. Default: 1
void ZSCore:: SetInterPupillaryDistance ( float  interPupillaryDistance ) [inline]

Set the physical separation, or inter-pupillary distance, between the eyes in meters.

An IPD of 0 will effectively disable stereo since the eyes are assumed to be at the same location.

Parameters:
interPupillaryDistance The physical distance in meters. Default: 0.06
void ZSCore:: SetNearClip ( float  nearClip ) [inline]

Set the near clip distance for the frustum in meters.

Parameters:
nearClip The near clip distance in meters. Default: 0.1
void ZSCore:: SetPortalMode ( int  portalModeFlags ) [inline]

Set the frustum's portal mode.

Parameters:
portalModeFlags A bitmask for the portal mode flags.
void ZSCore:: SetViewerScale ( float  viewerScale ) [inline]

Set the viewer scale.

Viewer scale adjusts the display and head tracking for larger and smaller scenes. Use larger values for scenes with large models and smaller values for smaller models.

Parameters:
viewerScale The viewer scale. Default: 1

Enumeration Descriptions

enum ZSCore::Eye

Defines the eyes for the stereo frustum.

Enumerator:
Left 
Right 
Center 
NumEyes 
enum ZSCore::FrustumAttribute

Defines the attributes that you can set and query for the stereo frustum. These attributes are important for comfortable viewing of stereoscopic 3D.

Enumerator:
Ipd 

The physical separation, or inter-pupillary distance, between the eyes in meters. (Default: 0.06)

ViewerScale 

Viewer scale adjusts the display and head tracking for larger and smaller scenes. (Default: 1)

FovScale 

Field of view scale for the frustum. (Default: 1)

HeadScale 

Uniform scale factor applied to the frustum's incoming head pose. (Default: 1)

NearClip 

Near clipping plane for the frustum in meters. (Default: 0.1)

FarClip 

Far clipping plane for the frustum in meters. (Default: 1000)

GlassesOffset 

Distance between the bridge of the glasses and the bridge of the nose in meters. (Default: 0.01)

CCLimit 

Maximum pixel disparity for crossed images (negative parallax) in the coupled zone. (Default: -100) The coupled zone refers to the area where our eyes can both comfortably converge and focus on an object.

UCLimit 

Maximum pixel disparity for uncrossed images (positive parallax) in the coupled zone. (Default: 100)

CULimit 

Maximum pixel disparity for crossed images (negative parallax) in the uncoupled zone. (Default: -200)

UULimit 

Maximum pixel disparity for uncrossed images (positive parallax) in the uncoupled zone. (Default: 250)

CCDepth 

Maximum depth in meters for negative parallax in the coupled zone. (Default: 0.13)

UCDepth 

Maximum depth in meters for positive parallax in the coupled zone. (Default: -0.30)

enum ZSCore::PortalMode

Defines options for positioning the scene relative to the physical display or relative to the viewport.

Enumerator:
None 

The scene is positioned relative to the viewport.

Angle 

The scene's orientation is fixed relative to the physical desktop.

Position 

The scene's position is fixed relative to the center of the display.

All 

All portal modes except "none" are enabled.

Variable Descriptions

float ZSCore::FieldOfViewScale = 1

Field of view scale for the frustum. A value greater than 1 causes a wide angle effect, while a value less than 1 causes a zoom effect.

float ZSCore::GlassesOffset = 0.01f

Distance between the bridge of the glasses and the bridge of the nose in meters.

float ZSCore::HeadTrackingScale = 1

Uniform scale factor applied to the frustum's incoming head pose.

float ZSCore::ViewerScale = 1

Viewer scale adjusts the display and head tracking for larger and smaller scenes. Use larger values for scenes with large models and smaller values for smaller models.