ROOT logo
ROOT » GRAF3D » GL » TGLOrthoCamera

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(TGLOrthoCamera::EType type, const TGLVector3& hAxis, const TGLVector3& vAxis)
voidTObject::AbstractMethod(const char* method) const
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(Double_t screenShift, Double_t deltaFactor, Bool_t mod1, Bool_t mod2) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidApply(const TGLBoundingBox& sceneBox, const TGLRect* pickRect = 0) const
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidConfigure(Double_t zoom, Double_t dolly, Double_t* center, Double_t hRotate, Double_t vRotate)
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual Bool_tDolly(Int_t delta, Bool_t mod1, Bool_t mod2)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
voidTGLCamera::DrawDebugAids() const
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
TGLVector3TGLCamera::EyeDirection() const
TGLVertex3TGLCamera::EyePoint() const
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
TGLVertex3TGLCamera::FrustumCenter() const
Rgl::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
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tGetEnableRotate() const
Double_tTGLCamera::GetFarClip() const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
Double_tTGLCamera::GetNearClip() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Double_tTGLCamera::GetTheta() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_tGetZoom() const
Double_tGetZoomMax() const
Double_tGetZoomMin() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTGLCamera::IsCacheDirty() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tIsOrthographic() const
virtual Bool_tTGLCamera::IsPerspective() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
Bool_tTGLCamera::OfInterest(const TGLBoundingBox& box, Bool_t ignoreSize) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
TGLMatrix&TGLCamera::RefLastNoPickProjM() const
const TGLMatrix&TGLCamera::RefModelViewMatrix() const
const TGLRect&TGLCamera::RefViewport() const
virtual voidReset()
voidTObject::ResetBit(UInt_t f)
virtual Bool_tRotate(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
virtual Bool_tTGLCamera::RotateArcBall(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
virtual Bool_tTGLCamera::RotateArcBallRad(Double_t hRotate, Double_t vRotate)
virtual Bool_tTGLCamera::RotateRad(Double_t hRotate, Double_t vRotate)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidTGLCamera::SetCenterVec(Double_t x, Double_t y, Double_t z)
voidTGLCamera::SetCenterVecWarp(Double_t x, Double_t y, Double_t z)
voidSetDollyToZoom(Bool_t x)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEnableRotate(Bool_t x)
voidTGLCamera::SetExternalCenter(Bool_t x)
voidTGLCamera::SetFixDefCenter(Bool_t x)
voidTGLCamera::SetFixDefCenterVec(Double_t x, Double_t y, Double_t z)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetup(const TGLBoundingBox& box, Bool_t reset = kTRUE)
voidTGLCamera::SetVAxisMinAngle(Float_t x)
voidTGLCamera::SetViewport(const TGLRect& viewport)
voidSetZoom(Double_t x)
voidSetZoomMax(Double_t z)
voidSetZoomMin(Double_t z)
voidSetZoomMinMax(Double_t min, Double_t max)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
UInt_tTGLCamera::TimeStamp() const
virtual Bool_tTruck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
Bool_tTGLCamera::UpdateInterest(Bool_t force)
virtual voidTObject::UseCurrentStyle()
TGLVector3TGLCamera::ViewportDeltaToWorld(const TGLVertex3& worldRef, Double_t viewportXDelta, Double_t viewportYDelta, TGLMatrix* modviewMat = 0) const
Rgl::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
TGLLine3TGLCamera::ViewportToWorld(const TPoint& viewport) const
TGLVertex3TGLCamera::ViewportToWorld(const TGLVertex3& viewportVertex, TGLMatrix* modviewMat = 0) const
TGLLine3TGLCamera::ViewportToWorld(Double_t viewportX, Double_t viewportY) const
virtual voidTObject::Warning(const char* method, const char* msgfmt) 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, TGLMatrix* modviewMat = 0) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual Bool_tZoom(Int_t delta, Bool_t mod1, Bool_t mod2)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTGLCamera::UpdateCache() const

Data Members

enum EType { kZOY
enum TGLCamera::EFrustumPlane { kNear
enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
Bool_tTGLCamera::fCacheDirty! cached items dirty?
TGLMatrixTGLCamera::fCamBasetranformation to center and rotation from up to x vector
TGLMatrixTGLCamera::fCamTranstransformation relative to fCamTrans
TGLVector3*TGLCamera::fCenter! current camera center
TGLMatrixTGLCamera::fClipM! object space clip matrix (cached)
TGLVector3TGLCamera::fDefCenterdefault camera center
Double_tTGLCamera::fDollyDefaultdefault distnce from viewing centre
Double_tTGLCamera::fDollyDistanceunit distance for camera movement in fwd/bck direction
TGLVector3TGLCamera::fExtCenterexternal camera center
Bool_tTGLCamera::fExternalCenteruse external center insead of scene center
TGLVector3TGLCamera::fFDCenterfixed default camera center
Double_tTGLCamera::fFarClip! last applied far-clip
Bool_tTGLCamera::fFixDefCenteruse fixed default center
TGLPlaneTGLCamera::fFrustumPlanes[6]! frustum planes (cached)
TGLBoundingBoxTGLCamera::fInterestBox! the interest box - created in UpdateInterest()
Double_tTGLCamera::fLargestSeen! largest box diagonal seen in OfInterest() - used when
TGLMatrixTGLCamera::fLastNoPickProjM! no-pick projection matrix (cached)
TGLMatrixTGLCamera::fModVM! modelView matrix (cached)
Double_tTGLCamera::fNearClip! last applied near-clip
TGLMatrixTGLCamera::fProjM! projection matrix (cached)
UInt_tTGLCamera::fTimeStamp! timestamp
Float_tTGLCamera::fVAxisMinAngleminimal allowed angle between up and fCamTrans Z vector
TGLRectTGLCamera::fViewport! viewport (GL coords - origin bottom left)
Bool_tTGLCamera::fWasArcBalledset when arc-ball rotation is used
static UInt_tTGLCamera::fgDollyDeltaSens
Double_tfDefYSize! x, y size of scene from camera view
Bool_tfDollyToZoomzoom when dolly is requested
Bool_tfEnableRotateenable rotation
TGLOrthoCamera::ETypefTypecamera type
TGLBoundingBoxfVolume! scene volume
Double_tfZoomcurrent zoom
Double_tfZoomDefaultdefault zoom factor
Double_tfZoomMaxmaximum zoom factor
Double_tfZoomMinminimum zoom factor
static UInt_tfgZoomDeltaSens

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

 Construct kXOY orthographic camera.
TGLOrthoCamera(TGLOrthoCamera::EType type, 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.
void SetZoomMin(Double_t z)
 Set minimum zoom factor. If current zoom is less than z it is
 set to z.
void SetZoomMax(Double_t z)
 Set maximum zoom factor. If current zoom is greater than z it
 is set to z.
Bool_t Truck(Int_t xDelta, Int_t yDelta, Bool_t mod1, Bool_t mod2)
 Truck the camera - 'move camera parallel to film plane'.
 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.
   zoom    - set directly (default = 0.78);
   dolly   - additional move along the camera forward direction;
   center  - new camera center (can be 0 for no change);
   hRotate - additional "up/down" rotation in radians;
   vRotate - additional "left/right" rotation in radians.
Bool_t IsOrthographic() const
{ return kTRUE; }
void SetEnableRotate(Bool_t x)
{ fEnableRotate = x; }
Bool_t GetEnableRotate() const
{ return fEnableRotate; }
Double_t GetZoomMin() const
{ return fZoomMin; }
Double_t GetZoomMax() const
{ return fZoomMax; }
void SetZoomMinMax(Double_t min, Double_t max)
{ SetZoomMin(min); SetZoomMax(max); }
void SetDollyToZoom(Bool_t x)
{ fDollyToZoom = x; }
Bool_t GetDollyToZoom() const
{ return fDollyToZoom; }
void SetZoom(Double_t x)
{ fZoom = x; }
Double_t GetZoom() const
{ return fZoom; }