Logo ROOT   6.14/05
Reference Guide
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Timur Pocheptsov
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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  *************************************************************************/
12 #ifndef ROOT_TGLPlotCamera
13 #define ROOT_TGLPlotCamera
15 #include "TGLUtil.h"
16 #include "TArcBall.h"
17 #include "TPoint.h"
19 class TGLPaintDevice;
22 {
23 private:
24  TGLPlotCamera(const TGLPlotCamera&); // Not implemented
25  TGLPlotCamera& operator=(const TGLPlotCamera&); // Not implemented
27 protected:
38 public:
39  TGLPlotCamera();
40  virtual ~TGLPlotCamera() {}
42  void SetViewport(const TGLRect &vp);
44  void SetViewVolume(const TGLVertex3 *box);
45  void StartRotation(Int_t px, Int_t py);
46  void RotateCamera(Int_t px, Int_t py);
47  void StartPan(Int_t px, Int_t py);
48  void Pan(Int_t px, Int_t py);
49  void ZoomIn();
50  void ZoomOut();
51  void SetCamera()const;
52  void Apply(Double_t phi, Double_t theta)const;
54  Int_t GetX()const;
55  Int_t GetY()const;
56  Int_t GetWidth()const;
57  Int_t GetHeight()const;
59  ClassDef(TGLPlotCamera, 0); // Camera for plot-painters.
60 };
62 #endif
void SetViewport(const TGLRect &vp)
Setup viewport, if it was changed, plus reset arcball.
Camera for TGLPlotPainter and sub-classes.
Definition: TGLPlotCamera.h:21
TArcBall fArcBall
Definition: TGLPlotCamera.h:34
void StartPan(Int_t px, Int_t py)
User clicks somewhere (px, py).
Int_t GetWidth() const
Bool_t ViewportChanged() const
Definition: TGLPlotCamera.h:53
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGLVertex3 fCenter
Definition: TGLPlotCamera.h:32
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
void Apply(Double_t phi, Double_t theta) const
Applies rotations and translations before drawing.
#define ClassDef(name, id)
Definition: Rtypes.h:320
3 component (x/y/z) vertex class.
Definition: TGLUtil.h:82
TGLVector3 fTruck
Definition: TGLPlotCamera.h:33
void SetCamera() const
Viewport and projection.
void ZoomOut()
Zoom out.
Viewport (pixel base) 2D rectangle class.
Definition: TGLUtil.h:422
3 component (x/y/z) vector class.
Definition: TGLUtil.h:246
void StartRotation(Int_t px, Int_t py)
User clicks somewhere (px, py).
void SetViewVolume(const TGLVertex3 *box)
'box' is the TGLPlotPainter's back box's coordinates.
TGLRect fViewport
Definition: TGLPlotCamera.h:28
Double_t fOrthoBox[4]
Definition: TGLPlotCamera.h:31
Definition: TPoint.h:31
Bool_t fVpChanged
Definition: TGLPlotCamera.h:36
Double_t fZoom
Definition: TGLPlotCamera.h:29
void RotateCamera(Int_t px, Int_t py)
Mouse movement.
TPoint fMousePos
Definition: TGLPlotCamera.h:35
void Pan(Int_t px, Int_t py)
Pan camera.
Construct camera for plot painters.
double Double_t
Definition: RtypesCore.h:55
Int_t GetY() const
virtual ~TGLPlotCamera()
Definition: TGLPlotCamera.h:40
Implements the arc-ball rotation manipulator.
Definition: TArcBall.h:19
void ZoomIn()
Zoom in.
Int_t GetHeight() const
TGLPlotCamera & operator=(const TGLPlotCamera &)
Int_t GetX() const
Double_t fShift
Definition: TGLPlotCamera.h:30