Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TEveLegoEventHandler.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TEveLegoEventHandler
14 #define ROOT_TEveLegoEventHandler
15 
16 #include "TGLEventHandler.h"
17 #include "TGLCamera.h"
18 
19 class TEveCaloLego;
20 
21 class TEveLegoEventHandler : public TGLEventHandler
22 {
23 private:
24  TEveLegoEventHandler(const TEveLegoEventHandler&); // Not implemented
25  TEveLegoEventHandler& operator=(const TEveLegoEventHandler&); // Not implemented
26 
27 protected:
28  enum EMode_e { kLocked, kFree };
29 
30  EMode_e fMode; // current rotation mode
31  Float_t fTransTheta; // transition theta in radians
32  Float_t fTheta;
33 
34  virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2);
35 
36 public:
37  TEveCaloLego* fLego;
38 
39  TEveLegoEventHandler(TGWindow *w, TObject *obj, TEveCaloLego* lego = 0);
40  virtual ~TEveLegoEventHandler() {}
41 
42  virtual Bool_t HandleKey(Event_t *event);
43 
44  Float_t GetTransTheta() {return fTransTheta;}
45  void SetTransTheta(Float_t h) {fTransTheta=h;}
46 
47  TEveCaloLego* GetLego() { return fLego; }
48  void SetLego( TEveCaloLego* x) { fLego = x; }
49 
50  ClassDef(TEveLegoEventHandler, 0); // A GL event handler class. Swiches perspective or orthographic camera.
51 };
52 
53 #endif