Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Static Public Attributes | List of all members
cinder::gl::StereoAutoFocuser Class Reference

#include <StereoAutoFocuser.h>

Public Member Functions

 StereoAutoFocuser ()
 
void autoFocus (CameraStereo *cam, const Area &area=gl::getViewport())
 
void autoFocus (CameraStereo *cam, const gl::Fbo &buffer)
 
float getSpeed () const
 Returns the speed at which auto-focussing takes place. More...
 
void setSpeed (float factor)
 
float getDepth () const
 Returns the auto-focus depth, which influences the parallax effect. More...
 
void setDepth (float factor)
 
void draw ()
 Draws a visualizer, showing the sample area and the location of the nearest pixel. More...
 

Static Public Attributes

static const int AF_WIDTH = 64
 width and height of the auto focus sample More...
 
static const int AF_HEIGHT = 64
 

Constructor & Destructor Documentation

cinder::gl::StereoAutoFocuser::StereoAutoFocuser ( )

Member Function Documentation

void cinder::gl::StereoAutoFocuser::autoFocus ( CameraStereo cam,
const Area area = gl::getViewport() 
)

Attempts to set an ideal convergence and eye separation. cam is the CameraStereo you use to render the scene and which should be auto-focussed. area is the area that you want to sample. If your autoFocusSpeed is less than 1.0, repeatedly call this function from your update() method.

void cinder::gl::StereoAutoFocuser::autoFocus ( CameraStereo cam,
const gl::Fbo buffer 
)

Attempts to set an ideal convergence and eye separation. cam is the CameraStereo you use to render the scene and which should be auto-focussed. buffer is the FBO depth buffer you want to sample. If your autoFocusSpeed is less than 1.0, repeatedly call this function from your update() method.

float cinder::gl::StereoAutoFocuser::getSpeed ( ) const

Returns the speed at which auto-focussing takes place.

void cinder::gl::StereoAutoFocuser::setSpeed ( float  factor)

Sets the speed at which auto-focussing takes place. A value of 1.0 will immediately focus on the measured value. Lower values will gradually adjust the convergence. If your autoFocusSpeed is less than 1.0, repeatedly call the autoFocus() function from your update() method.

float cinder::gl::StereoAutoFocuser::getDepth ( ) const

Returns the auto-focus depth, which influences the parallax effect.

void cinder::gl::StereoAutoFocuser::setDepth ( float  factor)

Sets the auto-focus depth. A value of 1.0 will adjust the convergence in such a way that the nearest objects are at the plane of the screen and cause no parallax. Lower values will cause the nearest objects to appear behind your screen (positive parallax). Values greater than 1.0 will cause objects to appear in front of your screen (negative parallax). Avoid values much greater than 2.0 to reduce eye strain.

void cinder::gl::StereoAutoFocuser::draw ( )

Draws a visualizer, showing the sample area and the location of the nearest pixel.

Member Data Documentation

const int cinder::gl::StereoAutoFocuser::AF_WIDTH = 64
static

width and height of the auto focus sample

const int cinder::gl::StereoAutoFocuser::AF_HEIGHT = 64
static

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