14#include "TGLIncludes.h"
144 return Truck(-xstep, -ystep);
159 const TGLRect * pickRect)
const
176 glMatrixMode(GL_PROJECTION);
178 glMatrixMode(GL_MODELVIEW);
183 glMatrixMode(GL_PROJECTION);
193 glMatrixMode(GL_MODELVIEW);
201 gluLookAt(pos[0], pos[1], pos[2],
202 center[0], center[1], center[2],
203 up[0], up[1], up[2]);
209 modifiedCache =
kTRUE;
220 for (
UInt_t i=0; i<8; i++) {
221 currentDist = clipPlane.
DistanceTo(sceneBox[i]);
240 glMatrixMode(GL_PROJECTION);
259 glMatrixMode(GL_MODELVIEW);
283 }
else if (
fFOV < 0.1) {
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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 mx
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
TGLMatrix fLastNoPickProjM
timestamp
TGLVector3 EyeDirection() const
Extract the camera eye direction (vector), running from EyePoint() Camera must have valid frustum cac...
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
Double_t fNearClip
current camera center
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.
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
TGLVertex3 EyePoint() const
Return the camera eye point (vertex) in world space Camera must have valid frustum cache - call Apply...
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.
Perspective projection camera - with characteristic foreshortening.
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 Configure(Double_t fov, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate) override
Configure the camera state.
Bool_t Zoom(Int_t delta, Bool_t mod1, Bool_t mod2) override
Zoom the camera - 'adjust lens focal length, retaining camera position'.
static UInt_t fgFOVDeltaSens
void Apply(const TGLBoundingBox &box, const TGLRect *pickRect=nullptr) const override
Apply the camera to the current GL context, setting the viewport, projection and modelview matrices.
~TGLPerspectiveCamera() override
Destroy perspective camera.
TGLPerspectiveCamera()
Construct default XOZ perspective camera.
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'.
static Double_t fgFOVDefault
void Reset() override
Reset the camera to defaults - reframe the world volume established in Setup() in default state.
3D plane class - of format Ax + By + Cz + D = 0
Double_t DistanceTo(const TGLVertex3 &vertex) const
Distance from plane to vertex.
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.
const Double_t * CArr() const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Hypot(Double_t x, Double_t y)
Returns sqrt(x*x + y*y)
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Sort the n elements of the array a of generic templated type Element.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.