Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Utility class to setup a pair of left/right cameras for stereo rendering. More...
#include <StereoCamera.hpp>
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. | |
Camera * | monoCamera () |
The Camera used to drive the left and right cameras. | |
const Camera * | monoCamera () const |
The Camera used to drive the left and right cameras. | |
void | setLeftCamera (Camera *camera) |
The Camera representing the left eye. | |
Camera * | leftCamera () |
The Camera representing the left eye. | |
const Camera * | leftCamera () const |
The Camera representing the left eye. | |
void | setRightCamera (Camera *camera) |
The Camera representing the right eye. | |
Camera * | rigthCamera () |
The Camera representing the right eye. | |
const Camera * | rightCamera () const |
The Camera representing the right eye. | |
void | updateLeftRightCameras () |
Updates the left and right cameras based on the mono camera view matrix and viewport. |
Utility class to setup a pair of left/right cameras for stereo rendering.
Definition at line 47 of file StereoCamera.hpp.
vl::StereoCamera::StereoCamera | ( | ) | [inline] |
Definition at line 52 of file StereoCamera.hpp.
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().