00001 /* 00002 Interface to simplest (level 0) liveViz3d library. 00003 This file is shared between client and server. 00004 00005 Orion Sky Lawlor, olawlor@acm.org, 2004/4/3 00006 */ 00007 #ifndef __UIUC_CHARM_LV3D0_H 00008 #define __UIUC_CHARM_LV3D0_H 00009 00010 #include "pup.h" 00011 #include "ckvector3d.h" 00012 #include "ckviewpoint.h" 00013 #include "ckviewable.h" 00014 #if CMK_LIVEVIZ3D_CLIENT 00015 /* Client side */ 00016 # include "ogl/main.h" 00017 #else 00018 /* Server side */ 00019 #define CMK_LIVEVIZ3D_SERVER 1 00020 #endif 00021 00023 class LV3D_Universe_Table; 00024 00031 class LV3D_Universe : public PUP::able { 00032 public: 00033 // CLIENT AND SERVER 00034 LV3D_Universe() 00035 :object_table(0) {} 00036 LV3D_Universe(CkMigrateMessage *m) 00037 :PUP::able(m), object_table(0) {} 00038 virtual ~LV3D_Universe(); 00039 00044 virtual void pup(PUP::er &p); 00045 00050 PUPable_decl(LV3D_Universe); 00051 00052 // CLIENT ONLY 00053 #ifdef CMK_LIVEVIZ3D_CLIENT 00054 00059 virtual void setupClient(oglOptions &i); 00060 00062 virtual void setupGL(void); 00063 00068 virtual oglController *makeController(void); 00069 00076 virtual void viewResponse(CkView *v); 00077 00083 virtual void render(const CkViewpoint &vp); 00084 00085 protected: 00088 CkView *lookup(const CkViewableID &src); 00089 #endif 00090 private: 00092 LV3D_Universe_Table *object_table; 00093 00094 }; 00095 00096 00097 #endif