Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveLegoEventHandler.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eve:$Id$
0002 // Author: Matevz Tadel 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 
0013 #ifndef ROOT_TEveLegoEventHandler
0014 #define ROOT_TEveLegoEventHandler
0015 
0016 #include "TGLEventHandler.h"
0017 #include "TGLCamera.h"
0018 
0019 class TEveCaloLego;
0020 
0021 class TEveLegoEventHandler : public TGLEventHandler
0022 {
0023 private:
0024    TEveLegoEventHandler(const TEveLegoEventHandler&);            // Not implemented
0025    TEveLegoEventHandler& operator=(const TEveLegoEventHandler&); // Not implemented
0026 
0027 protected:
0028    enum EMode_e   { kLocked, kFree };
0029 
0030    EMode_e  fMode;       // current rotation mode
0031    Float_t  fTransTheta; // transition theta in radians
0032    Float_t  fTheta;
0033 
0034    Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2) override;
0035 
0036 public:
0037    TEveCaloLego*  fLego;
0038 
0039    TEveLegoEventHandler(TGWindow *w, TObject *obj, TEveCaloLego* lego = nullptr);
0040    ~TEveLegoEventHandler() override {}
0041 
0042    Bool_t HandleKey(Event_t *event) override;
0043 
0044    Float_t GetTransTheta() {return fTransTheta;}
0045    void    SetTransTheta(Float_t h) {fTransTheta=h;}
0046 
0047    TEveCaloLego* GetLego() { return fLego; }
0048    void          SetLego( TEveCaloLego* x) { fLego = x; }
0049 
0050    ClassDefOverride(TEveLegoEventHandler, 0); // A GL event handler class. Switches perspective or orthographic camera.
0051 };
0052 
0053 #endif