cgma
|
00001 //- Class: ChollaVolume 00002 //- Owner: Steven J. Owen 00003 //- Description: volume representation for the Cholla entities 00004 //- Created: 8/30/2009 00005 //- Checked By: 00006 //- Version: 00007 00008 #ifndef ChollaVolume_HPP 00009 #define ChollaVolume_HPP 00010 00011 #include "DLIList.hpp" 00012 #include "ChollaEntity.hpp" 00013 00014 class ChollaSurface; 00015 00016 class ChollaVolume : public ChollaEntity 00017 { 00018 private: 00019 int id; 00020 int blockId; 00021 00022 DLIList<ChollaSurface*> surfaceList; 00023 void *myVolume; 00024 00025 public: 00026 00027 ChollaVolume(int block_id); 00028 ~ChollaVolume(); 00029 00030 void assign_geometric_volume(void *vol) 00031 {myVolume = vol;} 00032 void* get_geometric_volume() 00033 {return myVolume;} 00034 void get_surfaces( DLIList<ChollaSurface*> &cholla_surf_list ) 00035 {cholla_surf_list = surfaceList; } 00036 void add_surface( ChollaSurface *cholla_surf_ptr ) 00037 {surfaceList.append(cholla_surf_ptr);} 00038 void add_surface_unique( ChollaSurface *cholla_surf_ptr ) 00039 {surfaceList.append_unique(cholla_surf_ptr);} 00040 void remove_surface( ChollaSurface *cholla_surf_ptr) 00041 {surfaceList.remove(cholla_surf_ptr);} 00042 int get_block_id() 00043 {return blockId;} 00044 void set_block_id(int flag) 00045 { blockId = flag; } 00046 00047 int get_id() const {return id;} 00048 00049 void debug_draw(); 00050 }; 00051 00052 template <> struct DLIListSorter<ChollaVolume*> 00053 { 00054 bool operator()(ChollaVolume* a, ChollaVolume* b) { return a->get_id() < b->get_id(); } 00055 }; 00056 00057 #endif 00058 00059 00060 00061 00062