class TGLRnrCtx

 TGLRnrCtx

 The TGLRnrCtx class aggregates data for a given redering context as
 needed by various parts of the ROOT's OpenGL infractructure. It
 serves as a connecting point between the steering part of the
 infrastructure (viewer, scene) and concrete rendering classes
 (logical, physical shape). It is just a data-holder, there is no
 functionality in it.

 Development notes:

 One RnrCtx is created by each viewer and it is just an extension of
 the viewer context that changes along the render
 descend. Separating this also has some abstract benefit of hiding
 viewer implementation from those that do not need to know it.

 Current scene / scene-info part is always initialized by viewer,
 scenes can assume they're ok.

Function Members (Methods)

public:
TGLRnrCtx(TGLViewerBase* viewer)
virtual~TGLRnrCtx()
voidBeginSelection(Int_t x, Int_t y, Int_t r = 3)
static TClass*Class()
TGLClip*Clip() const
voidCloseDLCapture()
Short_tCombiLOD() const
Short_tDrawPass() const
voidEndSelection(Int_t glResult)
TGLCamera*GetCamera()
const TGLCamera*GetCamera() const
UInt_tGetEventKeySym() const
TGLContextIdentity*GetGLCtxIdentity() const
GLUquadric*GetGluQuadric()
UChar_t*GetGrabbedImage() const
Bool_tGetGrabImage() const
Int_tGetPickRadius()
TGLRect*GetPickRectangle()
TGLSceneBase*GetScene()
TGLSceneInfo*GetSceneInfo()
TGLSelectBuffer*GetSelectBuffer() const
UChar_t*GetSSLColor(Int_t level)
TGLViewerBase*GetViewer()
Bool_tHasClip() const
Bool_tHasStopwatchTimedOut()
Bool_tHighlight() const
Bool_tHighlightOutline() const
virtual TClass*IsA() const
Bool_tIsDLCaptureOpen() const
Bool_tIsDrawPassFilled() const
Bool_tIsDrawPassOutlineLine() const
Bool_tIsStopwatchRunning() const
voidOpenDLCapture()
TGLCamera&RefCamera()
const TGLCamera&RefCamera() const
TGLSceneBase&RefScene()
TGLSceneInfo&RefSceneInfo()
TGLViewerBase&RefViewer()
voidRegisterFont(Int_t size, Int_t file, Int_t mode, TGLFont& out)
voidRegisterFont(Int_t size, const Text_t* name, Int_t mode, TGLFont& out)
voidReleaseFont(TGLFont& font)
Double_tRenderTimeOut() const
TGLClip*SceneClip() const
Short_tSceneLOD() const
Short_tSceneStyle() const
Bool_tSecSelection() const
Bool_tSelection() const
voidSetCamera(TGLCamera* c)
voidSetClip(TGLClip* p)
voidSetCombiLOD(Short_t LOD)
voidSetDrawPass(Short_t dpass)
voidSetEventKeySym(UInt_t k)
voidSetGLCtxIdentity(TGLContextIdentity* cid)
voidSetGrabbedImage(UChar_t* img)
voidSetGrabImage(Bool_t gi)
voidSetHighlight(Bool_t hil)
voidSetHighlightOutline(Bool_t ho)
voidSetRenderTimeOut(Double_t tout)
voidSetSceneClip(TGLClip* p)
voidSetSceneInfo(TGLSceneInfo* si)
voidSetSceneLOD(Short_t LOD)
voidSetSceneStyle(Short_t sty)
voidSetSecSelection(Bool_t secSel)
voidSetSelection(Bool_t sel)
voidSetShapeLOD(Short_t LOD)
voidSetSSLColor(Int_t level, UChar_t* rgba)
voidSetSSLColor(Int_t level, UChar_t r, UChar_t g, UChar_t b, UChar_t a = 1)
voidSetViewerClip(TGLClip* p)
voidSetViewerLOD(Short_t LOD)
voidSetViewerStyle(Short_t sty)
Short_tShapeLOD() const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
voidStartStopwatch()
voidStopStopwatch()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
static const char*StyleName(Short_t style)
TGLClip*ViewerClip() const
Short_tViewerLOD() const
Short_tViewerStyle() const
private:
TGLRnrCtx(const TGLRnrCtx&)
TGLRnrCtx&operator=(const TGLRnrCtx&)

