class TGLOrthoCamera: public TGLCamera


Orthographic projection camera. Currently limited to three types
defined at construction time - kXOY, kXOZ, kZOY - where this refers
to the viewport plane axis - e.g. kXOY has X axis horizontal, Y
vertical - i.e. looking down Z axis with Y vertical.

The plane types restriction could easily be removed to supported
arbitary ortho projections along any axis/orientation with free
rotations about them.

Function Members (Methods)

TGLOrthoCamera(const TGLVector3& hAxis, const TGLVector3& vAxis)
voidApply() const
virtual voidApply(const TGLBoundingBox& sceneBox, const TGLRect* pickRect = 0) const
static TClass*Class()
virtual voidConfigure(Double_t zoom, Double_t dolly, Double_t* center, Double_t hRotate, Double_t vRotate)
virtual Bool_tDolly(Int_t delta, Bool_t mod1, Bool_t mod2)
voidTGLCamera::DrawDebugAids() const
TGLVector3TGLCamera::EyeDirection() const
TGLVertex3TGLCamera::EyePoint() const
TGLVertex3TGLCamera::FrustumCenter() const
EOverlapTGLCamera::FrustumOverlap(const TGLBoundingBox& box) const
const TGLPlane&TGLCamera::FrustumPlane(TGLCamera::EFrustumPlane plane) const
const TGLMatrix&TGLCamera::GetCamBase() const
const TGLMatrix&TGLCamera::GetCamTrans() const
Bool_tGetDollyToZoom() const
Bool_tGetEnableRotate() const
Double_tTGLCamera::GetFarClip() const
Int_tGetHeight() const
Double_tTGLCamera::GetNearClip() const
Int_tGetWidth() const
Int_tGetX() const
Int_tGetY() const
virtual TClass*IsA() const
Bool_tTGLCamera::IsCacheDirty() const
virtual voidMarkup(TGLCameraMarkupStyle* ms) const
Bool_tTGLCamera::OfInterest(const TGLBoundingBox& box, Bool_t ignoreSize) const
voidPan(Int_t px, Int_t py)
const TGLRect&TGLCamera::RefViewport() const
virtual voidReset()
virtual Bool_tRotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
voidRotateCamera(Int_t px, Int_t py)
virtual Bool_tTGLCamera::RotateRad(Double_t hRotate, Double_t vRotate)
voidSetCamera() const
voidTGLCamera::SetCenterVec(Double_t x, Double_t y, Double_t z)
voidSetDollyToZoom(Bool_t x)
voidSetEnableRotate(Bool_t x)
voidTGLCamera::SetExternalCenter(Bool_t x)
virtual voidSetup(const TGLBoundingBox& box, Bool_t reset = kTRUE)
voidTGLCamera::SetVAxisMinAngle(Float_t x)
voidSetViewport(TGLPaintDevice* dev)
voidSetViewVolume(const TGLVertex3* box)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
voidStartPan(Int_t px, Int_t py)
voidStartRotation(Int_t px, Int_t py)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
UInt_tTGLCamera::TimeStamp() const
virtual Bool_tTGLCamera::Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Bool_tTGLCamera::UpdateInterest(Bool_t force)
Bool_tViewportChanged() const
TGLVector3TGLCamera::ViewportDeltaToWorld(const TGLVertex3& worldRef, Double_t viewportXDelta, Double_t viewportYDelta) const
EOverlapTGLCamera::ViewportOverlap(const TGLBoundingBox& box) const
pair<Bool_t,TGLVertex3>TGLCamera::ViewportPlaneIntersection(const TPoint& viewport, const TGLPlane& worldPlane) const
pair<Bool_t,TGLVertex3>TGLCamera::ViewportPlaneIntersection(Double_t viewportX, Double_t viewportY, const TGLPlane& worldPlane) const
TGLRectTGLCamera::ViewportRect(const TGLBoundingBox& box, TGLBoundingBox::EFace face) const
TGLRectTGLCamera::ViewportRect(const TGLBoundingBox& box, const TGLBoundingBox::EFace* face = 0) const
TGLVertex3TGLCamera::ViewportToWorld(const TGLVertex3& viewportVertex) const
TGLLine3TGLCamera::ViewportToWorld(const TPoint& viewport) const
TGLLine3TGLCamera::ViewportToWorld(Double_t viewportX, Double_t viewportY) const
voidTGLCamera::WindowToViewport(TPoint& point) const
voidTGLCamera::WindowToViewport(TGLRect& rect) const
voidTGLCamera::WindowToViewport(TGLVertex3& vertex) const
voidTGLCamera::WindowToViewport(Int_t&, Int_t& y) const
TGLVector3TGLCamera::WorldDeltaToViewport(const TGLVertex3& worldRef, const TGLVector3& worldDelta) const
TGLVertex3TGLCamera::WorldToViewport(const TGLVertex3& worldVertex) const
virtual Bool_tZoom(Int_t delta, Bool_t mod1, Bool_t mod2)
Bool_tTGLCamera::AdjustAndClampVal(Double_t& val, Double_t min, Double_t max, Int_t screenShift, Int_t screenShiftRange, Bool_t mod1, Bool_t mod2) const
Double_tTGLCamera::AdjustDelta(Int_t screenShift, Double_t deltaFactor, Bool_t mod1, Bool_t mod2) const
voidTGLCamera::UpdateCache() const

Data Members

