Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:00

0001 // @(#)root/gl:$Id$
0002 // Author:  Richard Maunder  25/05/2005
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGLPerspectiveCamera
0013 #define ROOT_TGLPerspectiveCamera
0014 
0015 #include "TGLCamera.h"
0016 
0017 //////////////////////////////////////////////////////////////////////////
0018 //                                                                      //
0019 // TGLPerspectiveCamera                                                 //
0020 //                                                                      //
0021 // Perspective projection camera - with characteristic foreshortening.  //
0022 //                                                                      //
0023 //////////////////////////////////////////////////////////////////////////
0024 
0025 class TGLPerspectiveCamera : public TGLCamera
0026 {
0027 private:
0028    // Fields
0029    Double_t    fFOV;
0030 
0031    static   Double_t fgFOVMin, fgFOVDefault, fgFOVMax;
0032    static   UInt_t   fgFOVDeltaSens;
0033 
0034 public:
0035    TGLPerspectiveCamera();
0036    TGLPerspectiveCamera(const TGLVector3 & hAxis, const TGLVector3 & vAxis);
0037    ~TGLPerspectiveCamera() override;
0038 
0039    Bool_t IsPerspective() const override { return kTRUE; }
0040 
0041    Double_t GetFOV() const { return fFOV; }
0042    void     SetFOV(Double_t fov) { fFOV = fov; }
0043 
0044    void   Setup(const TGLBoundingBox & box, Bool_t reset=kTRUE) override;
0045    void   Reset() override;
0046    Bool_t Zoom (Int_t delta, Bool_t mod1, Bool_t mod2) override;
0047    using   TGLCamera::Truck;
0048    Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2) override;
0049    void   Apply(const TGLBoundingBox & box, const TGLRect * pickRect = nullptr) const override;
0050 
0051    // External scripting control
0052    void Configure(Double_t fov, Double_t dolly, Double_t center[3],
0053                           Double_t hRotate, Double_t vRotate) override;
0054 
0055    ClassDefOverride(TGLPerspectiveCamera,1) // Camera for perspective view.
0056 };
0057 
0058 #endif // ROOT_TGLPerspectiveCamera
0059