ROOT » GRAF3D » GL » TGLSceneBase

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 TGLLogicalShape*FindLogical(TObject*) const
Bool_tGetAutoDestruct() const
UInt_tGetMinorStamp() const
virtual const char*GetName() const
Bool_tGetSelectable() 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 voidPostDraw(TGLRnrCtx& rnrCtx)
virtual voidPostRender(TGLRnrCtx& rnrCtx)
virtual voidPreDraw(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 voidRenderOpaque(TGLRnrCtx& rnrCtx)
virtual voidRenderSelOpaque(TGLRnrCtx& rnrCtx)
virtual voidRenderSelOpaqueForHighlight(TGLRnrCtx& rnrCtx)
virtual voidRenderSelTransp(TGLRnrCtx& rnrCtx)
virtual voidRenderSelTranspForHighlight(TGLRnrCtx& rnrCtx)
virtual voidRenderTransp(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)
voidSetSelectable(Bool_t a)
voidSetStyle(Short_t st)
virtual voidSetTitle(const char* title)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
Short_tStyle() const
Bool_tTGLLockable::TakeLock(TGLLockable::ELock lock) const
virtual voidUpdateSceneInfo(TGLRnrCtx& ctx)

Data Members

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()
TGLLockable::ELockTGLLockable::fLockLock state.
UInt_tfMinorStampCounter increased on minimal update.
TStringfNameObject identifier.
Float_tfOLLineWScene outline line-width.
UInt_tfSceneIDUnique scene id.
Bool_tfSelectableObjects in the scene are selectable.
UInt_tfTimeStampCounter increased on every update.
TStringfTitleObject title.
Float_tfWFLineWScene wire-frame line-width.
static UInt_tfgSceneIDSrc

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

 Default constructor.
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() const
 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 PreDraw(TGLRnrCtx& rnrCtx)
 Perform basic pre-render initialization:
  - calculate LOD, Style, Clipping,
  - build draw lists.

 This is called in the beginning of the GL-viewer draw cycle.
void PreRender(TGLRnrCtx& rnrCtx)
 Perform pre-render initialization - fill rnrCtx with
 values stored during PreDraw().

 This is called each time before RenderXyzz().
void Render(TGLRnrCtx& rnrCtx)
 This function does rendering of all stages, the shapes are
 rendered in the following order: opaque, transparent,
 selected-opaque, selected-transparent.

 GL-depth buffer is cleared after transparent shapes have been

 This is never called from ROOT GL directly. Use it if you know
 you are rendering a single scene.
void RenderOpaque(TGLRnrCtx& rnrCtx)
 Render opaque elements.
void RenderTransp(TGLRnrCtx& rnrCtx)
 Render transparent elements.
void RenderSelOpaque(TGLRnrCtx& rnrCtx)
 Render selected opaque elements.
void RenderSelTransp(TGLRnrCtx& rnrCtx)
 Render selected transparent elements for highlight.
void RenderSelOpaqueForHighlight(TGLRnrCtx& rnrCtx)
 Render selected opaque elements for highlight.
void RenderSelTranspForHighlight(TGLRnrCtx& rnrCtx)
 Render selected transparent elements.
void PostRender(TGLRnrCtx& rnrCtx)
 Perform post-render clean-up.
void PostDraw(TGLRnrCtx& rnrCtx)
 Finalize drawing.

 This is called at the end of the GL-viewer draw cycle.
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(const TGLSceneBase& )
TGLSceneBase& operator=(const TGLSceneBase& )
const char * GetName() const
{ return fName; }
const char * GetTitle() const
{ 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); }
TGLLogicalShape* FindLogical(TObject* ) const
{ return 0; }
UInt_t GetTimeStamp() const
 Getters & setters
{ return fTimeStamp; }
void IncTimeStamp()
UInt_t GetMinorStamp() const
{ return fMinorStamp; }
void IncMinorStamp()
Short_t LOD() const
{ return fLOD; }
void SetLOD(Short_t lod)
{ fLOD = lod; }
Short_t Style() const
{ return fStyle; }
void SetStyle(Short_t st)
{ fStyle = st; }
void SetClip(TGLClip* p)
{ fClip = p; }
Bool_t GetSelectable() const
{ return fSelectable; }
void SetSelectable(Bool_t a)
{ fSelectable = a; }
Bool_t GetAutoDestruct() const
{ return fAutoDestruct; }
void SetAutoDestruct(Bool_t a)
{ fAutoDestruct = a; }
void CalcBoundingBox() const
void InvalidateBoundingBox()