00001 /*************************************************************************** 00002 gel_set.H 00003 00004 GELset 00005 * A GEL container for rapid display/undisplay mechanisms 00006 00007 ------------------- 00008 Pascal Barla 00009 Fall 2004 00010 ***************************************************************************/ 00011 #ifndef _GEL_SET_H_ 00012 #define _GEL_SET_H_ 00013 00014 #include "disp/gel.H" 00015 00016 MAKE_PTR_SUBC(GELset,GEL); 00017 typedef const GELset CGELset; 00018 typedef const GELsetptr CGELsetptr; 00019 class GELset : public GEL { 00020 public: 00021 // constructor/destructor 00022 GELset(){} 00023 ~GELset() {} 00024 00025 // accessors 00026 int num () const { return _gel_list.num(); } 00027 void operator += (const GELptr el) { _gel_list += el;} 00028 const GELptr operator [](int i) const { return _gel_list[i]; } 00029 void pop() { if (!_gel_list.empty()) _gel_list.pop(); } 00030 void clear() { _gel_list.clear(); } 00031 00032 // display 00033 virtual RAYhit &intersect (RAYhit &r,mlib::CWtransf&m=mlib::Identity, 00034 int uv=0)const {return _gel_list.intersect(r, m);} 00035 virtual bool cull (const VIEW *v) const {return _gel_list.cull(v);} 00036 virtual int draw (CVIEWptr &v) {return _gel_list.draw(v);} 00037 virtual int draw_final(CVIEWptr & v) {return _gel_list.draw_final(v);} 00038 virtual int draw_id_ref() {return _gel_list.draw_id_ref();} 00039 virtual int draw_id_ref_pre1() {return _gel_list.draw_id_ref_pre1();} 00040 virtual int draw_id_ref_pre2() {return _gel_list.draw_id_ref_pre2();} 00041 virtual int draw_id_ref_pre3() {return _gel_list.draw_id_ref_pre3();} 00042 virtual int draw_id_ref_pre4() {return _gel_list.draw_id_ref_pre4();} 00043 virtual int draw_color_ref() {return _gel_list.draw_color_ref();} 00044 virtual int draw_color_ref_2() {return _gel_list.draw_color_ref_2();} 00045 virtual int draw_vis_ref() {return _gel_list.draw_vis_ref();} 00046 virtual BBOX bbox(int i=0) const; 00047 00048 virtual DATA_ITEM *dup() const { return 0; } 00049 private: 00050 GELlist _gel_list; 00051 }; 00052 00053 #endif // _GEL_SET_H_