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