TVirtualGeoPainter.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TVirtualGeoPainter.h 35698 2010-09-24 07:37:08Z agheata $
00002 // Author: Andrei Gheata   11/01/02
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 #ifndef ROOT_TVirtualGeoPainter
00012 #define ROOT_TVirtualGeoPainter
00013 
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TVirtualGeoPainter                                                   //
00018 //                                                                      //
00019 // Abstract base class for geometry painters                            //
00020 //                                                                      //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027 
00028 class TGeoVolume;
00029 class TGeoNode;
00030 class TGeoShape;
00031 class TGeoMatrix;
00032 class TGeoHMatrix;
00033 class TGeoManager;
00034 class TVirtualGeoTrack;
00035 class TParticle;
00036 class TObjArray;
00037 class TH2F;
00038 class TStopwatch;
00039 class TGeoBatemanSol;
00040 class TGeoIteratorPlugin;
00041 
00042 class TVirtualGeoPainter : public TObject {
00043 
00044 protected:
00045    static TVirtualGeoPainter   *fgGeoPainter; //Pointer to class painter
00046 
00047 public:
00048 enum EGeoVisLevel {
00049    kGeoVisLevel   = 0
00050 };         
00051 enum EGeoVisOption {
00052    kGeoVisDefault = 0,    // default visualization - everything visible 3 levels down
00053    kGeoVisLeaves  = 1,    // only last leaves are visible
00054    kGeoVisOnly    = 2,    // only current volume is drawn
00055    kGeoVisBranch  = 3,    // only a given branch is drawn
00056    kGeoVisChanged = 4     // visibility changed
00057 };
00058 enum EGeoBombOption {   
00059    kGeoNoBomb     = 0,    // default - no bomb
00060    kGeoBombXYZ    = 1,    // explode view in cartesian coordinates
00061    kGeoBombCyl    = 2,    // explode view in cylindrical coordinates (R, Z)
00062    kGeoBombSph    = 3     // explode view in spherical coordinates (R)
00063 };
00064 
00065 public:
00066    TVirtualGeoPainter(TGeoManager *manager);
00067    virtual ~TVirtualGeoPainter();
00068 
00069    virtual void       AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys) = 0;
00070    virtual TVirtualGeoTrack *AddTrack(Int_t id, Int_t pdgcode, TObject *particle) = 0;
00071    virtual void       AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset=kFALSE) = 0;
00072    virtual void       BombTranslation(const Double_t *tr, Double_t *bombtr) = 0;
00073    virtual void       CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="") = 0;
00074    virtual void       CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.) = 0; 
00075    virtual void       CheckBoundaryReference(Int_t icheck=-1) = 0;
00076    virtual void       CheckGeometryFull(Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=NULL) = 0;
00077    virtual void       CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const = 0;
00078    virtual void       CheckOverlaps(const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option="") const = 0;
00079    virtual Int_t      CountVisibleNodes() = 0;
00080    virtual void       DefaultAngles() = 0;
00081    virtual void       DefaultColors() = 0;
00082    virtual Int_t      DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py) = 0;
00083    virtual void       Draw(Option_t *option="") = 0;
00084    virtual void       DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option="") = 0;
00085    virtual void       DrawShape(TGeoShape *shape, Option_t *option="") = 0;
00086    virtual void       DrawOnly(Option_t *option="") = 0;
00087    virtual void       DrawOverlap(void *ovlp, Option_t *option="") = 0;
00088    virtual void       DrawCurrentPoint(Int_t color) = 0;
00089    virtual void       DrawPanel() = 0;
00090    virtual void       DrawPath(const char *path) = 0;
00091    virtual void       DrawVolume(TGeoVolume *vol, Option_t *option="") = 0;
00092    virtual void       EditGeometry(Option_t *option="") = 0;
00093    virtual void       EstimateCameraMove(Double_t /*tmin*/, Double_t /*tmax*/, Double_t *, Double_t * ) {;}
00094    virtual void       ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_t px, Int_t py) = 0;
00095    virtual void       ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py) = 0;
00096    virtual void       ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py) = 0;
00097    virtual Int_t      GetColor(Int_t base, Float_t light) const = 0;
00098    virtual Int_t      GetNsegments() const = 0; 
00099    virtual void       GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const = 0;
00100    virtual Int_t      GetBombMode() const = 0; 
00101    virtual const char *GetDrawPath() const = 0; 
00102    virtual TGeoVolume *GetDrawnVolume() const = 0;
00103    virtual TGeoVolume *GetTopVolume() const = 0; 
00104    virtual void       GetViewAngles(Double_t &/*longitude*/, Double_t &/*latitude*/, Double_t &/*psi*/) {;}
00105    virtual Int_t      GetVisLevel() const = 0; 
00106    virtual Int_t      GetVisOption() const = 0; 
00107    virtual const char*GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int_t py) const = 0;
00108    virtual void       GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0) =0;
00109    virtual Double_t  *GetViewBox() = 0;
00110    virtual Bool_t     IsPaintingShape() const = 0;
00111    virtual Bool_t     IsRaytracing() const = 0;
00112    virtual Bool_t     IsExplodedView() const = 0;
00113    virtual TH2F      *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180.,
00114                             Int_t nphi=90, Double_t phimin=0., Double_t phimax=360.,
00115                             Double_t rmin=0., Double_t rmax=9999999, Option_t *option="") = 0;
00116    virtual void       ModifiedPad(Bool_t update=kFALSE) const = 0;
00117    virtual void       OpProgress(const char *opname, Long64_t current, Long64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE) = 0;
00118    virtual void       Paint(Option_t *option="") = 0;
00119    virtual void       PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix* global=0) = 0;
00120    virtual void       PaintShape(TGeoShape *shape, Option_t *option="") = 0;
00121    virtual void       PaintOverlap(void *ovlp, Option_t *option="")  = 0;
00122    virtual void       PrintOverlaps() const = 0;
00123    virtual void       PaintVolume(TGeoVolume *vol, Option_t *option="", TGeoMatrix* global=0) = 0;
00124    virtual void       RandomPoints(const TGeoVolume *vol, Int_t npoints, Option_t *option="") = 0;
00125    virtual void       RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) = 0;
00126    virtual void       Raytrace(Option_t *option="") = 0;
00127    virtual TGeoNode  *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char* g3path) = 0;
00128    virtual void       SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3,
00129                                      Double_t bombr=1.3) = 0;
00130    virtual void       SetClippingShape(TGeoShape *shape) = 0;
00131    virtual void       SetExplodedView(Int_t iopt=0) = 0;
00132    virtual void       SetGeoManager(TGeoManager *geom) = 0;
00133    virtual void       SetIteratorPlugin(TGeoIteratorPlugin *plugin) = 0;
00134    virtual void       SetCheckedNode(TGeoNode *node) = 0;
00135    virtual void       SetNsegments(Int_t nseg=20) = 0;    
00136    virtual void       SetNmeshPoints(Int_t npoints) = 0;
00137    virtual void       SetRaytracing(Bool_t flag=kTRUE) = 0;
00138    static  TVirtualGeoPainter *GeoPainter();
00139    static void        SetPainter(const TVirtualGeoPainter *painter);
00140    virtual void       SetTopVisible(Bool_t vis=kTRUE) = 0;
00141    virtual void       SetTopVolume(TGeoVolume *vol) = 0;
00142    virtual void       SetVisLevel(Int_t level=3) = 0;
00143    virtual void       SetVisOption(Int_t option=0) = 0;
00144    virtual Int_t      ShapeDistancetoPrimitive(const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const = 0;
00145    virtual void       Test(Int_t npoints, Option_t *option) = 0;
00146    virtual void       TestOverlaps(const char *path) = 0;
00147    virtual Bool_t     TestVoxels(TGeoVolume *vol) = 0;
00148    virtual void       UnbombTranslation(const Double_t *tr, Double_t *bombtr) = 0;
00149    virtual Double_t   Weight(Double_t precision, Option_t *option="v") = 0;
00150       
00151    ClassDef(TVirtualGeoPainter,0)  //Abstract interface for geometry painters
00152 };
00153 
00154 #endif

Generated on Tue Jul 5 14:12:21 2011 for ROOT_528-00b_version by  doxygen 1.5.1