00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2008 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.45 $ $Date: 2008/03/27 19:36:35 $ 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 #include <cave.h> 00028 #include "CaveRoutines.h" 00029 #include "CaveDisplayDevice.h" // for manipulating lights etc 00030 #include "VMDThreads.h" // for the barrier synchronization code 00031 00032 class VMDApp; 00033 00034 // This needs to grab shared memory for use in the CAVE 00035 // environment. It does it with one means. 00036 // 1) use a CaveScene::operator new so that the internal 00037 // scene information is shared (get_disp_storage and 00038 // free_disp_storage) 00039 // The shared memory is allocated through a global function, 00040 // new_from_CAVE_memory. 00041 // This must also call the left eye and right eye draws correctly 00042 00045 class CaveScene : public Scene { 00046 private: 00047 VMDApp *app; 00048 00050 vmd_barrier_t * draw_barrier; 00051 00053 CAVELOCK draw_rwlock; 00054 00055 public: 00057 CaveScene(VMDApp *); 00058 virtual ~CaveScene(void); 00059 00062 void draw(DisplayDevice *); 00063 00065 virtual int prepare(); 00066 00068 void *operator new(size_t); 00069 void operator delete(void *, size_t); 00070 }; 00071 00072 #endif /* CAVE_SCENE_H */ 00073
1.2.14 written by Dimitri van Heesch,
© 1997-2002