MinVR  0.9.0
A multi-platform virtual reality library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Attributes | List of all members
MinVR::AbstractWindow Class Referenceabstract

Base class for windows.

Inheritance diagram for MinVR::AbstractWindow:
MinVR::WindowGLFW

Public Member Functions

 AbstractWindow (WindowSettingsRef settings, std::vector< AbstractCameraRef > cameras)
 
virtual ~AbstractWindow ()
 
virtual void pollForInput (std::vector< EventRef > &events)=0
 Collect window events. More...
 
virtual void swapBuffers ()=0
 Swaps window buffers. More...
 
virtual void makeContextCurrent ()=0
 Make the context current. More...
 
virtual void releaseContext ()=0
 Release the context current. More...
 
virtual void updateHeadTrackingForAllViewports (glm::mat4 headFrame)
 Updates the current head position. More...
 
WindowSettings::StereoType getStereoType ()
 
int getNumViewports ()
 
MinVR::Rect2D getViewport (int n)
 
AbstractCameraRef getCamera (int n)
 
WindowSettingsRef getSettings ()
 
virtual int getWidth ()=0
 
virtual int getHeight ()=0
 
virtual int getXPos ()=0
 
virtual int getYPos ()=0
 

Protected Attributes

WindowSettingsRef _settings
 
std::vector< MinVR::Rect2D_viewports
 
std::vector< AbstractCameraRef_cameras
 

Constructor & Destructor Documentation

MinVR::AbstractWindow::AbstractWindow ( WindowSettingsRef  settings,
std::vector< AbstractCameraRef cameras 
)
virtual MinVR::AbstractWindow::~AbstractWindow ( )
virtual

Member Function Documentation

AbstractCameraRef MinVR::AbstractWindow::getCamera ( int  n)
inline
virtual int MinVR::AbstractWindow::getHeight ( )
pure virtual

Implemented in MinVR::WindowGLFW.

int MinVR::AbstractWindow::getNumViewports ( )
inline
WindowSettingsRef MinVR::AbstractWindow::getSettings ( )
inline
WindowSettings::StereoType MinVR::AbstractWindow::getStereoType ( )
inline
MinVR::Rect2D MinVR::AbstractWindow::getViewport ( int  n)
inline
virtual int MinVR::AbstractWindow::getWidth ( )
pure virtual

Implemented in MinVR::WindowGLFW.

virtual int MinVR::AbstractWindow::getXPos ( )
pure virtual

Implemented in MinVR::WindowGLFW.

virtual int MinVR::AbstractWindow::getYPos ( )
pure virtual

Implemented in MinVR::WindowGLFW.

virtual void MinVR::AbstractWindow::makeContextCurrent ( )
pure virtual

This method should be implemented for each derived class. It makes the associated context current on the calling thread.

Note
A context can only be current on one thread at a time. RenderThread calls this method for each thread.

Implemented in MinVR::WindowGLFW.

virtual void MinVR::AbstractWindow::pollForInput ( std::vector< EventRef > &  events)
pure virtual

This method should be implemented for each derived class. It collects window events and adds them to the events array.

Implemented in MinVR::WindowGLFW.

virtual void MinVR::AbstractWindow::releaseContext ( )
pure virtual

This method should be implemented for each derived class. It releases the associated context that is current on the calling thread.

Note
A context can only be current on one thread at a time.

Implemented in MinVR::WindowGLFW.

virtual void MinVR::AbstractWindow::swapBuffers ( )
pure virtual

This method should be implemented for each derived class. It swaps the front and back opengl buffers.

Implemented in MinVR::WindowGLFW.

virtual void MinVR::AbstractWindow::updateHeadTrackingForAllViewports ( glm::mat4  headFrame)
virtual

This method updates the head position for each camera that is associated with a specific viewport

Parameters
[in]Thenew head position.

Member Data Documentation

std::vector<AbstractCameraRef> MinVR::AbstractWindow::_cameras
protected
WindowSettingsRef MinVR::AbstractWindow::_settings
protected
std::vector<MinVR::Rect2D> MinVR::AbstractWindow::_viewports
protected

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