15#include "TGLIncludes.h"
42 fZoomMin(0.001), fZoomDefault(0.78), fZoomMax(1000.0),
56 fZoomMin(0.001), fZoomDefault(0.78), fZoomMax(1000.0),
149 return Zoom(delta, mod1, mod2);
219 return Truck(-xstep, -ystep);
247 const TGLRect * pickRect)
const
253 glMatrixMode(GL_PROJECTION);
255 glMatrixMode(GL_MODELVIEW);
260 glMatrixMode(GL_PROJECTION);
286 glOrtho(-halfRangeX, halfRangeX,
287 -halfRangeY, halfRangeY,
293 glMatrixMode(GL_MODELVIEW);
301 gluLookAt(pos[0], pos[1], pos[2],
302 center[0], center[1], center[2],
303 up[0], up[1], up[2]);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t rect
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char mx
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
TGLVector3 Extents() const
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
TGLMatrix fLastNoPickProjM
timestamp
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
virtual Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2)
Dolly the camera - 'move camera along eye line, retaining lens focal length'.
Double_t fNearClip
current camera center
TGLMatrix fProjM
no-pick projection matrix (cached)
Bool_t AdjustAndClampVal(Double_t &val, Double_t min, Double_t max, Int_t screenShift, Int_t screenShiftRange, Bool_t mod1, Bool_t mod2) const
Adjust a passed REFERENCE value 'val', based on screenShift delta.
virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Rotate the camera round view volume center established in Setup().
TGLRect fViewport
frustum planes (cached)
Double_t fDollyDefault
last applied far-clip
void WindowToViewport(Int_t &, Int_t &y) const
void UpdateCache() const
largest box diagonal seen in OfInterest() - used when bootstrapping interest box
void SetCenterVec(Double_t x, Double_t y, Double_t z)
Set camera center vector.
Double_t fFarClip
last applied near-clip
Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor, Bool_t mod1, Bool_t mod2) const
Adjust a passed screen value and apply modifiers.
16 component (4x4) transform matrix - column MAJOR as per GL.
void MoveLF(Int_t ai, Double_t amount)
Translate in local frame.
void SetIdentity()
Set matrix to identity.
Orthographic projection camera.
virtual void Reset()
Reset the camera to defaults - trucking, zooming to reframe the world volume established in Setup().
void SetZoomMax(Double_t z)
Set maximum zoom factor.
virtual Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Truck the camera - 'move camera parallel to film plane'.
Double_t fZoom
x, y size of scene from camera view
virtual Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2)
Dolly the camera.
virtual ~TGLOrthoCamera()
Destroy orthographic camera.
virtual void Setup(const TGLBoundingBox &box, Bool_t reset=kTRUE)
Setup camera limits suitable to view the world volume defined by 'box' and call Reset() to initialise...
static UInt_t fgZoomDeltaSens
virtual Bool_t Zoom(Int_t delta, Bool_t mod1, Bool_t mod2)
Zoom the camera - 'adjust lens focal length, retaining camera position'.
virtual void Configure(Double_t zoom, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Configure the camera state.
virtual void Apply(const TGLBoundingBox &sceneBox, const TGLRect *pickRect=nullptr) const
Apply the camera to the current GL context, setting the viewport, projection and modelview matrices.
TGLOrthoCamera()
Construct kXOY orthographic camera.
Double_t fDefXSize
scene volume
void SetZoomMin(Double_t z)
Set minimum zoom factor.
virtual Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Rotate the camera - 'swivel round the view volume center'.
Viewport (pixel base) 2D rectangle class.
const Int_t * CArr() const
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t Sqrt(Double_t x)
Returns the square root of x.