Data Members

public:
enum EStyle { kStyleUndef
kFill
kOutline
kWireFrame
};
enum EPass { kPassUndef
kPassFill
kPassOutlineFill
kPassOutlineLine
kPassWireFrame
};
enum ELODPresets { kLODUndef
kLODPixel
kLODLow
kLODMed
kLODHigh
};
enum EShapeSelectionLevel { kSSLNotSelected
kSSLSelected
kSSLImpliedSelected
kSSLHighlighted
kSSLImpliedHighlighted
kSSLEnd
};
protected:
TGLCamera*fCamera
TGLClip*fClip
Short_tfCombiLODCombined viewer/scene lod
Bool_tfDLCaptureOpen! DL-capture currently open
Short_tfDrawPass
UInt_tfEventKeySym
TGLContextIdentity*fGLCtxIdentity! Current GL context identity
Bool_tfGrabImageSet to true to store the image.
UChar_t*fGrabbedImageBuffer where image was stored after rendering.
Bool_tfHasTimedOut
Bool_tfHighlightTrue when in highlight.
Bool_tfHighlightOutlineTrue when in highlight-outline.
Bool_tfIsRunning
Int_tfPickRadius
TGLRect*fPickRectangle
GLUquadric*fQuadric
Double_tfRenderTimeOut
UChar_tfSSLColor[5][4]Colors for shape-selection-levels
TGLClip*fSceneClip
TGLSceneInfo*fSceneInfo
Short_tfSceneLOD
Short_tfSceneStyle
Bool_tfSecSelection
TGLSelectBuffer*fSelectBuffer
Bool_tfSelection
Short_tfShapeLOD
TGLStopwatchfStopwatch
TGLViewerBase*fViewer
TGLClip*fViewerClip
Short_tfViewerLOD
Short_tfViewerStyle

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLRnrCtx(TGLViewerBase* viewer)
 Constructor.
~TGLRnrCtx()
 Destructor.
TGLSceneBase * GetScene()
 Return current scene (based on scene-info data).
TGLSceneBase & RefScene()
 Return current scene (based on scene-info data).
Bool_t IsDrawPassFilled()
 Returns true if current render-pass uses filled polygon style.
Bool_t HasStopwatchTimedOut()
 Check if the stopwatch went beyond the render time limit.
void BeginSelection(Int_t x, Int_t y, Int_t r = 3)
 Setup context for running selection.
 x and y are in window coordinates.
void EndSelection(Int_t glResult)
 End selection.
TGLRect * GetPickRectangle()
 Return current pick rectangle. This is *zero* when
 selection is not set.
Int_t GetPickRadius()
 Return pick radius. If selection is not active it returns 0.
void SetSSLColor(Int_t level, UChar_t r, UChar_t g, UChar_t b, UChar_t a = 1)
 Set highlight color for shape-selection-level level.
void SetSSLColor(Int_t level, UChar_t* rgba)
 Set highlight color for shape-selection-level level.
void OpenDLCapture()
 Start display-list capture.
void CloseDLCapture()
 End display list capture.
void RegisterFont(Int_t size, Int_t file, Int_t mode, TGLFont& out)
 Get font in the GL rendering context.
void RegisterFont(Int_t size, const Text_t* name, Int_t mode, TGLFont& out)
 Get font in the GL rendering context.
void ReleaseFont(TGLFont& font)
 Release font in the GL rendering context.
const char* StyleName(Short_t style)
 Return string describing the style.
