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

InSpace::ISVREngine Class Reference

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

#include <ISVREngine.H>

Inherited by InSpace::G3DEngine.

List of all members.

Public Member Functions

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 Member Functions

ISVREngineinstance ()

Protected Member Functions

 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 > _xpos
ARRAY< int > _ypos
ARRAY< int > _stereo
StatusBar_statusBar
WallClockInt_wallClockInt

Static Protected Attributes

ISVREngine_instance


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

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

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


Member Function Documentation

virtual int InSpace::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 InSpace::ISVREngine::displayBottomLeft int  tile = 0  )  [inline]
 

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

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

size of the image plane in pixels

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

corners of the image plane in world coordinates

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

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

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

ISVREngine* InSpace::ISVREngine::instance  )  [inline, static]
 

virtual double InSpace::ISVREngine::iod  )  [inline, virtual]
 

void InSpace::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 InSpace::ISVREngine::isInit  )  [protected]
 

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

virtual int InSpace::ISVREngine::maxScreenHeight  )  [pure virtual]
 

Implemented in InSpace::G3DEngine.

virtual int InSpace::ISVREngine::maxScreenWidth  )  [pure virtual]
 

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

Implemented in InSpace::G3DEngine.

virtual int InSpace::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 InSpace::ISVREngine::processInput  )  [protected]
 

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

void InSpace::ISVREngine::quit  )  [inline]
 

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

virtual void InSpace::ISVREngine::readDisplaySettings  )  [virtual]
 

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

virtual void InSpace::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

Implemented in InSpace::G3DEngine.

void InSpace::ISVREngine::setHeadXform Wtransf  m  )  [inline]
 

user's head position and orientation

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

stereo: interocular distance

StatusBar* InSpace::ISVREngine::statusBar  )  [inline]
 

double InSpace::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 InSpace::ISVREngine::toggleStereo  )  [inline, virtual]
 


Member Data Documentation

ISApp* InSpace::ISVREngine::_app [protected]
 

Wpt_list InSpace::ISVREngine::_botl [protected]
 

Wpt_list InSpace::ISVREngine::_botr [protected]
 

ARRAY<int> InSpace::ISVREngine::_h [protected]
 

Wtransf InSpace::ISVREngine::_head [protected]
 

ISVREngine* InSpace::ISVREngine::_instance [static, protected]
 

double InSpace::ISVREngine::_iod [protected]
 

int InSpace::ISVREngine::_quit [protected]
 

StatusBar* InSpace::ISVREngine::_statusBar [protected]
 

ARRAY<int> InSpace::ISVREngine::_stereo [protected]
 

Wpt_list InSpace::ISVREngine::_topl [protected]
 

Wpt_list InSpace::ISVREngine::_topr [protected]
 

ARRAY<int> InSpace::ISVREngine::_w [protected]
 

WallClockInt* InSpace::ISVREngine::_wallClockInt [protected]
 

ARRAY<int> InSpace::ISVREngine::_xpos [protected]
 

ARRAY<int> InSpace::ISVREngine::_ypos [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Jul 8 15:19:30 2004 for inspace by doxygen 1.3.4