TGLPerspectiveCamera.h

Go to the documentation of this file.
00001 // @(#)root/gl:$Id: TGLPerspectiveCamera.h 31821 2009-12-10 18:22:44Z matevz $
00002 // Author:  Richard Maunder  25/05/2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, 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_TGLPerspectiveCamera
00013 #define ROOT_TGLPerspectiveCamera
00014 
00015 #include "TGLCamera.h"
00016 
00017 //////////////////////////////////////////////////////////////////////////
00018 //                                                                      //
00019 // TGLPerspectiveCamera                                                 //
00020 //                                                                      //
00021 // Perspective projection camera - with characteristic foreshortening.  //
00022 //                                                                      //
00023 // TODO: Currently constrains YOZ plane to be floor - this is never     //
00024 // 'tipped'. While useful we really need to extend so can:              //
00025 // i) Pick any one of the three natural planes of the world to be floor.//
00026 // ii) Can use a free arcball style camera with no contraint - integrate//
00027 // TArcBall.                                                            //
00028 //////////////////////////////////////////////////////////////////////////
00029 
00030 class TGLPerspectiveCamera : public TGLCamera
00031 {
00032 private:
00033    // Fields
00034    Double_t    fFOV;             //!
00035 
00036    static   Double_t fgFOVMin, fgFOVDefault, fgFOVMax;
00037    static   UInt_t   fgFOVDeltaSens;
00038 
00039 public:
00040    TGLPerspectiveCamera(const TGLVector3 & hAxis, const TGLVector3 & vAxis);
00041    virtual ~TGLPerspectiveCamera();
00042 
00043    virtual Bool_t IsPerspective() const { return kTRUE; }
00044 
00045    Double_t GetFOV() const { return fFOV; }
00046 
00047    virtual void   Setup(const TGLBoundingBox & box, Bool_t reset=kTRUE);
00048    virtual void   Reset();
00049    virtual Bool_t Zoom (Int_t delta, Bool_t mod1, Bool_t mod2);
00050    using   TGLCamera::Truck;
00051    virtual Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2);
00052    virtual void   Apply(const TGLBoundingBox & box, const TGLRect * pickRect = 0) const;
00053 
00054    // External scripting control
00055    virtual void Configure(Double_t fov, Double_t dolly, Double_t center[3],
00056                           Double_t hRotate, Double_t vRotate);
00057 
00058    ClassDef(TGLPerspectiveCamera,0) // Camera for perspective view.
00059 };
00060 
00061 #endif // ROOT_TGLPerspectiveCamera
00062 

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