00001 00009 #ifndef SELECTMGR_H 00010 #define SELECTMGR_H 00011 00012 // Gluebase includes 00013 #define OUTSIDE_GLUE_CORE 00014 #include <std/list.H> 00015 #include <std/strings.H> 00016 #include <mlib/points.H> 00017 00018 00019 class DrawObj; 00020 00021 class SELECTMGR 00022 { 00023 public: 00024 00025 // checks point intersection with visible objects, 00026 // returns object or NULL 00027 static DrawObj* objIntersect(Wpt pw); 00028 static DrawObj* objIntersect(ROOMpt pr); 00029 // ray intersection with visible objects 00030 static DrawObj* objIntersect(Wpt p, Wvec dir); 00031 00032 00033 static void clearSelection(); 00034 static void addToSelection(DrawObj* obj); 00035 static void removeFromSelection(DrawObj* obj); 00036 00037 static int numSelected(); 00038 static DrawObj* selectedObj(int i); 00039 static cARRAY<DrawObj*>& selection(); 00040 00041 static bool contains(DrawObj* d); 00042 protected: 00043 00044 static ARRAY<DrawObj*> _selected; 00045 00046 }; 00047 #endif