OSVR-Core
Public Member Functions | Related Functions | List of all members
osvr::clientkit::Viewer Class Reference

Wrapper for a viewer bound to a display config. More...

#include <Display.h>

Public Member Functions

 Viewer (OSVR_DisplayConfig disp, OSVR_ViewerCount viewer)
 
bool getPose (OSVR_Pose3 &pose)
 Attempt to get the viewer pose. More...
 
Child-related methods
OSVR_EyeCount getNumEyes () const
 
Eye getEye (OSVR_EyeCount eye) const
 
Surface getSurface (OSVR_EyeCount eye, OSVR_SurfaceCount surface) const
 
Iteration methods
template<typename F >
void forEachEye (F OSVR_CLIENTKIT_FUNCTOR_REF functor)
 
template<typename F >
void forEachSurface (F functor)
 
Identification getters

}

OSVR_DisplayConfig getDisplayConfig () const
 
OSVR_ViewerCount getViewerID () const
 

Related Functions

(Note that these are not member functions.)

bool operator== (Viewer const &lhs, Viewer const &rhs)
 Equality operator for clientkit::Viewer. More...
 
bool operator!= (Viewer const &lhs, Viewer const &rhs)
 Inequality operator for clientkit::Viewer. More...
 

Detailed Description

Wrapper for a viewer bound to a display config.

DOES NOT provide lifetime management for the associated display config!

Member Function Documentation

§ forEachEye()

template<typename F >
void osvr::clientkit::Viewer::forEachEye ( F OSVR_CLIENTKIT_FUNCTOR_REF  functor)
inline

For each eye of the given viewer...

§ forEachSurface()

template<typename F >
void osvr::clientkit::Viewer::forEachSurface ( functor)
inline

For each eye of the given viewer...

§ getPose()

bool osvr::clientkit::Viewer::getPose ( OSVR_Pose3 pose)
inline

Attempt to get the viewer pose.

Note that there may not necessarily be any surfaces rendered from this pose (it's the unused "center" eye in a stereo configuration) so only use this if it makes integration into your engine or existing applications (not originally designed for stereo) easier.

Returns
false if there was an error in the input parameters or if no pose is yet available

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