class TGLSceneBase: public TGLLockable


 Scene base-class --  provides basic interface expected by the
 TGLViewer or its sub-classes:
 * unique scene id
 * scene locking
 * overall bounding box
 * list of viewers displaying the scene (for update propagation)
 * virtual interface for draw/select/render (?)

 The standard ROOT OpenGL scene is implemented in direct sub-class

 Note that while each scene can be shared among several viewers, ALL
 of them are obliged to share the same display-list space (this can
 be achieved on GL-context creation time; Matevz believes that by
 default all GL contexts must use shared display-lists etc).

Function Members (Methods)

    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

voidAddViewer(TGLViewerBase* viewer)
const TGLBoundingBox&BoundingBox() const
virtual voidCalcBoundingBox() const
static TClass*Class()
TGLClip*Clip() const
virtual TGLSceneInfo*CreateSceneInfo(TGLViewerBase* view)
TGLLockable::ELockTGLLockable::CurrentLock() const
virtual voidFullRender(TGLRnrCtx& rnrCtx)
Bool_tGetAutoDestruct() const
virtual const char*GetName() const
UInt_tGetTimeStamp() const
virtual const char*GetTitle() const
virtual TClass*IsA() 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 voidLodifySceneInfo(TGLRnrCtx& ctx)
virtual voidPostRender(TGLRnrCtx& rnrCtx)
virtual voidPreRender(TGLRnrCtx& rnrCtx)
virtual voidRebuildSceneInfo(TGLRnrCtx& ctx)
Bool_tTGLLockable::ReleaseLock(TGLLockable::ELock lock) const
voidRemoveViewer(TGLViewerBase* viewer)
virtual voidRender(TGLRnrCtx& rnrCtx)
virtual Bool_tResolveSelectRecord(TGLSelectRecord& rec, Int_t curIdx)
voidSetAutoDestruct(Bool_t a)
voidSetClip(TGLClip* p)
voidSetLOD(Short_t lod)
virtual voidSetName(const char* name)
virtual voidSetNameTitle(const char* name, const char* title)
voidSetStyle(Short_t st)
virtual voidSetTitle(const char* title)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
Short_tStyle() const
Bool_tTGLLockable::TakeLock(TGLLockable::ELock lock) const
virtual voidUpdateSceneInfo(TGLRnrCtx& ctx)
TGLSceneBase&operator=(const TGLSceneBase&)

Data Members

enum TGLLockable::ELock { kUnlocked
TGLBoundingBoxfBoundingBoxbounding box for scene (axis aligned) - lazy update - use BoundingBox() to access
Bool_tfBoundingBoxValidbounding box valid?
TGLClip*fClipScene clipping-plane.
Bool_tfDoClipCheckPerform global clip-plane-check in UpdateSceneInfo()
Bool_tfDoFrustumCheckPerform global frustum-check in UpdateSceneInfo()
Bool_tfForceUpdateSIForce update of scene-info in PreRender().
TGLLockable::ELockTGLLockable::fLockLock state.
TStringfNameObject identifier.
UInt_tfSceneIDUnique scene id.
UInt_tfTimeStampCounter increased on every update.
TStringfTitleObject title.
list<TGLViewerBase*,allocator<TGLViewerBase*> >fViewers
static UInt_tfgSceneIDSrc

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void AddViewer(TGLViewerBase* viewer)
 Add viewer to the list.
void RemoveViewer(TGLViewerBase* viewer)
 Remove viewer from the list.
 If auto-destruct is on and the last viewer is removed the scene
 destructs itself.
void TagViewersChanged()
 Tag all viewers as changed.
const char* LockIdStr()
 Name printed on locking info messages.
TGLSceneInfo* CreateSceneInfo(TGLViewerBase* view)
 Create a scene-info instance appropriate for this scene class.
 Here we instantiate the scene-info base-class TGLSceneInfo.
void RebuildSceneInfo(TGLRnrCtx& ctx)
 Fill scene-info with very basic information that is practically
 view independent. This is called when scene content is changed
 or when camera-interest changes.
void UpdateSceneInfo(TGLRnrCtx& ctx)
 Fill scene-info with information needed for rendering, take into
 account the render-context (viewer state, camera, clipping).
 Usually called from TGLViewer before rendering a scene if some
 moderately significant part of render-context has changed.

 Here we update the basic state (clear last-LOD, mark the time,
 set global <-> scene transforamtion matrices) and potentially
 study and refine the clipping planes based on scene bounding box.
void LodifySceneInfo(TGLRnrCtx& ctx)
 Setup LOD-dependant values in scene-info.

 Nothing to be done here but to store the last LOD.
void FullRender(TGLRnrCtx& rnrCtx)
 Perform full rendering, call pre-render, render, post-render.
void PreRender(TGLRnrCtx& rnrCtx)
 Perform pre-render initialization.
 Once sub-classes need specific style/lod/clip determination
 this can be split into several sub-initializers.
void Render(TGLRnrCtx& rnrCtx)
 Call PreRender(), draw the scene, call PostRender().
 Here we only draw scene-bounding box.
void PostRender(TGLRnrCtx& rnrCtx)
 Perform post-render clean-up.
Bool_t ResolveSelectRecord(TGLSelectRecord& rec, Int_t curIdx)
 Process selection record rec.
 'curIdx' is the item position where the scene should start
 its processing.
 Return TRUE if an object has been identified or FALSE otherwise.
 The scene-info member of the record is already set by the caller.

 See implementation in sub-class TGLScene, here we just return FALSE.
TGLSceneBase& operator=(const TGLSceneBase& )
const char * GetName()
{ return fName; }
const char * GetTitle()
{ return fTitle; }
void SetName(const char* name)
{ fName = name; }
void SetTitle(const char* title)
{ fTitle = title; }
void SetNameTitle(const char* name, const char* title)
{ SetName(name); SetTitle(title); }
UInt_t GetTimeStamp()
 Getters & setters
{ return fTimeStamp; }
void IncTimeStamp()
{ ++fTimeStamp; }
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 SetClip(TGLClip* p)
{ fClip = p; }
Bool_t GetAutoDestruct()
{ return fAutoDestruct; }
void SetAutoDestruct(Bool_t a)
{ fAutoDestruct = a; }
void CalcBoundingBox()
void InvalidateBoundingBox()
{ fBoundingBoxValid = kFALSE; }

Author: Matevz Tadel, Feb 2007
Last update: root/gl:$Id: TGLSceneBase.h 21702 2008-01-14 18:55:14Z 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.