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);
249 gluPickMatrix(rect.
X(), rect.
Y(), rect.
Width(), rect.
Height(),
259 glMatrixMode(GL_MODELVIEW);
283 }
else if (
fFOV < 0.1) {
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.
TGLVector3 GetBaseVec(Int_t b) const
TGLVector3 GetTranslation() const
Return the translation component of matrix.
Perspective projection camera - with characteristic foreshortening.
virtual void Configure(Double_t fov, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Configure the camera state.
static UInt_t fgFOVDeltaSens
virtual void Apply(const TGLBoundingBox &box, const TGLRect *pickRect=0) const
Apply the camera to the current GL context, setting the viewport, projection and modelview matrices.
TGLPerspectiveCamera()
Construct default XOZ perspective camera.
virtual ~TGLPerspectiveCamera()
Destroy perspective camera.
virtual Bool_t Zoom(Int_t delta, Bool_t mod1, Bool_t mod2)
Zoom the camera - 'adjust lens focal length, retaining camera position'.
static Double_t fgFOVDefault
virtual void Reset()
Reset the camera to defaults - reframe the world volume established in Setup() in default state.
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...
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'.
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)
Double_t Hypot(Double_t x, Double_t y)
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)