12#include "TGLIncludes.h"
26 fZoom(1.), fShift(1.5), fCenter(),
101 glGetDoublev(GL_MODELVIEW_MATRIX, mv);
103 glGetDoublev(GL_PROJECTION_MATRIX, pr);
108 gluUnProject(px, py, 1., mv, pr, vp, &end.
X(), &end.
Y(), &end.
Z());
109 fTruck += (start - end) /= 2.;
122 glMatrixMode(GL_PROJECTION);
133 glMatrixMode(GL_MODELVIEW);
142 glTranslated(0., 0., -
fShift);
144 glRotated(theta - 90., 1., 0., 0.);
145 glRotated(phi, 0., 0., 1.);
void Drag(const TPoint &NewPt)
Mouse drag, calculate rotation.
void SetBounds(UInt_t NewWidth, UInt_t NewHeight)
void Click(const TPoint &NewPt)
Mouse down.
const Double_t * GetRotMatrix() const
Camera for TGLPlotPainter and sub-classes.
Int_t GetY() const
viewport[1]
TGLPlotCamera()
Construct camera for plot painters.
void StartPan(Int_t px, Int_t py)
User clicks somewhere (px, py).
void Apply(Double_t phi, Double_t theta) const
Applies rotations and translations before drawing.
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.
Int_t GetWidth() const
viewport[2]
void Pan(Int_t px, Int_t py)
Pan camera.
Int_t GetHeight() const
viewport[3]
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.
3 component (x/y/z) vertex class.