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

CaveScene.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2011 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: CaveScene.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.48 $       $Date: 2010/12/16 04:08:07 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   The CAVE specific Scene.  It has to get information from the
00019  * shared memory arena, since the display lists are shared amoung
00020  * the different machines
00021  *
00022  ***************************************************************************/
00023 #ifndef CAVE_SCENE_H
00024 #define CAVE_SCENE_H
00025 
00026 #include "Scene.h"
00027 #if 1
00028 #include <cave.h>
00029 #else
00030 #include <cave_ogl.h>
00031 #endif
00032 #include "CaveRoutines.h"
00033 #include "CaveDisplayDevice.h" // for manipulating lights etc
00034 #include "VMDThreads.h"        // for the barrier synchronization code
00035 
00036 class VMDApp;
00037 
00038 // This needs to grab shared memory for use in the CAVE
00039 // environment.  It does it with one means.
00040 //  1) use a CaveScene::operator new so that the internal
00041 //      scene information is shared (get_disp_storage and
00042 //      free_disp_storage)
00043 // The shared memory is allocated through a global function,
00044 //  new_from_CAVE_memory.
00045 // This must also call the left eye and right eye draws correctly
00046 
00049 class CaveScene : public Scene {
00050 private:
00051   VMDApp *app;
00052 
00054   vmd_barrier_t * draw_barrier; 
00055 
00057   CAVELOCK draw_rwlock;  
00058 
00059 public:
00061   CaveScene(VMDApp *);
00062   virtual ~CaveScene(void);
00063   
00066   void draw(DisplayDevice *);
00067   
00069   virtual int prepare();
00070 
00072   void *operator new(size_t);
00073   void operator delete(void *, size_t);
00074 };
00075 
00076 #endif /* CAVE_SCENE_H */
00077 

Generated on Wed May 16 01:49:03 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002