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).
TGLSceneBase& | operator=(const TGLSceneBase&) |
enum TGLLockable::ELock { | kUnlocked | |
kDrawLock | ||
kSelectLock | ||
kModifyLock | ||
}; |
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. |
TString | fName | Object identifier. |
UInt_t | fSceneID | Unique scene id. |
Short_t | fStyle | Scene-style. |
UInt_t | fTimeStamp | Counter increased on every update. |
TString | fTitle | Object title. |
list<TGLViewerBase*> | fViewers |
static UInt_t | fgSceneIDSrc |
Create a scene-info instance appropriate for this scene class. Here we instantiate the scene-info base-class TGLSceneInfo.
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.
Perform pre-render initialization. Once sub-classes need specific style/lod/clip determination this can be split into several sub-initializers.
Call PreRender(), draw the scene, call PostRender(). Here we only draw scene-bounding box.
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.