00001 // @(#)root/eve:$Id: TGLAutoRotator.h 36373 2010-10-19 17:43:35Z matevz $ 00002 // Author: Matevz Tadel 2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TGLAutoRotator 00013 #define ROOT_TGLAutoRotator 00014 00015 #include "TObject.h" 00016 00017 class TGLCamera; 00018 class TGLViewer; 00019 class TTimer; 00020 class TStopwatch; 00021 00022 class TGLAutoRotator : public TObject 00023 { 00024 private: 00025 TGLAutoRotator(const TGLAutoRotator&); // Not implemented 00026 TGLAutoRotator& operator=(const TGLAutoRotator&); // Not implemented 00027 00028 protected: 00029 TGLViewer *fViewer; 00030 TGLCamera *fCamera; 00031 TTimer *fTimer; 00032 TStopwatch *fWatch; 00033 00034 Double_t fDt; 00035 Double_t fWPhi; 00036 Double_t fWTheta, fATheta; 00037 Double_t fWDolly, fADolly; 00038 00039 Double_t fThetaA0, fDollyA0; 00040 Bool_t fTimerRunning; 00041 00042 public: 00043 TGLAutoRotator(TGLViewer* v); 00044 virtual ~TGLAutoRotator(); 00045 00046 TGLCamera* GetCamera() const { return fCamera; } 00047 00048 // -------------------------------- 00049 00050 void Start(); 00051 void Stop(); 00052 00053 void Timeout(); 00054 00055 // -------------------------------- 00056 00057 Bool_t IsRunning() const { return fTimerRunning; } 00058 00059 Double_t GetDt() const { return fDt; } 00060 void SetDt(Double_t dt); 00061 00062 Double_t GetWPhi() const { return fWPhi; } 00063 void SetWPhi(Double_t w) { fWPhi = w; } 00064 00065 Double_t GetWTheta() const { return fWTheta; } 00066 void SetWTheta(Double_t w) { fWTheta = w; } 00067 Double_t GetATheta() const { return fATheta; } 00068 void SetATheta(Double_t a); 00069 00070 Double_t GetWDolly() const { return fWDolly; } 00071 void SetWDolly(Double_t w) { fWDolly = w; } 00072 Double_t GetADolly() const { return fADolly; } 00073 void SetADolly(Double_t a); 00074 00075 ClassDef(TGLAutoRotator, 0); // Short description. 00076 }; 00077 00078 #endif