15#include "TGLIncludes.h"
148 return Zoom(delta, mod1, mod2);
218 return Truck(-xstep, -ystep);
246 const TGLRect * pickRect)
const
252 glMatrixMode(GL_PROJECTION);
254 glMatrixMode(GL_MODELVIEW);
259 glMatrixMode(GL_PROJECTION);
267 gluPickMatrix(rect.
X(), rect.
Y(), rect.
Width(), rect.
Height(),
285 glOrtho(-halfRangeX, halfRangeX,
286 -halfRangeY, halfRangeY,
292 glMatrixMode(GL_MODELVIEW);
300 gluLookAt(pos[0], pos[1], pos[2],
301 center[0], center[1], center[2],
302 up[0], up[1], up[2]);
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
TGLMatrix fLastNoPickProjM
! no-pick projection matrix (cached)
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
Bool_t fCacheDirty
! cached items dirty?
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
! last applied near-clip
TGLMatrix fProjM
! 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
! viewport (GL coords - origin bottom left)
void WindowToViewport(Int_t &, Int_t &y) const
void UpdateCache() const
Update internally cached frustum values.
void SetCenterVec(Double_t x, Double_t y, Double_t z)
Set camera center vector.
Double_t fFarClip
! last applied far-clip
TGLCamera(const TGLCamera &)=delete
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.
TGLVector3 GetBaseVec(Int_t b) const
TGLVector3 GetTranslation() const
Return the translation component of matrix.
Double_t fDefYSize
! x, y size of scene from camera view
~TGLOrthoCamera() override
Destroy orthographic camera.
void SetZoomMax(Double_t z)
Set maximum zoom factor.
Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2) override
Rotate the camera - 'swivel round the view volume center'.
Bool_t Zoom(Int_t delta, Bool_t mod1, Bool_t mod2) override
Zoom the camera - 'adjust lens focal length, retaining camera position'.
Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2) override
Truck the camera - 'move camera parallel to film plane'.
TGLBoundingBox fVolume
! scene volume
static UInt_t fgZoomDeltaSens
Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2) override
Dolly the camera.
void Apply(const TGLBoundingBox &sceneBox, const TGLRect *pickRect=nullptr) const override
Apply the camera to the current GL context, setting the viewport, projection and modelview matrices.
void Reset() override
Reset the camera to defaults - trucking, zooming to reframe the world volume established in Setup().
TGLOrthoCamera()
Construct kXOY orthographic camera.
void Setup(const TGLBoundingBox &box, Bool_t reset=kTRUE) override
Setup camera limits suitable to view the world volume defined by 'box' and call Reset() to initialise...
void SetZoomMin(Double_t z)
Set minimum zoom factor.
void Configure(Double_t zoom, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate) override
Configure the camera state.
Viewport (pixel base) 2D rectangle class.
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.