ROOT logo
// @(#)root/eve:$Id: TGLAutoRotator.h 36373 2010-10-19 17:43:35Z matevz $
// Author: Matevz Tadel 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGLAutoRotator
#define ROOT_TGLAutoRotator

#include "TObject.h"

class TGLCamera;
class TGLViewer;
class TTimer;
class TStopwatch;

class TGLAutoRotator : public TObject
{
private:
   TGLAutoRotator(const TGLAutoRotator&);            // Not implemented
   TGLAutoRotator& operator=(const TGLAutoRotator&); // Not implemented

protected:
   TGLViewer  *fViewer;
   TGLCamera  *fCamera;
   TTimer     *fTimer;
   TStopwatch *fWatch;

   Double_t   fDt;
   Double_t   fWPhi;
   Double_t   fWTheta, fATheta;
   Double_t   fWDolly, fADolly;

   Double_t   fThetaA0, fDollyA0;
   Bool_t     fTimerRunning;

public:
   TGLAutoRotator(TGLViewer* v);
   virtual ~TGLAutoRotator();

   TGLCamera* GetCamera() const { return fCamera; }

   // --------------------------------

   void Start();
   void Stop();

   void Timeout();

   // --------------------------------

   Bool_t   IsRunning() const     { return fTimerRunning; }

   Double_t GetDt() const         { return fDt; }
   void     SetDt(Double_t dt);

   Double_t GetWPhi() const       { return fWPhi; }
   void     SetWPhi(Double_t w)   { fWPhi = w;    }

   Double_t GetWTheta() const     { return fWTheta; }
   void     SetWTheta(Double_t w) { fWTheta = w;    }
   Double_t GetATheta() const     { return fATheta; }
   void     SetATheta(Double_t a);

   Double_t GetWDolly() const     { return fWDolly; }
   void     SetWDolly(Double_t w) { fWDolly = w;    }
   Double_t GetADolly() const     { return fADolly; }
   void     SetADolly(Double_t a);

   ClassDef(TGLAutoRotator, 0); // Short description.
};

#endif
 TGLAutoRotator.h:1
 TGLAutoRotator.h:2
 TGLAutoRotator.h:3
 TGLAutoRotator.h:4
 TGLAutoRotator.h:5
 TGLAutoRotator.h:6
 TGLAutoRotator.h:7
 TGLAutoRotator.h:8
 TGLAutoRotator.h:9
 TGLAutoRotator.h:10
 TGLAutoRotator.h:11
 TGLAutoRotator.h:12
 TGLAutoRotator.h:13
 TGLAutoRotator.h:14
 TGLAutoRotator.h:15
 TGLAutoRotator.h:16
 TGLAutoRotator.h:17
 TGLAutoRotator.h:18
 TGLAutoRotator.h:19
 TGLAutoRotator.h:20
 TGLAutoRotator.h:21
 TGLAutoRotator.h:22
 TGLAutoRotator.h:23
 TGLAutoRotator.h:24
 TGLAutoRotator.h:25
 TGLAutoRotator.h:26
 TGLAutoRotator.h:27
 TGLAutoRotator.h:28
 TGLAutoRotator.h:29
 TGLAutoRotator.h:30
 TGLAutoRotator.h:31
 TGLAutoRotator.h:32
 TGLAutoRotator.h:33
 TGLAutoRotator.h:34
 TGLAutoRotator.h:35
 TGLAutoRotator.h:36
 TGLAutoRotator.h:37
 TGLAutoRotator.h:38
 TGLAutoRotator.h:39
 TGLAutoRotator.h:40
 TGLAutoRotator.h:41
 TGLAutoRotator.h:42
 TGLAutoRotator.h:43
 TGLAutoRotator.h:44
 TGLAutoRotator.h:45
 TGLAutoRotator.h:46
 TGLAutoRotator.h:47
 TGLAutoRotator.h:48
 TGLAutoRotator.h:49
 TGLAutoRotator.h:50
 TGLAutoRotator.h:51
 TGLAutoRotator.h:52
 TGLAutoRotator.h:53
 TGLAutoRotator.h:54
 TGLAutoRotator.h:55
 TGLAutoRotator.h:56
 TGLAutoRotator.h:57
 TGLAutoRotator.h:58
 TGLAutoRotator.h:59
 TGLAutoRotator.h:60
 TGLAutoRotator.h:61
 TGLAutoRotator.h:62
 TGLAutoRotator.h:63
 TGLAutoRotator.h:64
 TGLAutoRotator.h:65
 TGLAutoRotator.h:66
 TGLAutoRotator.h:67
 TGLAutoRotator.h:68
 TGLAutoRotator.h:69
 TGLAutoRotator.h:70
 TGLAutoRotator.h:71
 TGLAutoRotator.h:72
 TGLAutoRotator.h:73
 TGLAutoRotator.h:74
 TGLAutoRotator.h:75
 TGLAutoRotator.h:76
 TGLAutoRotator.h:77
 TGLAutoRotator.h:78