Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

vrj Namespace Reference


Compounds

class  vrj::CameraProjection
 Projection class that simply takes a matrix for the camera position. More...

class  vrj::Display
 Container class for viewports and window information. More...

class  vrj::DisplayManager
 Singleton Container class for all Displays. More...

class  vrj::Frustum
 A frustum object. More...

class  vrj::Projection
 Pure virtual base class for viewport definitions. More...

class  vrj::SimViewport
class  vrj::SurfaceProjection
 Surface specific class for projection definitions. More...

class  vrj::SurfaceViewport
 Defines a display surface an associated projections. More...

class  vrj::TrackedSurfaceProjection
 Wall-specific class for viewport definitions. More...

class  vrj::Viewport
 Base class for window viewports. More...

class  vrj::DrawManager
 Abstract base class for API-specific Draw Manager. More...

class  vrj::DrawSimInterface
 Base class for all simulator interface across all draw manager types. More...

class  vrj::GlApp
 GlApp: Encapulates an actual OpenGL application. More...

class  vrj::GlBasicSimulator
 Interface for objects that wish to perform simulator function with an OpenGL application. More...

class  vrj::GlContextDataBase
 This class is needed as a base class for GlContextData because of dificulties making friends with a template. More...

class  vrj::GlContextData
 OpenGL helper class that has templatized user context data. More...

struct  vrj::GlContextData::ThreadContextData
 Container for the thread specific context data. More...

class  vrj::GlDrawManager
 Concrete Singleton Class for OpenGL drawing. More...

class  vrj::GlDrawObjectFunctor
 Base interface for an object drawing functor. More...

class  vrj::GlDrawGloveObjectFunctor
 Base class for glove drawing Adds a function for setting glove parameters. More...

class  vrj::GlDrawConeWandFunctor
 Draw a basic cone wand. More...

class  vrj::GlDrawRightAngleWandFunctor
 Draw a wand with a right angle. More...

class  vrj::GlPipe
 Handles the rendering on multiple GLWindows in a single process. More...

class  vrj::GlProcAppWrapper
 Class to wrap a bunch of callback method for a GL app. More...

class  vrj::GlSimInterface
 Interface for objects that wish to perform simulator function with an OpenGL application. More...

class  vrj::GlSimInterfaceFactory
class  vrj::GlUserData
 Holds data about gl users for draw process. More...

class  vrj::GlWindow
 Represent cross-platform interface to OpenGL windows. More...

class  vrj::GlWindowOSX
 A GL specific glWindow for OS X. More...

class  vrj::GlWindowWin32
struct  vrj::MotifWmHints
 this simple motif-esqe definition was taken from GLUT. More...

class  vrj::GlWindowXWin
 A GLX specific glWindow. More...

class  vrj::OpenSGApp
struct  vrj::OpenSGApp::context_data
class  vrj::OsgApp
 OsgApp: Encapulates an open scene graph application. More...

class  vrj::PfApp
 Encapulates an actual Performer application. More...

class  vrj::PfBasicSimulator
 Interface for objects that wish to perform simulator function with an OpenGL application. More...

class  vrj::PfDrawManager
 Concrete singleton class for API specific Draw Manager. More...

struct  vrj::PfDrawManager::pfViewport
 The channels associated with a viewport. More...

struct  vrj::PfDrawManager::pfDisplay
struct  vrj::PfDrawManager::pfDisplay_disp
class  vrj::PfSimInterface
 Interface for objects that wish to perform simulator function with an OpenGL application. More...

class  vrj::PfSimInterfaceFactory
class  vrj::App
 Encapsulates the actually application. More...

class  vrj::Kernel
 Main control class for all vj applications. More...

class  vrj::User
 Representation for Juggler user in multi-user environments. More...

class  vrj::SoundManager
 VR Juggler sound manager. More...

class  vrj::SoundManagerFactory
class  vrj::SoundManagerSonix
 Enables VR Juggler to reconfigure the sonix sound interface. More...

class  vrj::FileIO
class  vrj::Timer
 Simple class to take timings and give averages. More...


Functions

std::ostream & operator<< (std::ostream &out, Display &disp)
 vprSingletonImp (DisplayManager)
