Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGLPerspectiveCamera.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Richard Maunder 25/05/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGLPerspectiveCamera
13 #define ROOT_TGLPerspectiveCamera
14 
15 #include "TGLCamera.h"
16 
17 //////////////////////////////////////////////////////////////////////////
18 // //
19 // TGLPerspectiveCamera //
20 // //
21 // Perspective projection camera - with characteristic foreshortening. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 class TGLPerspectiveCamera : public TGLCamera
26 {
27 private:
28  // Fields
29  Double_t fFOV;
30 
31  static Double_t fgFOVMin, fgFOVDefault, fgFOVMax;
32  static UInt_t fgFOVDeltaSens;
33 
34 public:
35  TGLPerspectiveCamera();
36  TGLPerspectiveCamera(const TGLVector3 & hAxis, const TGLVector3 & vAxis);
37  virtual ~TGLPerspectiveCamera();
38 
39  virtual Bool_t IsPerspective() const { return kTRUE; }
40 
41  Double_t GetFOV() const { return fFOV; }
42  void SetFOV(Double_t fov) { fFOV = fov; }
43 
44  virtual void Setup(const TGLBoundingBox & box, Bool_t reset=kTRUE);
45  virtual void Reset();
46  virtual Bool_t Zoom (Int_t delta, Bool_t mod1, Bool_t mod2);
47  using TGLCamera::Truck;
48  virtual Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2);
49  virtual void Apply(const TGLBoundingBox & box, const TGLRect * pickRect = 0) const;
50 
51  // External scripting control
52  virtual void Configure(Double_t fov, Double_t dolly, Double_t center[3],
53  Double_t hRotate, Double_t vRotate);
54 
55  ClassDef(TGLPerspectiveCamera,1) // Camera for perspective view.
56 };
57 
58 #endif // ROOT_TGLPerspectiveCamera
59