ROOT  6.06/09
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 
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
void StopImageAutoSave()
Stops automatic saving of images.
void SetWDolly(Double_t w)
Double_t fThetaA0
TGLCamera * fCamera
ClassDef(TGLAutoRotator, 0)
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
static const char * filename()
Basic string class.
Definition: TString.h:137
TString fImageName
Double_t GetDeltaPhi() const
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
Int_t GetImageGUIOutMode() const
TString fImageGUIBaseName
Double_t fDollyA0
Double_t GetDt() const
void Timeout()
Called on every timer timeout.
Double_t GetWPhi() const
Bool_t GetRotateScene() const
Double_t GetWDolly() const
void StartImageAutoSaveAnimatedGif(const TString &filename)
Start saving into animated gif.
Double_t GetADolly() const
TString GetImageName() const
void SetImageGUIBaseName(const TString &gname)
Bool_t IsRunning() const
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
TGLCamera * GetCamera() const
Double_t GetATheta() const
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
TMarker * m
Definition: textangle.C:8
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:57
Double_t fATheta
void StartImageAutoSaveWithGUISettings()
Start auto-saving images as set-up via GUI.
TString GetImageGUIBaseName() const
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:53
Double_t GetWTheta() const
void SetRotateScene(Bool_t rotateScene)
Bool_t fTimerRunning
TGLAutoRotator & operator=(const TGLAutoRotator &)
void SetDeltaPhi(Double_t dPhi)
void Stop()
Stop the auto-rotator.
double Double_t
Definition: RtypesCore.h:55
TGLViewer * GetViewer() const
Double_t fDeltaPhi
#define name(a, b)
Definition: linkTestLib0.cpp:5
TGLViewer * fViewer
Mother of all ROOT objects.
Definition: TObject.h:58
void SetDt(Double_t dt)
Set time between two redraws in seconds.
TGLAutoRotator(const TGLAutoRotator &)
Bool_t GetImageAutoSave() const
void SetImageAutoSave(Bool_t s)
Int_t GetImageCount() const
void SetImageName(const TString &name)
virtual ~TGLAutoRotator()
Destructor.
void Start()
Start the auto-rotator.
Int_t fImageGUIOutMode
Double_t fWDolly
Bool_t fImageAutoSave
TStopwatch * fWatch
Stopwatch class.
Definition: TStopwatch.h:30