Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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:
28
29protected:
34
36
38
43
46
50
53
54public:
56 ~TGLAutoRotator() override;
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; }
87 Double_t GetATheta() const { return fATheta; }
88 void SetATheta(Double_t a);
89
90 Double_t GetWDolly() const { return fWDolly; }
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
104 void StopImageAutoSave();
105
107 void SetImageGUIBaseName(const TString& gname) { fImageGUIBaseName = gname; }
108
111
113
114 ClassDefOverride(TGLAutoRotator, 0); // Automatic, timer-based, rotation of GL-viewer's camera.
115};
116
117#endif
#define a(i)
Definition RSha256.hxx:99
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
char name[80]
Definition TGX11.cxx:110
Automatically rotates GL camera.
void SetImageAutoSave(Bool_t s)
void Start()
Start the auto-rotator.
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
TGLAutoRotator & operator=(const TGLAutoRotator &)=delete
void SetImageCount(Int_t ic)
void SetWPhi(Double_t w)
Double_t GetDt() const
TGLCamera * GetCamera() const
Double_t GetDeltaPhi() const
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
TGLAutoRotator(const TGLAutoRotator &)=delete
TString GetImageGUIBaseName() const
void Stop()
Stop the auto-rotator.
TGLViewer * fViewer
void SetImageName(const TString &name)
Bool_t GetRotateScene() const
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
TString fImageGUIBaseName
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
void SetDeltaPhi(Double_t dPhi)
void StartImageAutoSaveAnimatedGif(const TString &filename)
Start saving into animated gif.
Double_t GetATheta() const
TGLCamera * fCamera
TString GetImageName() const
void SetRotateScene(Bool_t rotateScene)
TGLViewer * GetViewer() const
void SetDt(Double_t dt)
Set time between two redraws in seconds.
void SetWTheta(Double_t w)
void StartImageAutoSave(const TString &filename)
Start saving into a set of images.
~TGLAutoRotator() override
Destructor.
Bool_t GetImageAutoSave() const
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:41
Stopwatch class.
Definition TStopwatch.h:28
Basic string class.
Definition TString.h:139
Handles synchronous and a-synchronous timer events.
Definition TTimer.h:51
TMarker m
Definition textangle.C:8