Logo ROOT  
Reference Guide
TGLAutoRotator.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 #ifndef ROOT_TGLAutoRotator
13 #define ROOT_TGLAutoRotator
14 
15 #include "TObject.h"
16 #include "TString.h"
17 
18 class TGLCamera;
19 class TGLViewer;
20 class TTimer;
21 class TStopwatch;
22 
23 class TGLAutoRotator : public TObject
24 {
25 private:
26  TGLAutoRotator(const TGLAutoRotator&); // Not implemented
27  TGLAutoRotator& operator=(const TGLAutoRotator&); // Not implemented
28 
29 protected:
34 
36 
38 
43 
46 
50 
53 
54 public:
56  virtual ~TGLAutoRotator();
57 
58  TGLViewer* GetViewer() const { return fViewer; }
59  TGLCamera* GetCamera() const { return fCamera; }
60 
61  // --------------------------------
62 
63  void Start();
64  void Stop();
65 
66  void Timeout();
67  void RotateScene();
68 
69  // --------------------------------
70 
71  Bool_t IsRunning() const { return fTimerRunning; }
72 
73  Bool_t GetRotateScene() const { return fRotateScene; }
74  void SetRotateScene(Bool_t rotateScene) {Stop(); fRotateScene = rotateScene; }
75 
76  Double_t GetDeltaPhi() const {return fDeltaPhi; }
77  void SetDeltaPhi(Double_t dPhi) {fDeltaPhi = dPhi; }
78 
79  Double_t GetDt() const { return fDt; }
80  void SetDt(Double_t dt);
81 
82  Double_t GetWPhi() const { return fWPhi; }
83  void SetWPhi(Double_t w) { fWPhi = w; }
84 
85  Double_t GetWTheta() const { return fWTheta; }
86  void SetWTheta(Double_t w) { fWTheta = w; }
87  Double_t GetATheta() const { return fATheta; }
88  void SetATheta(Double_t a);
89 
90  Double_t GetWDolly() const { return fWDolly; }
91  void SetWDolly(Double_t w) { fWDolly = w; }
92  Double_t GetADolly() const { return fADolly; }
93  void SetADolly(Double_t a);
94 
95  TString GetImageName() const { return fImageName; }
96  void SetImageName(const TString& name) { fImageName = name; }
97  Int_t GetImageCount() const { return fImageCount; }
98  void SetImageCount(Int_t ic) { fImageCount = ic; }
101 
102  void StartImageAutoSaveAnimatedGif(const TString& filename);
103  void StartImageAutoSave(const TString& filename);
104  void StopImageAutoSave();
105 
107  void SetImageGUIBaseName(const TString& gname) { fImageGUIBaseName = gname; }
108 
110  void SetImageGUIOutMode(Int_t m);
111 
113 
114  ClassDef(TGLAutoRotator, 0); // Automatic, timer-based, rotation of GL-viewer's camera.
115 };
116 
117 #endif
TGLAutoRotator::GetDt
Double_t GetDt() const
Definition: TGLAutoRotator.h:79
m
auto * m
Definition: textangle.C:8
TGLAutoRotator::Start
void Start()
Start the auto-rotator.
Definition: TGLAutoRotator.cxx:115
TGLAutoRotator::SetDeltaPhi
void SetDeltaPhi(Double_t dPhi)
Definition: TGLAutoRotator.h:77
TGLAutoRotator::StopImageAutoSave
void StopImageAutoSave()
Stops automatic saving of images.
Definition: TGLAutoRotator.cxx:240
TGLAutoRotator::SetImageGUIBaseName
void SetImageGUIBaseName(const TString &gname)
Definition: TGLAutoRotator.h:107
TGLAutoRotator
Definition: TGLAutoRotator.h:23
TGLAutoRotator::GetWDolly
Double_t GetWDolly() const
Definition: TGLAutoRotator.h:90
TGLAutoRotator::GetWTheta
Double_t GetWTheta() const
Definition: TGLAutoRotator.h:85
TGLAutoRotator::fWatch
TStopwatch * fWatch
Definition: TGLAutoRotator.h:33
TGLAutoRotator::fThetaA0
Double_t fThetaA0
Definition: TGLAutoRotator.h:44
TGLAutoRotator::fWDolly
Double_t fWDolly
Definition: TGLAutoRotator.h:42
TGLAutoRotator::GetImageName
TString GetImageName() const
Definition: TGLAutoRotator.h:95
TGLAutoRotator::Stop
void Stop()
Stop the auto-rotator.
Definition: TGLAutoRotator.cxx:137
TGLAutoRotator::~TGLAutoRotator
virtual ~TGLAutoRotator()
Destructor.
Definition: TGLAutoRotator.cxx:64
TGLAutoRotator::GetDeltaPhi
Double_t GetDeltaPhi() const
Definition: TGLAutoRotator.h:76
TGLAutoRotator::SetATheta
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
Definition: TGLAutoRotator.cxx:88
TGLAutoRotator::fImageName
TString fImageName
Definition: TGLAutoRotator.h:47
TGLAutoRotator::SetDt
void SetDt(Double_t dt)
Set time between two redraws in seconds.
Definition: TGLAutoRotator.cxx:74
TGLAutoRotator::StartImageAutoSaveAnimatedGif
void StartImageAutoSaveAnimatedGif(const TString &filename)
Start saving into animated gif.
Definition: TGLAutoRotator.cxx:204
TGLCamera
Definition: TGLCamera.h:43
TGLAutoRotator::GetADolly
Double_t GetADolly() const
Definition: TGLAutoRotator.h:92
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
TGLAutoRotator::GetRotateScene
Bool_t GetRotateScene() const
Definition: TGLAutoRotator.h:73
Int_t
int Int_t
Definition: RtypesCore.h:45
TGLAutoRotator::fDollyA0
Double_t fDollyA0
Definition: TGLAutoRotator.h:44
TGLAutoRotator::GetATheta
Double_t GetATheta() const
Definition: TGLAutoRotator.h:87
TString
Definition: TString.h:136
TGLAutoRotator::SetADolly
void SetADolly(Double_t a)
Set relative amplitude of forward/backward oscillation.
Definition: TGLAutoRotator.cxx:102
v
@ v
Definition: rootcling_impl.cxx:3635
TString.h
bool
TGLAutoRotator::GetImageGUIOutMode
Int_t GetImageGUIOutMode() const
Definition: TGLAutoRotator.h:109
TGLAutoRotator::fTimer
TTimer * fTimer
Definition: TGLAutoRotator.h:32
TGLAutoRotator::StartImageAutoSave
void StartImageAutoSave(const TString &filename)
Start saving into a set of images.
Definition: TGLAutoRotator.cxx:224
TGLAutoRotator::Timeout
void Timeout()
Called on every timer timeout.
Definition: TGLAutoRotator.cxx:151
TGLAutoRotator::fImageGUIBaseName
TString fImageGUIBaseName
Definition: TGLAutoRotator.h:51
TGLAutoRotator::TGLAutoRotator
TGLAutoRotator(const TGLAutoRotator &)
TGLAutoRotator::fImageGUIOutMode
Int_t fImageGUIOutMode
Definition: TGLAutoRotator.h:52
TGLAutoRotator::SetWDolly
void SetWDolly(Double_t w)
Definition: TGLAutoRotator.h:91
TGLAutoRotator::fTimerRunning
Bool_t fTimerRunning
Definition: TGLAutoRotator.h:45
TTimer
Definition: TTimer.h:51
TGLViewer
Definition: TGLViewer.h:51
TGLAutoRotator::fImageCount
Int_t fImageCount
Definition: TGLAutoRotator.h:48
TGLAutoRotator::SetWTheta
void SetWTheta(Double_t w)
Definition: TGLAutoRotator.h:86
TGLAutoRotator::operator=
TGLAutoRotator & operator=(const TGLAutoRotator &)
TGLAutoRotator::GetCamera
TGLCamera * GetCamera() const
Definition: TGLAutoRotator.h:59
a
auto * a
Definition: textangle.C:12
TGLAutoRotator::SetImageAutoSave
void SetImageAutoSave(Bool_t s)
Definition: TGLAutoRotator.h:100
TGLAutoRotator::StartImageAutoSaveWithGUISettings
void StartImageAutoSaveWithGUISettings()
Start auto-saving images as set-up via GUI.
Definition: TGLAutoRotator.cxx:263
TGLAutoRotator::SetWPhi
void SetWPhi(Double_t w)
Definition: TGLAutoRotator.h:83
TGLAutoRotator::GetWPhi
Double_t GetWPhi() const
Definition: TGLAutoRotator.h:82
TGLAutoRotator::fADolly
Double_t fADolly
Definition: TGLAutoRotator.h:42
TGLAutoRotator::IsRunning
Bool_t IsRunning() const
Definition: TGLAutoRotator.h:71
TGLAutoRotator::SetRotateScene
void SetRotateScene(Bool_t rotateScene)
Definition: TGLAutoRotator.h:74
TGLAutoRotator::fCamera
TGLCamera * fCamera
Definition: TGLAutoRotator.h:31
TGLAutoRotator::GetImageCount
Int_t GetImageCount() const
Definition: TGLAutoRotator.h:97
Double_t
double Double_t
Definition: RtypesCore.h:59
TGLAutoRotator::fWTheta
Double_t fWTheta
Definition: TGLAutoRotator.h:41
TGLAutoRotator::SetImageGUIOutMode
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
Definition: TGLAutoRotator.cxx:250
TObject.h
TStopwatch
Definition: TStopwatch.h:28
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGLAutoRotator::RotateScene
void RotateScene()
"Scene rotation": either find a special object, which will be an axis of rotation (it's Z actually) o...
Definition: TGLAutoRotator.cxx:286
TGLAutoRotator::fImageAutoSave
Bool_t fImageAutoSave
Definition: TGLAutoRotator.h:49
name
char name[80]
Definition: TGX11.cxx:110
TGLAutoRotator::fWPhi
Double_t fWPhi
Definition: TGLAutoRotator.h:40
TGLAutoRotator::SetImageName
void SetImageName(const TString &name)
Definition: TGLAutoRotator.h:96
TGLAutoRotator::GetImageAutoSave
Bool_t GetImageAutoSave() const
Definition: TGLAutoRotator.h:99
TGLAutoRotator::SetImageCount
void SetImageCount(Int_t ic)
Definition: TGLAutoRotator.h:98
TGLAutoRotator::fDeltaPhi
Double_t fDeltaPhi
Definition: TGLAutoRotator.h:37
TGLAutoRotator::fATheta
Double_t fATheta
Definition: TGLAutoRotator.h:41
TGLAutoRotator::fRotateScene
Bool_t fRotateScene
Definition: TGLAutoRotator.h:35
TGLAutoRotator::fDt
Double_t fDt
Definition: TGLAutoRotator.h:39
TGLAutoRotator::GetViewer
TGLViewer * GetViewer() const
Definition: TGLAutoRotator.h:58
TGLAutoRotator::GetImageGUIBaseName
TString GetImageGUIBaseName() const
Definition: TGLAutoRotator.h:106
TGLAutoRotator::fViewer
TGLViewer * fViewer
Definition: TGLAutoRotator.h:30
int