+
class TGLSceneBase
-
library: libRGL
#include "TGLSceneBase.h"
Display options:
Show inherited
Show non-public

class TGLSceneBase: public TGLLockable

 TGLSceneBase

 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
 TGLScene.

 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.

public:
virtual~TGLSceneBase()
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)
virtual const char*GetName() const
UInt_tGetTimeStamp() const
virtual const char*GetTitle() const
voidIncTimeStamp()
voidInvalidateBoundingBox()
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)
Bool_tTGLLockable::ReleaseLock(TGLLockable::ELock lock) const
virtual voidRender(TGLRnrCtx& rnrCtx)
virtual Bool_tResolveSelectRecord(TGLSelectRecord& rec, Int_t curIdx)
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)
private:
TGLSceneBase&operator=(const TGLSceneBase&)

Data Members

public:
enum TGLLockable::ELock { kUnlocked
kDrawLock
kSelectLock
kModifyLock
};
protected:
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()
Short_tfLODScene-lod.
TGLLockable::ELockTGLLockable::fLockLock state.
TStringfNameObject identifier.
UInt_tfSceneIDUnique scene id.
Short_tfStyleScene-style.
UInt_tfTimeStampCounter increased on every update.
TStringfTitleObject title.
list<TGLViewerBase*>fViewers
private:
static UInt_tfgSceneIDSrc

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

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 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
 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& )
virtual ~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; }
void CalcBoundingBox()
 BoundingBox
void InvalidateBoundingBox()
{ fBoundingBoxValid = kFALSE; }

Author: Matevz Tadel, Feb 2007
Last update: root/gl:$Name: $:$Id: TGLSceneBase.cxx,v 1.1 2007/06/11 19:56:34 brun Exp $
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.