TGLRnrCtx(const TGLRnrCtx&)
TGLRnrCtx& operator=(const TGLRnrCtx& )
TGLViewerBase * GetViewer()
 Central objects
{ return fViewer; }
TGLViewerBase & RefViewer()
{ return *fViewer; }
TGLCamera * GetCamera()
{ return fCamera; }
TGLCamera & RefCamera()
{ return *fCamera; }
TGLSceneInfo * GetSceneInfo()
{ return fSceneInfo; }
TGLSceneInfo & RefSceneInfo()
{ return *fSceneInfo; }
const TGLCamera & RefCamera()
{ return *fCamera; }
const TGLCamera * GetCamera()
{ return fCamera; }
void SetCamera(TGLCamera* c)
 void SetViewer   (TGLViewerBase* v) { fViewer = v; }
{ fCamera = c; }
void SetSceneInfo(TGLSceneInfo* si)
{ fSceneInfo = si; }
Short_t ViewerLOD()
 Draw LOD, style, clip, rnr-pass
{ return fViewerLOD; }
void SetViewerLOD(Short_t LOD)
{ fViewerLOD = LOD; }
Short_t SceneLOD()
{ return fSceneLOD; }
void SetSceneLOD(Short_t LOD)
{ fSceneLOD = LOD; }
Short_t CombiLOD()
{ return fCombiLOD; }
void SetCombiLOD(Short_t LOD)
{ fCombiLOD = LOD; }
Short_t ShapeLOD()
{ return fShapeLOD; }
void SetShapeLOD(Short_t LOD)
{ fShapeLOD = LOD; }
Short_t ViewerStyle()
{ return fViewerStyle; }
void SetViewerStyle(Short_t sty)
{ fViewerStyle = sty; }
Short_t SceneStyle()
{ return fSceneStyle; }
void SetSceneStyle(Short_t sty)
{ fSceneStyle = sty; }
TGLClip* ViewerClip()
{ return fViewerClip; }
void SetViewerClip(TGLClip* p)
{ fViewerClip = p; }
TGLClip* SceneClip()
{ return fSceneClip; }
void SetSceneClip(TGLClip* p)
{ fSceneClip = p; }
void SetClip(TGLClip* p)
{ fClip = p; }
Bool_t HasClip()
{ return fClip != 0; }
Short_t DrawPass()
{ return fDrawPass; }
void SetDrawPass(Short_t dpass)
{ fDrawPass = dpass; }
Bool_t IsDrawPassOutlineLine()
{ return fDrawPass == kPassOutlineLine; }
Double_t RenderTimeOut()
 Render time-out
{ return fRenderTimeOut; }
void SetRenderTimeOut(Double_t tout)
{ fRenderTimeOut = tout; }
void StartStopwatch()
void StopStopwatch()
Bool_t IsStopwatchRunning()
{ return fIsRunning; }
Bool_t Highlight()
 Highlight / Selection stuff
{ return fHighlight; }
void SetHighlight(Bool_t hil)
{ fHighlight = hil; }
Bool_t HighlightOutline()
{ return fHighlightOutline; }
void SetHighlightOutline(Bool_t ho)
{ fHighlightOutline = ho; }
Bool_t Selection()
{ return fSelection; }
void SetSelection(Bool_t sel)
{ fSelection = sel; }
Bool_t SecSelection()
{ return fSecSelection; }
void SetSecSelection(Bool_t secSel)
 Low-level getters
{ fSecSelection = secSel; }
TGLSelectBuffer * GetSelectBuffer()
 Composed operations
{ return fSelectBuffer; }
UChar_t* GetSSLColor(Int_t level)
{ return fSSLColor[level]; }
UInt_t GetEventKeySym()
{ return fEventKeySym; }
void SetEventKeySym(UInt_t k)
{ fEventKeySym = k; }
Bool_t IsDLCaptureOpen()
{ return fDLCaptureOpen; }
TGLContextIdentity* GetGLCtxIdentity()
{ return fGLCtxIdentity; }
void SetGLCtxIdentity(TGLContextIdentity* cid)
{ fGLCtxIdentity = cid; }
GLUquadric* GetGluQuadric()
{ return fQuadric; }
void SetGrabImage(Bool_t gi)
 Picture grabbing
{ fGrabImage = gi; }
Bool_t GetGrabImage()
{ return fGrabImage; }
UChar_t* GetGrabbedImage()
{ return fGrabbedImage; }
void SetGrabbedImage(UChar_t* img)
{ fGrabbedImage = img; }

Author: Matevz Tadel, Feb 2007
Last change: root/gl:$Id: TGLRnrCtx.h 24444 2008-06-20 17:52:37Z matevz $
Last generated: 2008-06-25 08:41
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.