Logo ROOT   6.14/05
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; }
100  void SetImageAutoSave(Bool_t s) { fImageAutoSave = s; }
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
void SetImageCount(Int_t ic)
void SetWPhi(Double_t w)
Double_t fADolly
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition: TGLCamera.h:43
auto * m
Definition: textangle.C:8
void StopImageAutoSave()
Stops automatic saving of images.
Bool_t GetRotateScene() const
void SetWDolly(Double_t w)
Double_t fThetaA0
TGLCamera * fCamera
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
TString GetImageName() const
Bool_t IsRunning() const
Basic string class.
Definition: TString.h:131
TString fImageName
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Double_t GetADolly() const
TString fImageGUIBaseName
TGLCamera * GetCamera() const
Double_t fDollyA0
void Timeout()
Called on every timer timeout.
Double_t GetDt() const
#define ClassDef(name, id)
Definition: Rtypes.h:320
void StartImageAutoSaveAnimatedGif(const TString &filename)
Start saving into animated gif.
Double_t GetWTheta() const
Int_t GetImageCount() const
Double_t GetDeltaPhi() const
TString GetImageGUIBaseName() const
void SetImageGUIBaseName(const TString &gname)
void RotateScene()
"Scene rotation": either find a special object, which will be an axis of rotation (it's Z actually) o...
void StartImageAutoSave(const TString &filename)
Start saving into a set of images.
void SetADolly(Double_t a)
Set relative amplitude of forward/backward oscillation.
Double_t fWTheta
Automatically rotates GL camera.
void SetWTheta(Double_t w)
SVector< double, 2 > v
Definition: Dict.h:5
auto * a
Definition: textangle.C:12
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
Double_t fATheta
void StartImageAutoSaveWithGUISettings()
Start auto-saving images as set-up via GUI.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:53
void SetRotateScene(Bool_t rotateScene)
Bool_t fTimerRunning
Double_t GetWPhi() const
TGLAutoRotator & operator=(const TGLAutoRotator &)
void SetDeltaPhi(Double_t dPhi)
void Stop()
Stop the auto-rotator.
Int_t GetImageGUIOutMode() const
double Double_t
Definition: RtypesCore.h:55
Double_t fDeltaPhi
static constexpr double s
Double_t GetATheta() const
TGLViewer * fViewer
Mother of all ROOT objects.
Definition: TObject.h:37
void SetDt(Double_t dt)
Set time between two redraws in seconds.
TGLAutoRotator(const TGLAutoRotator &)
Double_t GetWDolly() const
void SetImageAutoSave(Bool_t s)
Bool_t GetImageAutoSave() const
void SetImageName(const TString &name)
virtual ~TGLAutoRotator()
Destructor.
void Start()
Start the auto-rotator.
Int_t fImageGUIOutMode
Double_t fWDolly
char name[80]
Definition: TGX11.cxx:109
TGLViewer * GetViewer() const
Bool_t fImageAutoSave
TStopwatch * fWatch
Stopwatch class.
Definition: TStopwatch.h:28