std::ostream & operator<< (std::ostream &out, Frustum &_frust)
 VJ_IMPLEMENT (std::ostream &) operator<<(std
std::ostream & operator<< (std::ostream &out, Viewport &viewport)
 VRJ_REGISTER_GL_SIM_INTERFACE_CREATOR (GlBasicSimulator)
 vprSingletonImp (GlDrawManager)
void VRJSetGLDrawMethod (vrj::GlProcAppWrapper::callback_t m)
void VRJSetGLContextInitMethod (vrj::GlProcAppWrapper::callback_t m)
void VRJSetBufferPredrawMethod (vrj::GlProcAppWrapper::callback_t m)
void VRJSetPreFrameMethod (vrj::GlProcAppWrapper::callback_t m)
void VRJSetIntraFrameMethod (vrj::GlProcAppWrapper::callback_t m)
void VRJSetPostFrameMethod (vrj::GlProcAppWrapper::callback_t m)
void VRJConfigure (int argc, char *argv[])
void VRJProcRunSystem ()
 Start everything running. More...

std::ostream & operator<< (std::ostream &out, GlWindow &win)
 VRJ_REGISTER_PF_SIM_INTERFACE_CREATOR (PfBasicSimulator)
void PfDrawFuncStereoLeft (pfChannel *chan, void *chandata)
void PfDrawFuncStereoRight (pfChannel *chan, void *chandata)
void PfDrawFuncMonoBackbuffer (pfChannel *chan, void *chandata)
void PfPipeSwapFunc (pfPipe *p, pfPipeWindow *pw)
 vprSingletonImp (PfDrawManager)
void PFconfigPWin (pfPipeWindow *pWin)
void PfDrawFunc (pfChannel *chan, void *chandata, bool left_eye, bool right_eye, bool stereo)
void PfDrawFunc (pfChannel *chan, void *chandata, bool left_eye, bool right_eye, bool stereo, bool simulator)
void PfAppFunc (pfChannel *chan, void *chandata)
gmtl::Matrix44f GetVjMatrix (const pfMatrix &perfMat)
pfMatrix GetPfMatrix (const gmtl::Matrix44f &mat)
gmtl::Vec3f GetVjVec (const pfVec3 &vec)
pfVec3 GetPfVec (const gmtl::Vec3f &vec)
 VJ_API (gmtl::Matrix44f) GetVjMatrix(const pfMatrix &perfMat)
 Converts Juggler (GMTL) matrix to Pf Matrix. More...

 vprSingletonImp (Kernel)


Function Documentation

std::ostream& operator<< std::ostream &    out,
Display   disp
 

Definition at line 177 of file Display.cpp.

00178 {
00179    out.setf(std::ios::left);
00180 
00181    char fill_char(out.fill());
00182    out.fill('.');
00183 
00184    const unsigned int indent_level(2);
00185    const std::string indent_text(indent_level, ' ');
00186    const int pad_width_dot(20 - indent_level);
00187 
00188    out << indent_text << std::setw(pad_width_dot)
00189        << "Name " << " " << disp.mName.c_str() << std::endl;
00190    out << indent_text << std::setw(pad_width_dot)
00191        << "Origin " << " " << disp._xo << ", " << disp._yo << std::endl;
00192    out << indent_text << std::setw(pad_width_dot)
00193        << "Size " << " " << disp._xs << "x" << disp._ys << std::endl;
00194    out << indent_text << std::setw(pad_width_dot)
00195        << "Pipe number " << " " << disp.mPipe << std::endl;
00196    out << indent_text << std::setw(pad_width_dot)
00197        << "Stereo requested " << " " << (disp.mStereoRequested ? "Yes" : "No")
00198        << std::endl;
00199    out << indent_text << std::setw(pad_width_dot)
00200        << "Active " << " " << (disp.mActive ? "Yes" : "No") << std::endl;
00201 
00202    for(unsigned i=0;i<disp.mViewports.size();i++)
00203    {
00204       out << indent_text << "Viewport " << i << ":\n";
00205       disp.mViewports[i]->outStream(out, 4);
00206    }
00207 
00208    // Restore the previous state.
00209    out.fill(fill_char);
00210 
00211    return out;
00212 }

vprSingletonImp DisplayManager   
 

std::ostream & vrj::operator<< std::ostream &    out,
Frustum   _frust
 

Definition at line 41 of file Frustum.cpp.

00042 {
00043    out << "l: " << _frust[Frustum::VJ_LEFT] << " "
00044        << "r: " << _frust[Frustum::VJ_RIGHT] << " "
00045        << "b: " << _frust[Frustum::VJ_BOTTOM] << " "
00046        << "t: " << _frust[Frustum::VJ_TOP] << " "
00047        << "n: " << _frust[Frustum::VJ_NEAR] << " "
00048        << "f: " << _frust[Frustum::VJ_FAR];
00049 
00050    return out;
00051 }

vrj::VJ_IMPLEMENT std::ostream &   
 

Definition at line 131 of file Projection.cpp.

00132 {
00133    return proj.outStream(out);
00134 }

std::ostream& operator<< std::ostream &    out,
Viewport   viewport
 

Definition at line 97 of file Viewport.cpp.

00098 {
00099    return viewport.outStream(out);
00100 }

VRJ_REGISTER_GL_SIM_INTERFACE_CREATOR GlBasicSimulator   
 

vprSingletonImp GlDrawManager   
 

void VRJSetGLDrawMethod vrj::GlProcAppWrapper::callback_t    m
 

Definition at line 126 of file GlProcApp.h.

00127    {
00128       proc_app_singleton.setDrawMethod(m);
00129    }

void VRJSetGLContextInitMethod vrj::GlProcAppWrapper::callback_t    m
 

Definition at line 131 of file GlProcApp.h.

00132    { 
00133       proc_app_singleton.setContextInitMethod(m);
00134    }

void VRJSetBufferPredrawMethod vrj::GlProcAppWrapper::callback_t    m
 

Definition at line 136 of file GlProcApp.h.

00137    { 
00138       proc_app_singleton.setBufferPredrawMethod(m);
00139    }

void VRJSetPreFrameMethod vrj::GlProcAppWrapper::callback_t    m
 

Definition at line 141 of file GlProcApp.h.

00142    {
00143       proc_app_singleton.setPreFrameMethod(m);
00144    }

void VRJSetIntraFrameMethod vrj::GlProcAppWrapper::callback_t    m
 

Definition at line 146 of file GlProcApp.h.

00147    {
00148       proc_app_singleton.setIntraFrameMethod(m);
00149    }

void VRJSetPostFrameMethod vrj::GlProcAppWrapper::callback_t    m
 

Definition at line 151 of file GlProcApp.h.

00152    {
00153       proc_app_singleton.setPostFrameMethod(m);
00154    }

void VRJConfigure int    argc,
char *    argv[]
 

Definition at line 156 of file GlProcApp.h.

00157    {
00158        // Allocate the kernel object and the application object
00159       Kernel* kernel = Kernel::instance();           // Get the kernel
00160       
00161       // IF no args passed to the program
00162       //    Display usage information and exit
00163       if (argc <= 1)
00164       {
00165          std::cout << "\n\n";
00166          std::cout << "Usage: " << argv[0] << " vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]" << std::endl;
00167          exit(1);
00168       }
00169 
00170       // Load any config files specified on the command line
00171       for( int i = 1; i < argc; ++i )
00172       {
00173          kernel->loadConfigFile(argv[i]);
00174       }
00175    }

void VRJProcRunSystem  
 

Start everything running.

Definition at line 178 of file GlProcApp.h.

00179    {
00180        // Allocate the kernel object and the application object
00181       Kernel* kernel = Kernel::instance();           // Get the kernel
00182       
00183       // Start the kernel running
00184       kernel->start();
00185 
00186       // Give the kernel an application to execute
00187       kernel->setApplication(&proc_app_singleton);
00188 
00189       // Keep thread alive and waiting
00190       kernel->waitForKernelStop();
00191    }   

std::ostream& operator<< std::ostream &    out,
GlWindow   win
 

Definition at line 240 of file GlWindow.cpp.

00241 {
00242    vprASSERT(win.mVrjDisplay != NULL);
00243 
00244    //out << "-------- GlWindow --------" << endl;
00245    out << "Open: " << (win.window_is_open ? "Yes" : "No") << std::endl;
00246    out << "Stereo: " << (win.in_stereo ? "Yes" : "No") << std::endl;
00247    out << "Display Info:\n" << *(win.mVrjDisplay) << std::endl;
00248    return out;
00249 }

VRJ_REGISTER_PF_SIM_INTERFACE_CREATOR PfBasicSimulator   
 

void vrj::PfDrawFuncStereoLeft pfChannel *    chan,
void *    chandata
 

Definition at line 1219 of file PfDrawManager.cpp.

Referenced by vrj::PfDrawManager::addDisplay.

01220 {
01221    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "--- PfDrawFuncStereoLeft: Enter ---.\n" << vprDEBUG_FLUSH;
01222    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "chan: " << chan << std::endl << vprDEBUG_FLUSH;
01223    PfDrawFunc(chan,chandata,true,false,true);
01224 }

void vrj::PfDrawFuncStereoRight pfChannel *    chan,
void *    chandata
 

Definition at line 1226 of file PfDrawManager.cpp.

Referenced by vrj::PfDrawManager::addDisplay.

01227 {
01228    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "--- PfDrawFuncStereoRight: Enter ---.\n" << vprDEBUG_FLUSH;
01229    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "chan: " << chan << std::endl << vprDEBUG_FLUSH;
01230    PfDrawFunc(chan,chandata,false,true,true);
01231 }

void vrj::PfDrawFuncMonoBackbuffer pfChannel *    chan,
void *    chandata
 

Definition at line 1233 of file PfDrawManager.cpp.

Referenced by vrj::PfDrawManager::addDisplay.

01234 {
01235    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "--- PfDrawFuncMonoBackbuffer: Enter ---.\n" << vprDEBUG_FLUSH;
01236    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "chan: " << chan << std::endl << vprDEBUG_FLUSH;
01237    PfDrawFunc(chan,chandata,false,false,false);
01238 }

void vrj::PfPipeSwapFunc pfPipe *    p,
pfPipeWindow *    pw
 

Definition at line 1243 of file PfDrawManager.cpp.

Referenced by vrj::PfDrawManager::initPipes.

01244 {
01245    boost::ignore_unused_variable_warning(p);
01246     PfDrawManager* pf_draw_mgr = PfDrawManager::instance();     // get the draw manager
01247 
01248     // If "first pw", then sync
01249     // What is the "first" pw and how do I know?
01250 
01251     // For each pfDisplay
01252     //    if(pw == display->pipeWindow)
01253     //
01254 
01255     // Swap the buffer
01256     vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "--- PfPipeSwapFunc: pipe:" << pf_draw_mgr << " -- pw:" << pw << "\n" << vprDEBUG_FLUSH;
01257 
01258     // Barrier for Cluster
01259     //vprDEBUG(vprDBG_ALL, vprDBG_STATE_LVL) <<  "BARRIER: Going to sleep for: " << num << std::endl << vprDEBUG_FLUSH;
01260    cluster::ClusterManager::instance()->createBarrier();
01261     //vprDEBUG(vprDBG_ALL, vprDBG_STATE_LVL) <<  "BARRIER: IS DONE" << std::endl << vprDEBUG_FLUSH;
01262 
01263     pw->swapBuffers();
01264 }

vprSingletonImp PfDrawManager   
 

void vrj::PFconfigPWin pfPipeWindow *    pWin
 

Definition at line 1119 of file PfDrawManager.cpp.

01120 {
01121    PfDrawManager* dm = PfDrawManager::instance();
01122 
01123    // Init the vj monitor modes
01124    pWin->open();
01125    pfInitGfx();
01126 
01127    // Call user config function
01128    dm->mApp->configPWin(pWin);
01129 
01130    // Ouput the visual id
01131    int fb_id = pWin->getFBConfigId();
01132    vprDEBUG(vrjDBG_DRAW_MGR,vprDBG_CONFIG_LVL)
01133       << "vjPFConfigPWin: framebuffer id: x" << std::hex << fb_id << std::dec
01134       << std::endl << vprDEBUG_FLUSH;
01135 }

void PfDrawFunc pfChannel *    chan,
void *    chandata,
bool    left_eye,
bool    right_eye,
bool    stereo
 

Definition at line 1168 of file PfDrawManager.cpp.

01169 {
01170    vprDEBUG_OutputGuard(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL,
01171                         std::string("--- PfDrawFunc: Enter ---.\n"),
01172                         std::string("--- PfDrawFunc: Exit ---.\n"));
01173 
01174    vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "chan: " << chan << std::endl << vprDEBUG_FLUSH;
01175 
01176       // Select correct buffer to draw to
01177       // If we are in stereo and not a simulator
01178    if(stereo)
01179    {
01180       vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "vjPfDrawFunc: Drawing stereo win\n" << vprDEBUG_FLUSH;
01181       if(left_eye)
01182       {
01183          glDrawBuffer(GL_BACK_LEFT);
01184          vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "vjPfDrawFunc: Set to BACK_LEFT\n" << vprDEBUG_FLUSH;
01185       }
01186       else if(right_eye)
01187       {
01188          glDrawBuffer(GL_BACK_RIGHT);
01189          vprDEBUG(vrjDBG_DRAW_MGR, vprDBG_VERB_LVL) << "vjPfDrawFunc: Set to BACK_RIGHT\n" << vprDEBUG_FLUSH;
01190       }
01191       else
01192          vprASSERT(false);
01193    }
01194    else                                // No Stereo or have sim, so just go to back buffer
01195    {
01196       vprDEBUG(vrjDBG_DRAW_MGR,vprDBG_VERB_LVL) << "vjPfDrawFunc: Drawing mono window\n" << vprDEBUG_FLUSH;
01197       glDrawBuffer(GL_BACK);
01198    }
01199 
01200    // -- Configure buffers for correct eye/stereo etc -- //
01201    PfDrawManager::instance()->mApp->drawChan(chan, chandata);     // Draw the channel
01202                                           // Note: This function calls pfDraw and clears
01203 
01204    // How should we draw the simulator
01205    /*
01206    if(cur_pf_disp->disp->isSimulator())
01207    {
01208 
01209    }
01210    */
01211 }

void PfDrawFunc pfChannel *    chan,
void *    chandata,
bool    left_eye,
bool    right_eye,
bool    stereo,
bool    simulator
 

void PfAppFunc pfChannel *    chan,
void *    chandata
 

gmtl::Matrix44f GetVjMatrix const pfMatrix &    perfMat
 

Definition at line 46 of file PfUtil.cpp.

00047 {
00048    gmtl::Matrix44f mat;
00049    gmtl::Vec3f x_axis( 1.0f, 0.0f, 0.0f );
00050    mat.set( &(perfMat.mat[0][0]) );
00051    gmtl::postMult(mat, gmtl::makeRot<gmtl::Matrix44f>( gmtl::AxisAnglef( gmtl::Math::deg2Rad(90.0f), x_axis ) ));
00052    gmtl::preMult(mat, gmtl::makeRot<gmtl::Matrix44f>( gmtl::AxisAnglef( gmtl::Math::deg2Rad(-90.0f), x_axis ) ));
00053 
00054    return mat;
00055 }

pfMatrix GetPfMatrix const gmtl::Matrix44f &    mat
 

Definition at line 58 of file PfUtil.cpp.

Referenced by vrj::PfBasicSimulator::updateSimulatorSceneGraph.

00059 {
00060    pfMatrix perf_mat;
00061 
00062    // NOTE: the man page and the pfLinMath.h header file disagree.
00063    // the man page says const float* and the header says float*
00064    // the man page is correct, there is no reason for a set func to
00065    // change the source data (unless you're ref counting or something weird)
00066    // ...this may change in the future so that this cast can someday be removed.
00067    float* floatPtr = const_cast<float *>( mat.mData );
00068    perf_mat.set( floatPtr );
00069 
00070    perf_mat.preRot( -90.0f, 1.0f, 0.0f, 0.0f, perf_mat );
00071    perf_mat.postRot( perf_mat, 90.0f, 1.0f, 0.0f, 0.0f );
00072 
00073    return perf_mat;
00074 }

gmtl::Vec3f GetVjVec const pfVec3 &    vec
 

Definition at line 77 of file PfUtil.cpp.

Referenced by pfSoundNode::app.

00078 {
00079    //     Perf     x       z       -y
00080    return gmtl::Vec3f( vec[0], vec[2], -vec[1] );
00081 }

pfVec3 GetPfVec const gmtl::Vec3f &    vec
 

Definition at line 84 of file PfUtil.cpp.

00085 {
00086    //   Juggler   x        -z       y
00087    return pfVec3( vec[0], -vec[2], vec[1] );
00088 }

VJ_API gmtl::Matrix44f    const
 

Converts Juggler (GMTL) matrix to Pf Matrix.

vprSingletonImp Kernel   
 


Generated on Sun May 2 15:11:05 2004 for VR Juggler by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002