TGLPlotCamera.h

Go to the documentation of this file.
00001 // @(#)root/gl:$Id: TGLPlotCamera.h 33579 2010-05-19 12:43:08Z rdm $
00002 // Author: Timur Pocheptsov
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_TGLPlotCamera
00013 #define ROOT_TGLPlotCamera
00014 
00015 #include "TGLUtil.h"
00016 #include "TArcBall.h"
00017 #include "TPoint.h"
00018 
00019 class TGLPaintDevice;
00020 
00021 class TGLPlotCamera
00022 {
00023 private:
00024    TGLPlotCamera(const TGLPlotCamera&);            // Not implemented
00025    TGLPlotCamera& operator=(const TGLPlotCamera&); // Not implemented
00026 
00027 protected:
00028    TGLRect        fViewport;
00029    Double_t       fZoom;
00030    Double_t       fShift;
00031    Double_t       fOrthoBox[4];
00032    TGLVertex3     fCenter;
00033    TGLVector3     fTruck;
00034    TArcBall       fArcBall;
00035    TPoint         fMousePos;
00036    Bool_t         fVpChanged;
00037 
00038 public:
00039    TGLPlotCamera();
00040    virtual ~TGLPlotCamera() {}
00041 
00042    void   SetViewport(const TGLRect &vp);
00043 
00044    void   SetViewVolume(const TGLVertex3 *box);
00045    void   StartRotation(Int_t px, Int_t py);
00046    void   RotateCamera(Int_t px, Int_t py);
00047    void   StartPan(Int_t px, Int_t py);
00048    void   Pan(Int_t px, Int_t py);
00049    void   ZoomIn();
00050    void   ZoomOut();
00051    void   SetCamera()const;
00052    void   Apply(Double_t phi, Double_t theta)const;
00053    Bool_t ViewportChanged()const{return fVpChanged;}
00054    Int_t  GetX()const;
00055    Int_t  GetY()const;
00056    Int_t  GetWidth()const;
00057    Int_t  GetHeight()const;
00058 
00059    ClassDef(TGLPlotCamera, 0); // Camera for plot-painters.
00060 };
00061 
00062 #endif

Generated on Tue Jul 5 14:16:49 2011 for ROOT_528-00b_version by  doxygen 1.5.1