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

OIVAppShell.h

Go to the documentation of this file.
00001 
00002 //
00003 // $Id: OIVAppShell.h,v 1.6 2003/06/06 15:00:44 scharver Exp $
00004 //
00005 // Author: Chris Scharver
00006 // Email: scharver@evl.uic.edu
00007 // Copyright (c) 2003 Electronic Visualization Laboratory,
00008 //                    University of Illinois at Chicago
00009 //
00010 // Permission is hereby granted, free of charge, to any person
00011 // obtaining a copy of this software and associated documentation
00012 // files (the "Software"), to deal in the Software without
00013 // restriction, including without limitation the rights to use, copy,
00014 // modify, merge, publish, distribute, sublicense, and/or sell copies
00015 // of the Software, and to permit persons to whom the Software is
00016 // furnished to do so, subject to the following conditions:
00017 //
00018 // The above copyright notice and this permission notice shall be
00019 // included in all copies or substantial portions of the Software.
00020 //
00021 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00022 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00023 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00024 // NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
00025 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
00026 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00027 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00028 // DEALINGS IN THE SOFTWARE.
00029 //
00031 
00032 #ifndef OIVAPPSHELL_H
00033 #define OIVAPPSHELL_H
00034 
00035 #include <cave_ogl.h>
00036 #include <Inventor/SbColor.h>
00037 #include <Inventor/SoDB.h>
00038 #include <Inventor/actions/SoGLRenderAction.h>
00039 #include <Inventor/actions/SoHandleEventAction.h>
00040 #if (SO_VERSION >= 3)
00041 #include <Inventor/events/SoTrackerEvent.h>
00042 #include <Inventor/events/SoControllerButtonEvent.h>
00043 #endif /* SO_VERSION */
00044 #include <Inventor/nodes/SoTransform.h>
00045 
00046 class OIVAppShell;
00047 
00072 class OIVAppShell
00073 {
00074 public:
00075 
00076 #ifdef CAVE_THREAD
00077 
00078   typedef struct {
00079       SoGLRenderAction* renderAction;
00080   } oivPipeInfo_t;
00081 #endif /* CAVE_THREAD */
00082 
00084 
00085 
00087   static void DisplayInitCB(OIVAppShell*);
00088 
00090   static void FrameDrawCB(OIVAppShell*);
00091 
00093   static void FrameUpdateCB(OIVAppShell*);
00094 
00096 
00097 public:
00098 
00100   OIVAppShell(int, char**);
00101 
00103   virtual ~OIVAppShell();
00104 
00106   virtual void buildScene();
00107 
00109   virtual void displayInit();
00110 
00112   virtual void frameDraw();
00113 
00115   virtual void frameUpdate();
00116 
00118   virtual void handleEvents() {}
00119 
00121   void setBackgroundColor(const SbColor&);
00122 
00123 protected:
00124 
00126   void drawInventorScene(SoGLRenderAction*, SoSeparator*);
00127 
00128 protected:
00129 
00130 #ifdef CAVE_THREAD
00131   oivPipeInfo_t* m_oivPipeInfo;
00132 #endif /* CAVE_THREAD */
00133 
00135   SbColor m_bgColor;
00136 
00138   SoSeparator* m_sceneRoot;
00139 
00140 };
00141 
00142 #endif /* OIVAPPSHELL_H */

Generated on Thu Jun 12 10:13:13 2003 for RICDemo by doxygen1.2.18