TEveLegoEventHandler.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveLegoEventHandler.h 30819 2009-10-20 20:01:16Z matevz $
00002 // Author: Matevz Tadel 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, 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 
00012 
00013 #ifndef ROOT_TEveLegoEventHandler
00014 #define ROOT_TEveLegoEventHandler
00015 
00016 #include "TGLEventHandler.h"
00017 #include "TGLCamera.h"
00018 
00019 class TEveCaloLego;
00020 
00021 class TEveLegoEventHandler : public TGLEventHandler
00022 {
00023 private:
00024    TEveLegoEventHandler(const TEveLegoEventHandler&);            // Not implemented
00025    TEveLegoEventHandler& operator=(const TEveLegoEventHandler&); // Not implemented
00026 
00027 protected:
00028    enum EMode_e   { kLocked, kFree };
00029 
00030    EMode_e  fMode;       // current rotation mode
00031    Float_t  fTransTheta; // transition theta in radians
00032    Float_t  fTheta;
00033 
00034    virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2);
00035 
00036 public:
00037    TEveCaloLego*  fLego;
00038 
00039    TEveLegoEventHandler(TGWindow *w, TObject *obj, TEveCaloLego* lego = 0);
00040    virtual ~TEveLegoEventHandler() {}
00041 
00042    virtual Bool_t HandleKey(Event_t *event);
00043 
00044    Float_t GetTransTheta() {return fTransTheta;}
00045    void    SetTransTheta(Float_t h) {fTransTheta=h;}
00046 
00047    TEveCaloLego* GetLego() { return fLego; }
00048    void          SetLego( TEveCaloLego* x) { fLego = x; }
00049 
00050    ClassDef(TEveLegoEventHandler, 0); // A GL event handler class. Swiches perspective or orthographic camera.
00051 };
00052 
00053 #endif

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