enum EType { kZOY
enum TGLCamera::EFrustumPlane { kNear
Bool_tTGLCamera::fCacheDirty! cached items dirty?
TGLMatrixTGLCamera::fCamBase! tranformation to center and rotation from up to x vector
TGLMatrixTGLCamera::fCamTrans! transformation relative to fCamTrans
TGLVector3*TGLCamera::fCenter! current camera center
TGLMatrixTGLCamera::fClipM! object space clip matrix (cached)
TGLVector3TGLCamera::fDefCenter! deafult camera center
Double_tTGLCamera::fDollyDefault! default distnce from viewing centre
Double_tTGLCamera::fDollyDistance! unit distance for camera movement in fwd/bck direction
TGLVector3TGLCamera::fExtCenter! external camera center
Bool_tTGLCamera::fExternalCenter! use external center insead of scene center
Double_tTGLCamera::fFarClip! last applied far-clip
TGLPlaneTGLCamera::fFrustumPlanes[6]! frustum planes (cached)
TGLBoundingBoxTGLCamera::fInterestBox! the interest box - created in UpdateInterest()
Double_tTGLCamera::fLargestSeen! largest box volume seen in OfInterest() - used when
TGLMatrixTGLCamera::fModVM! modelView matrix (cached)
Double_tTGLCamera::fNearClip! last applied near-clip
TGLMatrixTGLCamera::fProjM! projection matrix (cached)
UInt_tTGLCamera::fTimeStamp! timestamp
Float_tTGLCamera::fVAxisMinAngle! minimal allowed angle between up and fCamTrans Z vector
TGLRectTGLCamera::fViewport! viewport (GL coords - origin bottom left)
static UInt_tTGLCamera::fgDollyDeltaSens
Double_tfDefYSize! x, y size of scene from camera view
Bool_tfDollyToZoom! zoom when dolly is requested
Bool_tfEnableRotate! enable rotation
TGLOrthoCamera::ETypefType! camera type
TGLBoundingBoxfVolume! scene volume
Double_tfZoom! current zoom
Double_tfZoomDefault! default zoom factor
Double_tfZoomMax! maximum zoom factor
Double_tfZoomMin! minimum zoom factor
static UInt_tfgZoomDeltaSens

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLOrthoCamera(const TGLVector3& hAxis, const TGLVector3& vAxis)
 Construct orthographic camera.
 Destroy orthographic camera.
void Setup(const TGLBoundingBox& box, Bool_t reset = kTRUE)
 Setup camera limits suitible to view the world volume defined by 'box'
 and call Reset() to initialise camera.
void Reset()
 Reset the camera to defaults - trucking, zooming to reframe the world volume
 established in Setup(). Note: limits defined in Setup() are not adjusted.
Bool_t Dolly(Int_t delta, Bool_t mod1, Bool_t mod2)
 Dolly the camera.
 By default the dolly is reinterpreted to zoom, but it can be
 changed by modifying the fDollyToZoom data-member.
Bool_t Zoom(Int_t delta, Bool_t mod1, Bool_t mod2)
 Zoom the camera - 'adjust lens focal length, retaining camera position'.
 Arguments are:

 'delta' - mouse viewport delta (pixels) - +ive zoom in, -ive zoom out
 'mod1' / 'mod2' - sensitivity modifiers - see TGLCamera::AdjustAndClampVal()

 For an orthographic camera dollying and zooming are identical and both equate
 logically to a rescaling of the viewport limits - without center shift.
 There is no perspective foreshortening or lens 'focal length'.

 Returns kTRUE is redraw required (camera change), kFALSE otherwise.
Bool_t Rotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
 Rotate the camera - 'swivel round the view volume center'.
 Returns kTRUE is redraw required (camera change), kFALSE otherwise.
void Apply(const TGLBoundingBox& sceneBox, const TGLRect* pickRect = 0) const
 Apply the camera to the current GL context, setting the viewport, projection
 and modelview matricies. After this verticies etc can be directly entered
 in the world frame. This also updates the cached frustum values, enabling
 all the projection, overlap tests etc defined in TGLCamera to be used.

 Arguments are:
 'box' - view volume box - ignored for ortho camera. Assumed to be same
 as one passed to Setup().
 'pickRect' - optional picking rect. If non-null, restrict drawing to this
 viewport rect.
void Configure(Double_t zoom, Double_t dolly, Double_t* center, Double_t hRotate, Double_t vRotate)
 Configure the camera state.
void Markup(TGLCameraMarkupStyle* ms) const
 Write viewport dimensions on screen.
 Construct orthographic camera.
void SetViewport(TGLPaintDevice* dev)
void TGLOrthoCamera::SetViewport(Int_t context)
Setup viewport, if it was changed, plus reset arcball.
void SetViewVolume(const TGLVertex3* box)
'box' is the TGLPlotPainter's back box's coordinates.
void StartRotation(Int_t px, Int_t py)
User clicks somewhere (px, py).
void RotateCamera(Int_t px, Int_t py)
Mouse movement.
void StartPan(Int_t px, Int_t py)
User clicks somewhere (px, py).
void Pan(Int_t px, Int_t py)
Pan camera.
void SetCamera()
Viewport and projection.
void Apply()
Applies rotations and translations before drawing
Int_t GetX()
Int_t GetY()
Int_t GetWidth()
Int_t GetHeight()
void ZoomIn()
Zoom in.
void ZoomOut()
Zoom out.
void Init()
void SetEnableRotate(Bool_t x)
{ fEnableRotate = x; }
Bool_t GetEnableRotate()
{ return fEnableRotate; }
void SetDollyToZoom(Bool_t x)
{ fDollyToZoom = x; }
Bool_t GetDollyToZoom()
{ return fDollyToZoom; }
Bool_t ViewportChanged()
{return fVpChanged;}

Author: Richard Maunder 25/05/2005
Last update: root/gl:$Id: TGLOrthoCamera.h 21651 2008-01-11 17:11:35Z matevz $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.