class TGLViewerBase: public TGLLockable


 Base class for GL viewers. Provides a basic scene management and a
 small set of control variables (camera, LOD, style, clip) that are
 used by the scene classes. Renering wrappers are available but

 There is no concept of GL-context here ... we just draw
 into whatever is set from outside.

 Development notes:

 Each viewer automatically creates a TGLRnrCtx and passes it down
 all render functions.

Function Members (Methods)

voidAddOverlayElement(TGLOverlayElement* el)
TGLSceneInfo*AddScene(TGLSceneBase* scene)
virtual voidChanged()
static TClass*Class()
TGLClip*Clip() const
TGLLockable::ELockTGLLockable::CurrentLock() const
Bool_tFindClosestOpaqueRecord(TGLSelectRecord& rec, Int_t& recIdx)
Bool_tFindClosestOverlayRecord(TGLOvlSelectRecord& rec, Int_t& recIdx)
Bool_tFindClosestRecord(TGLSelectRecord& rec, Int_t& recIdx)
TGLSceneInfo*GetSceneInfo(TGLSceneBase* scene)
virtual TClass*IsA() const
virtual Bool_tIsChanged() const
Bool_tTGLLockable::IsDrawOrSelectLock() const
Bool_tTGLLockable::IsLocked() const
virtual const char*LockIdStr() const
static const char*TGLLockable::LockName(TGLLockable::ELock lock)
static Bool_tTGLLockable::LockValid(TGLLockable::ELock lock)
Short_tLOD() const
virtual voidMergeSceneBBoxes(TGLBoundingBox& bbox)
virtual voidPostRender()
virtual voidPostRenderOverlaySelection()
virtual voidPreRender()
virtual voidPreRenderOverlaySelection()
Bool_tTGLLockable::ReleaseLock(TGLLockable::ELock lock) const
voidRemoveOverlayElement(TGLOverlayElement* el)
voidRemoveScene(TGLSceneBase* scene)
virtual voidRender()
virtual voidRenderOverlay()
virtual voidResetSceneInfos()
Bool_tResolveSelectRecord(TGLSelectRecord& rec, Int_t recIdx)
voidSceneDestructing(TGLSceneBase* scene)
voidSetClip(TGLClip* p)
voidSetLOD(Short_t lod)
voidSetStyle(Short_t st)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
Short_tStyle() const
Bool_tTGLLockable::TakeLock(TGLLockable::ELock lock) const
TGLViewerBase::SceneInfoList_iFindScene(TGLSceneBase* scene)
TGLViewerBase(const TGLViewerBase&)
TGLViewerBase&operator=(const TGLViewerBase&)

Data Members

enum TGLLockable::ELock { kUnlocked
TGLCamera*fCameraCamera for rendering.
Bool_tfChangedChange requiring redraw is pending.
TGLClip*fClipViewer clipping-plane.
Short_tfLODViewer-lod for rendering.
TGLLockable::ELockTGLLockable::fLockLock state.
TGLBoundingBoxfOverallBoundingBoxAxis-aligned union of scene bboxes.
vector<TGLOverlayElement*,allocator<TGLOverlayElement*> >fOverlay
Bool_tfResetSceneInfosOnRenderRequest rebuild of view-specific scene data.
list<TGLSceneInfo*,allocator<TGLSceneInfo*> >fScenesRegistered scenes.
Short_tfStyleViewer-style for rendering.
vector<TGLSceneInfo*,allocator<TGLSceneInfo*> >fVisScenesVisible scenes.

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLViewerBase(const TGLViewerBase& )
const char* LockIdStr()
 Name to print in locking output.
FindScene(TGLSceneBase* scene)
 Find scene-info corresponding to scene.
TGLSceneInfo* AddScene(TGLSceneBase* scene)
 Add new scene, appropriate scene-info is created.
void RemoveScene(TGLSceneBase* scene)
 Remove scene from the viewer, its scene-info is deleted.
void RemoveAllScenes()
 Remove all scenes from the viewer, their scene-infos are deleted.
void SceneDestructing(TGLSceneBase* scene)
 Remove scene, its scene-info is deleted.
 Called from scene that is being destroyed while still holding
 viewer references.
TGLSceneInfo* GetSceneInfo(TGLSceneBase* scene)
 Find scene-info corresponding to scene.
void AddOverlayElement(TGLOverlayElement* el)
 Add overlay element.
void RemoveOverlayElement(TGLOverlayElement* el)
 Remove overlay element.
void ResetSceneInfos()
 Force rebuild of view-dependent scene-info structures.

 This should be called before calling render (draw/select) if
 something that affects camera interest has been changed.
void MergeSceneBBoxes(TGLBoundingBox& bbox)
 Merge bounding-boxes of all active registered scenes.
void PreRender()
 Initialize render-context, setup camera, GL, render-area.
 Check and lock scenes, determine their visibility.
void Render()
 Go through a list of scenes and render them in order.
void RenderOverlay()
 Render overlay objects.
void PostRender()
 Function called after rendering is finished.
 Here we just unlock the scenes.
void PreRenderOverlaySelection()
 Perform minimal initialization for overlay selection.
 Here we assume that scene has already been drawn and that
 camera and overall bounding box are ok.
 Scenes are not locked.
void PostRenderOverlaySelection()
 Perform cleanup after overlay selection.
Bool_t ResolveSelectRecord(TGLSelectRecord& rec, Int_t recIdx)
 Process selection record on buffer-position 'recIdx' and
 fill the data into 'rec'.

 Returns TRUE if scene was demangled and an object identified.
 When FALSE is returned it is still possible that scene has been
 identified. Check for this if interested in scene-selection.

 The select-buffer is taken form fRnrCtx.
Bool_t FindClosestRecord(TGLSelectRecord& rec, Int_t& recIdx)
 Find next select record that can be resolved, starting from
 position 'recIdx'.
 'recIdx' is passed as reference and points to found record in the buffer.
Bool_t FindClosestOpaqueRecord(TGLSelectRecord& rec, Int_t& recIdx)
 Find next select record that can be resolved and whose result is
 not transparent, starting from position 'recIdx'.
 'recIdx' is passed as reference and points to found record in the buffer.
Bool_t FindClosestOverlayRecord(TGLOvlSelectRecord& rec, Int_t& recIdx)
 Find next overlay-select record that can be resolved, starting from
 position 'recIdx'.
 'recIdx' is passed as reference and points to found record in the buffer.
TGLViewerBase(const TGLViewerBase& )
TGLViewerBase& operator=(const TGLViewerBase& )
void SetClip(TGLClip* p)
{ fClip = p; }
Short_t LOD()
{ return fLOD; }
void SetLOD(Short_t lod)
{ fLOD = lod; }
Short_t Style()
{ return fStyle; }
void SetStyle(Short_t st)
{ fStyle = st; }
void Changed()
{ fChanged = kTRUE; }
Bool_t IsChanged()
{ return fChanged; }

Author: Matevz Tadel, Feb 2007
Last update: root/gl:$Id: TGLViewerBase.h 20882 2007-11-19 11:31:26Z rdm $
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.