Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLPlotCamera.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov
3
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 *************************************************************************/
11
12#ifndef ROOT_TGLPlotCamera
13#define ROOT_TGLPlotCamera
14
15#include "TGLUtil.h"
16#include "TArcBall.h"
17#include "TPoint.h"
18
19class TGLPaintDevice;
20
22{
23private:
24 TGLPlotCamera(const TGLPlotCamera&) = delete;
26
27protected:
37
38public:
40 virtual ~TGLPlotCamera() {}
41
42 void SetViewport(const TGLRect &vp);
43
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;
58
59 ClassDef(TGLPlotCamera, 0); // Camera for plot-painters.
60};
61
62#endif
int Int_t
Definition RtypesCore.h:45
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:337
Implements the arc-ball rotation manipulator.
Definition TArcBall.h:19
Camera for TGLPlotPainter and sub-classes.
Int_t GetY() const
viewport[1]
Double_t fOrthoBox[4]
TGLPlotCamera()
Construct camera for plot painters.
Double_t fShift
void StartPan(Int_t px, Int_t py)
User clicks somewhere (px, py).
Bool_t ViewportChanged() const
virtual ~TGLPlotCamera()
void Apply(Double_t phi, Double_t theta) const
Applies rotations and translations before drawing.
TGLVertex3 fCenter
void SetViewport(const TGLRect &vp)
Setup viewport, if it was changed, plus reset arcball.
Int_t GetX() const
viewport[0]
void RotateCamera(Int_t px, Int_t py)
Mouse movement.
void SetCamera() const
Viewport and projection.
void ZoomIn()
Zoom in.
TGLPlotCamera(const TGLPlotCamera &)=delete
Int_t GetWidth() const
viewport[2]
void Pan(Int_t px, Int_t py)
Pan camera.
TGLRect fViewport
void ZoomOut()
Zoom out.
Int_t GetHeight() const
viewport[3]
TGLVector3 fTruck
TGLPlotCamera & operator=(const TGLPlotCamera &)=delete
TArcBall fArcBall
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.
Viewport (pixel base) 2D rectangle class.
Definition TGLUtil.h:422
3 component (x/y/z) vector class.
Definition TGLUtil.h:248
3 component (x/y/z) vertex class.
Definition TGLUtil.h:84
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1