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