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).
TGLSceneBase& | operator=(const TGLSceneBase&) |
TGLSceneBase(const TGLSceneBase&) |
static TGLLockable::ELock | TGLLockable::kDrawLock | |
static TGLLockable::ELock | TGLLockable::kModifyLock | |
static TGLLockable::ELock | TGLLockable::kSelectLock | |
static TGLLockable::ELock | TGLLockable::kUnlocked |
Bool_t | fAutoDestruct | |
TGLBoundingBox | fBoundingBox | bounding box for scene (axis aligned) - lazy update - use BoundingBox() to access |
Bool_t | fBoundingBoxValid | bounding box valid? |
TGLClip* | fClip | Scene clipping-plane. |
Bool_t | fDoClipCheck | Perform global clip-plane-check in UpdateSceneInfo() |
Bool_t | fDoFrustumCheck | Perform global frustum-check in UpdateSceneInfo() |
Short_t | fLOD | Scene-lod. |
TGLLockable::ELock | TGLLockable::fLock | Lock state. |
UInt_t | fMinorStamp | Counter increased on minimal update. |
TString | fName | Object identifier. |
Float_t | fOLLineW | Scene outline line-width. |
UInt_t | fSceneID | Unique scene id. |
Bool_t | fSelectable | Objects in the scene are selectable. |
Short_t | fStyle | Scene-style. |
UInt_t | fTimeStamp | Counter increased on every update. |
TString | fTitle | Object title. |
TGLSceneBase::ViewerList_t | fViewers | |
Float_t | fWFLineW | Scene wire-frame line-width. |
static UInt_t | fgSceneIDSrc |
Remove viewer from the list. If auto-destruct is on and the last viewer is removed the scene destructs itself.
Create a scene-info instance appropriate for this scene class. Here we instantiate the scene-info base-class TGLSceneInfo.
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.
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.
Perform pre-render initialization - fill rnrCtx with values stored during PreDraw(). This is called each time before RenderXyzz().
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 rendered. This is never called from ROOT GL directly. Use it if you know you are rendering a single scene.
Finalize drawing. This is called at the end of the GL-viewer draw cycle.
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.