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

Class wrapping OSVR_DisplayConfig objects, optionally managing shared ownership. More...

#include <Display.h>

Public Member Functions

 DisplayConfig ()
 Empty constructor - constructs a config where valid() is false.
 
 DisplayConfig (ClientContext &ctx)
 Retrieve a display config, owning it and managing its lifetime.
 
 DisplayConfig (UnderlyingDisplayConfigPtr const &ptr)
 Construct from a shared pointer to the underlying display config, taking shared ownership. More...
 
 DisplayConfig (OSVR_DisplayConfig disp)
 Construct from a (presumably-externally-managed) raw display config, not affecting lifetime. More...
 
bool valid () const
 Checks the validity of the contained pointer.
 
DisplayConfigensureValid ()
 
DisplayConfig const & ensureValid () const
 
bool checkStartup () const
 Checks if the display is fully configured and ready, including first pose. More...
 
OSVR_DisplayInputCount getNumDisplayInputs () const
 Returns number of inputs for this display. More...
 
osvr::clientkit::DisplayDimensions getDisplayDimensions (OSVR_DisplayInputCount displayInputIndex) const
 Returns display dimensions for a display input. More...
 
Child-related methods
OSVR_ViewerCount getNumViewers () const
 
Viewer getViewer (OSVR_ViewerCount viewer) const
 
Eye getEye (OSVR_ViewerCount viewer, OSVR_EyeCount eye) const
 
Surface getSurface (OSVR_ViewerCount viewer, OSVR_EyeCount eye, OSVR_SurfaceCount surface) const
 
Iteration methods
template<typename F >
void forEachViewer (F OSVR_CLIENTKIT_FUNCTOR_REF functor)
 
template<typename F >
void forEachEye (F OSVR_CLIENTKIT_FUNCTOR_REF functor)
 
template<typename F >
void forEachSurface (F OSVR_CLIENTKIT_FUNCTOR_REF functor)
 
Identification getters

}

OSVR_DisplayConfig getDisplayConfig () const
 Gets the raw OSVR_DisplayConfig.
 
UnderlyingDisplayConfigPtr getOwningPtr () const
 Gets a copy of the owning pointer, if we hold shared ownership over this DisplayConfig. More...
 

Related Functions

(Note that these are not member functions.)

bool operator== (DisplayConfig const &lhs, DisplayConfig const &rhs)
 Equality operator for clientkit::DisplayConfig - does not consider the ownership status in the comparison.
 
bool operator== (DisplayConfig const &lhs, OSVR_DisplayConfig rhs)
 Equality operator for clientkit::DisplayConfig. More...
 
bool operator== (OSVR_DisplayConfig lhs, DisplayConfig const &rhs)
 Equality operator for clientkit::DisplayConfig. More...
 
bool operator!= (DisplayConfig const &lhs, DisplayConfig const &rhs)
 Inequality operator for clientkit::DisplayConfig - does not consider the ownership status in the comparison.
 
bool operator!= (DisplayConfig const &lhs, OSVR_DisplayConfig rhs)
 Inequality operator for clientkit::DisplayConfig. More...
 
bool operator!= (OSVR_DisplayConfig lhs, DisplayConfig const &rhs)
 Inequality operator for clientkit::DisplayConfig. More...
 

Detailed Description

Class wrapping OSVR_DisplayConfig objects, optionally managing shared ownership.

Constructor & Destructor Documentation

§ DisplayConfig() [1/2]

osvr::clientkit::DisplayConfig::DisplayConfig ( UnderlyingDisplayConfigPtr const &  ptr)
inlineexplicit

Construct from a shared pointer to the underlying display config, taking shared ownership.

§ DisplayConfig() [2/2]

osvr::clientkit::DisplayConfig::DisplayConfig ( OSVR_DisplayConfig  disp)
inlineexplicit

Construct from a (presumably-externally-managed) raw display config, not affecting lifetime.

Member Function Documentation

§ checkStartup()

bool osvr::clientkit::DisplayConfig::checkStartup ( ) const
inline

Checks if the display is fully configured and ready, including first pose.

See also
osvrClientCheckDisplayStartup()

§ forEachEye()

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

For each viewer...

§ forEachSurface()

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

For each viewer...

§ forEachViewer()

template<typename F >
void osvr::clientkit::DisplayConfig::forEachViewer ( F OSVR_CLIENTKIT_FUNCTOR_REF  functor)
inline

For each viewer...

§ getDisplayDimensions()

osvr::clientkit::DisplayDimensions osvr::clientkit::DisplayConfig::getDisplayDimensions ( OSVR_DisplayInputCount  displayInputIndex) const
inline

Returns display dimensions for a display input.

See also
osvrClientGetDisplayDimensions()

§ getNumDisplayInputs()

OSVR_DisplayInputCount osvr::clientkit::DisplayConfig::getNumDisplayInputs ( ) const
inline

Returns number of inputs for this display.

See also
osvrClientGetNumDisplayInputs()

§ getOwningPtr()

UnderlyingDisplayConfigPtr osvr::clientkit::DisplayConfig::getOwningPtr ( ) const
inline

Gets a copy of the owning pointer, if we hold shared ownership over this DisplayConfig.


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