Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions

vl::StereoCamera Class Reference

Utility class to setup a pair of left/right cameras for stereo rendering. More...

#include <StereoCamera.hpp>

Inheritance diagram for vl::StereoCamera:
vl::Object

List of all members.

Public Member Functions

 StereoCamera ()
void setConvergence (float convergence)
 Distance of the convergence plane from the camera.
float convergence () const
 Distance of the convergence plane from the camera.
void setEyeSeparation (float eye_separation)
 The distance between the center of the two eyes.
float eyeSeparation () const
 The distance between the center of the two eyes.
void setMonoCamera (Camera *camera)
 The Camera used to drive the left and right cameras.
CameramonoCamera ()
 The Camera used to drive the left and right cameras.
const CameramonoCamera () const
 The Camera used to drive the left and right cameras.
void setLeftCamera (Camera *camera)
 The Camera representing the left eye.
CameraleftCamera ()
 The Camera representing the left eye.
const CameraleftCamera () const
 The Camera representing the left eye.
void setRightCamera (Camera *camera)
 The Camera representing the right eye.
CamerarigthCamera ()
 The Camera representing the right eye.
const CamerarightCamera () const
 The Camera representing the right eye.
void updateLeftRightCameras ()
 Updates the left and right cameras based on the mono camera view matrix and viewport.

Detailed Description

Utility class to setup a pair of left/right cameras for stereo rendering.

Usage
See also:
App_Stereo.cpp for a basic example of how to setup stereo rendering using anaglyphs.

Definition at line 47 of file StereoCamera.hpp.


Constructor & Destructor Documentation

vl::StereoCamera::StereoCamera (  ) [inline]

Definition at line 52 of file StereoCamera.hpp.


Member Function Documentation

void vl::StereoCamera::setConvergence ( float  convergence ) [inline]

Distance of the convergence plane from the camera.

The points laying on the convergence plane look the same from both the left and right camera.

Definition at line 60 of file StereoCamera.hpp.

References convergence().

float vl::StereoCamera::convergence (  ) const [inline]

Distance of the convergence plane from the camera.

The points laying on the convergence plane look the same from both the left and right camera.

Definition at line 63 of file StereoCamera.hpp.

Referenced by setConvergence().

void vl::StereoCamera::setEyeSeparation ( float  eye_separation ) [inline]

The distance between the center of the two eyes.

Definition at line 66 of file StereoCamera.hpp.

float vl::StereoCamera::eyeSeparation (  ) const [inline]

The distance between the center of the two eyes.

Definition at line 68 of file StereoCamera.hpp.

void vl::StereoCamera::setMonoCamera ( Camera camera ) [inline]

The Camera used to drive the left and right cameras.

The mono camera viewport will be automatically used by the left and right cameras as well.

Definition at line 72 of file StereoCamera.hpp.

Camera* vl::StereoCamera::monoCamera (  ) [inline]

The Camera used to drive the left and right cameras.

The mono camera viewport will be automatically used by the left and right cameras as well.

Definition at line 75 of file StereoCamera.hpp.

References vl::ref< T >::get().

const Camera* vl::StereoCamera::monoCamera (  ) const [inline]

The Camera used to drive the left and right cameras.

The mono camera viewport will be automatically used by the left and right cameras as well.

Definition at line 78 of file StereoCamera.hpp.

References vl::ref< T >::get().

void vl::StereoCamera::setLeftCamera ( Camera camera ) [inline]

The Camera representing the left eye.

Definition at line 81 of file StereoCamera.hpp.

Camera* vl::StereoCamera::leftCamera (  ) [inline]

The Camera representing the left eye.

Definition at line 83 of file StereoCamera.hpp.

References vl::ref< T >::get().

const Camera* vl::StereoCamera::leftCamera (  ) const [inline]

The Camera representing the left eye.

Definition at line 85 of file StereoCamera.hpp.

References vl::ref< T >::get().

void vl::StereoCamera::setRightCamera ( Camera camera ) [inline]

The Camera representing the right eye.

Definition at line 88 of file StereoCamera.hpp.

Camera* vl::StereoCamera::rigthCamera (  ) [inline]

The Camera representing the right eye.

Definition at line 90 of file StereoCamera.hpp.

References vl::ref< T >::get().

const Camera* vl::StereoCamera::rightCamera (  ) const [inline]

The Camera representing the right eye.

Definition at line 92 of file StereoCamera.hpp.

References vl::ref< T >::get().

void vl::StereoCamera::updateLeftRightCameras (  ) [inline]

Updates the left and right cameras based on the mono camera view matrix and viewport.

Definition at line 95 of file StereoCamera.hpp.

References vl::fDEG_TO_RAD, vl::Matrix4< float >::getTranslation(), vl::radians(), and vl::tan().


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

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:12.
Permission is granted to use this page to write and publish articles regarding Visualization Library.