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()
UInt_tGetEventKeySym() const
TGLContextIdentity*GetGLCtxIdentity() const
GLUquadric*GetGluQuadric()
Int_tGetPickRadius()
TGLRect*GetPickRectangle()
TGLSceneBase*GetScene()
TGLSceneInfo*GetSceneInfo()
TGLSelectBuffer*GetSelectBuffer() const
TGLViewerBase*GetViewer()
Bool_tHasClip() const
virtual TClass*IsA() const
Bool_tIsDLCaptureOpen() const
Bool_tIsDrawPassFilled() const
voidOpenDLCapture()
TGLCamera&RefCamera()
TGLSceneBase&RefScene()
TGLSceneInfo&RefSceneInfo()
TGLViewerBase&RefViewer()
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)
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)
voidSetViewerClip(TGLClip* p)
voidSetViewerLOD(Short_t LOD)
voidSetViewerStyle(Short_t sty)
Short_tShapeLOD() const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
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
};
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
Int_tfPickRadius
TGLRect*fPickRectangle
GLUquadric*fQuadric
Double_tfRenderTimeout
TGLClip*fSceneClip
TGLSceneInfo*fSceneInfo
Short_tfSceneLOD
Short_tfSceneStyle
Bool_tfSecSelection
TGLSelectBuffer*fSelectBuffer
Bool_tfSelection
Short_tfShapeLOD
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).
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.
Bool_t IsDrawPassFilled()
 Returns true if current render-pass uses filled polygon style.
void OpenDLCapture()
 Start display-list capture.
void CloseDLCapture()
 End display list capture.
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; }
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; }
Double_t RenderTimeout()
 Render time-out
{ return fRenderTimeout; }
void SetRenderTimeout(Double_t tout)
{ fRenderTimeout = tout; }
Bool_t Selection()
 Selection stuff
{ 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; }
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; }

Author: Matevz Tadel, Feb 2007
Last update: root/gl:$Id: TGLRnrCtx.h 21653 2008-01-11 20:23:15Z 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.