27 fZoom(1.), fShift(1.5), fCenter(),
102 glGetDoublev(GL_MODELVIEW_MATRIX, mv);
104 glGetDoublev(GL_PROJECTION_MATRIX, pr);
109 gluUnProject(px, py, 1., mv, pr, vp, &end.
X(), &end.
Y(), &end.
Z());
110 fTruck += (start - end) /= 2.;
123 glMatrixMode(GL_PROJECTION);
134 glMatrixMode(GL_MODELVIEW);
143 glTranslated(0., 0., -
fShift);
145 glRotated(theta - 90., 1., 0., 0.);
146 glRotated(phi, 0., 0., 1.);
void SetViewport(const TGLRect &vp)
Setup viewport, if it was changed, plus reset arcball.
Camera for TGLPlotPainter and sub-classes.
void Click(const TPoint &NewPt)
Mouse down.
Int_t GetY() const
viewport[1]
void StartPan(Int_t px, Int_t py)
User clicks somewhere (px, py).
Int_t GetWidth() const
viewport[2]
void Drag(const TPoint &NewPt)
Mouse drag, calculate rotation.
3 component (x/y/z) vertex class.
Viewport (pixel base) 2D rectangle class.
void StartRotation(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 SetViewVolume(const TGLVertex3 *box)
'box' is the TGLPlotPainter's back box's coordinates.
const Double_t * GetRotMatrix() const
void RotateCamera(Int_t px, Int_t py)
Mouse movement.
void Pan(Int_t px, Int_t py)
Pan camera.
Int_t GetX() const
viewport[0]
TGLPlotCamera()
Construct camera for plot painters.
void SetBounds(UInt_t NewWidth, UInt_t NewHeight)
void SetCamera() const
Viewport and projection.
Int_t GetHeight() const
viewport[3]