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) {
Double_t DistanceTo(const TGLVertex3 &vertex) const
Distance from plane to vertex.
TGLVertex3 Center() const
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'.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
TGLVector3 Extents() const
16 component (4x4) transform matrix - column MAJOR as per GL.
Double_t fFarClip
last applied near-clip
virtual ~TGLPerspectiveCamera()
Destroy perspective camera.
Short_t Min(Short_t a, Short_t b)
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
void UpdateCache() const
largest box diagonal seen in OfInterest() - used when bootstrapping interest box
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Perspective projection camera - with characteristic foreshortening.
Double_t fDollyDefault
last applied far-clip
3 component (x/y/z) vertex class.
static UInt_t fgFOVDeltaSens
TGLRect fViewport
frustum planes (cached)
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Viewport (pixel base) 2D rectangle class.
3 component (x/y/z) vector class.
void SetIdentity()
Set matrix to identity.
static Double_t fgFOVDefault
TGLVector3 GetTranslation() const
Return the translation component of matrix.
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...
void WindowToViewport(Int_t &, Int_t &y) const
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 Zoom(Int_t delta, Bool_t mod1, Bool_t mod2)
Zoom the camera - 'adjust lens focal length, retaining camera position'.
Double_t AdjustDelta(Double_t screenShift, Double_t deltaFactor, Bool_t mod1, Bool_t mod2) const
Adjust a passed screen value and apply modifiers.
void SetCenterVec(Double_t x, Double_t y, Double_t z)
Set camera center vector.
Double_t fNearClip
current camera center
virtual void Configure(Double_t fov, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Configure the camera state.
TGLMatrix fLastNoPickProjM
timestamp
virtual void Reset()
Reset the camera to defaults - reframe the world volume established in Setup() in default state...
Double_t Hypot(Double_t x, Double_t y)
TGLVertex3 EyePoint() const
Return the camera eye point (vertex) in world space Camera must have valid frustum cache - call Apply...
Concrete class describing an orientated (free) or axis aligned box of 8 vertices. ...
TGLPerspectiveCamera()
Construct default XOZ perspective camera.
3D plane class - of format Ax + By + Cz + D = 0
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...
void MoveLF(Int_t ai, Double_t amount)
Translate in local frame.
TGLVector3 GetBaseVec(Int_t b) const
const Int_t * CArr() const
TGLVector3 EyeDirection() const
Extract the camera eye direction (vector), running from EyePoint() Camera must have valid frustum cac...