00001 #ifndef ROOT_QExGeoDrawHelper
00002 #define ROOT_QExGeoDrawHelper
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include <map>
00017 #include "TObject.h"
00018
00019 class TGeoVolume;
00020 class TVolume;
00021 class TShape;
00022 class TMap;
00023
00024 class TGeoShape;
00025 class TGeoBBox;
00026 class TGeoPara;
00027 class TGeoTube;
00028 class TGeoTubeSeg;
00029 class TGeoCone;
00030 class TGeoConeSeg;
00031 class TGeoPcon;
00032 class TGeoPgon;
00033 class TGeoEltu;
00034 class TGeoTrap;
00035 class TGeoCtub;
00036 class TGeoTrd1;
00037 class TGeoTrd2;
00038 class TGeoGtra;
00039 class TGeoSphere;
00040 class TGeoArb8;
00041 class TGeoCompositeShape;
00042
00043
00044 class TGeoDrawHelper : public TObject {
00045 private:
00046 protected:
00047 TGeoVolume *fGeoVolume;
00048 TVolume *fVolume;
00049 public:
00050 TGeoDrawHelper(TGeoVolume *geoVolume = 0);
00051 virtual ~TGeoDrawHelper();
00052 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00053 virtual void Draw(Option_t *option="");
00054 virtual const char *GetName() const;
00055 virtual const char *GetIconName() const;
00056 virtual void Paint(Option_t *option="");
00057
00058 virtual TVolume *GetVolume() const { return fVolume; }
00059 virtual TGeoVolume *GetGeoVolume() const { return fGeoVolume;}
00060
00061 #ifndef __CINT__
00062 static TVolume* MakeVolume( TGeoVolume *top, std::map<TGeoVolume *,TVolume *> *volumeMap = 0);
00063 #endif
00064
00065 static TVolume* MakeCompositeShape(const TGeoCompositeShape *shape);
00066 static TShape* MakeShape(const TGeoShape *shape);
00067 static TShape* MakeShape(const TGeoBBox &shp);
00068 static TShape* MakeShape(const TGeoPara &shp);
00069 static TShape* MakeShape(const TGeoTube &shp);
00070 static TShape* MakeShape(const TGeoTubeSeg &shp);
00071 static TShape* MakeShape(const TGeoCone &shp);
00072 static TShape* MakeShape(const TGeoConeSeg &shp);
00073 static TShape* MakeShape(const TGeoPcon &shp);
00074 static TShape* MakeShape(const TGeoPgon &shp);
00075 static TShape* MakeShape(const TGeoEltu &shp);
00076 static TShape* MakeShape(const TGeoTrap &shp);
00077 static TShape* MakeShape(const TGeoCtub &shp);
00078 static TShape* MakeShape(const TGeoTrd1 &shp);
00079 static TShape* MakeShape(const TGeoTrd2 &shp);
00080 static TShape* MakeShape(const TGeoGtra &shp);
00081 static TShape* MakeShape(const TGeoSphere &shp);
00082 static TShape* MakeShape(const TGeoArb8 &shp);
00083
00084
00085 };
00086
00087
00088
00089 #endif