OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::clientkit::Viewer Class Reference

Wrapper for a viewer bound to a display config. DOES NOT provide lifetime management for the associated display config! More...

#include <osvr/ClientKit/Display.h>

Public Member Functions

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!

Definition at line 332 of file Display.h.

Member Function Documentation

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

Definition at line 372 of file Display.h.

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

For each eye of the given viewer...

Definition at line 381 of file Display.h.

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

For each eye of the given viewer...

Definition at line 388 of file Display.h.


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