Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ISVREngine Class Reference

Base class for InSpace that sets up GL windows. More...

#include <ISVREngine.H>

List of all members.

Public Methods

virtual void readDisplaySettings ()
virtual void run (ISApp *app)=0
virtual int maxScreenWidth ()=0
virtual int maxScreenHeight ()=0
virtual int numGlContexts ()
virtual int currentGlContext ()
void setHeadXform (Wtransf m)
 user's head position and orientation

Wtransf headXform (int usernum=0)
virtual void setIOD (double iod)
 stereo: interocular distance

virtual double iod ()
virtual void toggleStereo ()
Wpt displayTopLeft (int tile=0)
 corners of the image plane in world coordinates

Wpt displayTopRight (int tile=0)
Wpt displayBottomLeft (int tile=0)
Wpt displayBottomRight (int tile=0)
int displayHeightPixels (int tile=0)
 size of the image plane in pixels

int displayWidthPixels (int tile=0)
StatusBarstatusBar ()
void quit ()
double synchronizedTime ()

Static Public Methods

ISVREngine * instance ()

Protected Methods

 ISVREngine (int argc, char **argv)
virtual ~ISVREngine ()
void processInput ()
void isInit ()
void isGLContextInit ()

Protected Attributes

ISApp_app
Wtransf _head
double _iod
int _quit
Wpt_list _topl
Wpt_list _topr
Wpt_list _botl
Wpt_list _botr
ARRAY< int > _h
ARRAY< int > _w
ARRAY< int > _stereo
StatusBar_statusBar
WallClockInt_wallClockInt

Static Protected Attributes

ISVREngine * _instance = NULL


Detailed Description

Base class for InSpace that sets up GL windows.

Usage: Programs create their implementation of ISVREngine by calling ISVREngine::createInstance() (which all subclasses should declare) and then an InSpace application is started up by calling ISVREngine::instance()->run(ISApp*). This starts up GL windows etc.. and begins a program drawing and input processing loop that continues until quit() is called. Other parts of this interface are accessor methods for properties of the display, like position in the world and size in pixels. Also, the current head xform from which the projection matricies are determined can be returned. Access to all these methods should occur through the instance() function, for example: ISVREngine::instance()->getHeadXform();

Important Note: Put the following function in all subclasses, not sure how to make it virtual, since it's static? static ISVREngine* createInstance(int argc, char **argv);


Constructor & Destructor Documentation

ISVREngine::ISVREngine int    argc,
char **    argv
[protected]
 

virtual ISVREngine::~ISVREngine   [inline, protected, virtual]
 


Member Function Documentation

virtual int ISVREngine::currentGlContext   [inline, virtual]
 

undefined when the GL context is not active (outside of a draw loop), when it is active, returns the index of the active context.

Wpt ISVREngine::displayBottomLeft int    tile = 0 [inline]
 

Wpt ISVREngine::displayBottomRight int    tile = 0 [inline]
 

int ISVREngine::displayHeightPixels int    tile = 0 [inline]
 

size of the image plane in pixels

Wpt ISVREngine::displayTopLeft int    tile = 0 [inline]
 

corners of the image plane in world coordinates

Wpt ISVREngine::displayTopRight int    tile = 0 [inline]
 

int ISVREngine::displayWidthPixels int    tile = 0 [inline]
 

Wtransf ISVREngine::headXform int    usernum = 0 [inline]
 

ISVREngine* ISVREngine::instance   [inline, static]
 

virtual double ISVREngine::iod   [inline, virtual]
 

void ISVREngine::isGLContextInit   [protected]
 

this initializes standard classes in inspace that have GL context specific initialization to do. should be called once per GL context on startup by implementations.

void ISVREngine::isInit   [protected]
 

this initializes standard classes in inspace should be called once on startup by implementations.

virtual int ISVREngine::maxScreenHeight   [pure virtual]
 

virtual int ISVREngine::maxScreenWidth   [pure virtual]
 

subclasses should override this so that window setup can easily determine the resolution for fullscreen mode.

virtual int ISVREngine::numGlContexts   [inline, virtual]
 

returns the number of GL contexts (displays) that this program controls normally, this is 1, in a multi-pipe Cave situation, it is > 1.

void ISVREngine::processInput   [protected]
 

this runs glue's FSA's should be called once per frame by implementations of this class.

void ISVREngine::quit   [inline]
 

sets _quit to 1, subclasses should respond to this in their control loops

void ISVREngine::readDisplaySettings   [virtual]
 

probably want to call this from run to initialize all the display variables (size, location, etc..) from CONFIGvals.

virtual void ISVREngine::run ISApp   app [pure virtual]
 

called to start up the application, for some implementations (GLUT on an X window system for example) argc and argv can be used to pass display settings etc.. see GLUT doc for more info

void ISVREngine::setHeadXform Wtransf    m [inline]
 

user's head position and orientation

virtual void ISVREngine::setIOD double    iod [inline, virtual]
 

stereo: interocular distance

StatusBar* ISVREngine::statusBar   [inline]
 

double ISVREngine::synchronizedTime   [inline]
 

this time is guaranteed to be synchronized across walls in the Cave but you must have a wallclock device instantiated in your glue device list

virtual void ISVREngine::toggleStereo   [inline, virtual]
 


Member Data Documentation

ISApp* ISVREngine::_app [protected]
 

Wpt_list ISVREngine::_botl [protected]
 

Wpt_list ISVREngine::_botr [protected]
 

ARRAY<int> ISVREngine::_h [protected]
 

Wtransf ISVREngine::_head [protected]
 

ISVREngine * ISVREngine::_instance = NULL [static, protected]
 

double ISVREngine::_iod [protected]
 

int ISVREngine::_quit [protected]
 

StatusBar* ISVREngine::_statusBar [protected]
 

ARRAY<int> ISVREngine::_stereo [protected]
 

Wpt_list ISVREngine::_topl [protected]
 

Wpt_list ISVREngine::_topr [protected]
 

ARRAY<int> ISVREngine::_w [protected]
 

WallClockInt* ISVREngine::_wallClockInt [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 15 16:27:58 2003 for inspace by doxygen1.2.18