TGLViewerBase Base class for GL viewers. Provides a basic scene management and a small set of control variables (camera, LOD, style, clip) that are used by the scene classes. Renering wrappers are available but minimal. There is no concept of GL-context here ... we just draw into whatever is set from outside. Development notes: Each viewer automatically creates a TGLRnrCtx and passes it down all render functions.
TGLViewerBase::SceneInfoList_i | FindScene(TGLSceneBase* scene) |
TGLViewerBase(const TGLViewerBase&) | |
TGLViewerBase& | operator=(const TGLViewerBase&) |
enum TGLLockable::ELock { | kUnlocked | |
kDrawLock | ||
kSelectLock | ||
kModifyLock | ||
}; |
TGLCamera* | fCamera | Camera for rendering. |
TGLClip* | fClip | Viewer clipping-plane. |
Short_t | fLOD | Viewer-lod for rendering. |
TGLLockable::ELock | TGLLockable::fLock | Lock state. |
TGLBoundingBox | fOverallBoundingBox | Axis-aligned union of scene bboxes. |
vector<TGLOverlayElement*,allocator<TGLOverlayElement*> > | fOverlay | |
Bool_t | fResetSceneInfosOnRender | Request rebuild of view-specific scene data. |
TGLRnrCtx* | fRnrCtx | |
list<TGLSceneInfo*,allocator<TGLSceneInfo*> > | fScenes | Registered scenes. |
Short_t | fStyle | Viewer-style for rendering. |
vector<TGLSceneInfo*,allocator<TGLSceneInfo*> > | fVisScenes | Visible scenes. |
Force rebuild of view-dependent scene-info structures. This should be called before calling render (draw/select) if something that affects rendering has been changed. We now use timestamps for clip / camera, so this should rarely be needed.
Initialize render-context, setup camera, GL, render-area. Check and lock scenes, determine their visibility.
Perform minimal initialization for overlay selection. Here we assume that scene has already been drawn and that camera and overall bounding box are ok. Scenes are not locked.
Process selection record on buffer-position 'recIdx' and fill the data into 'rec'. Returns TRUE if scene was demangled and an object identified. When FALSE is returned it is still possible that scene has been identified. Check for this if interested in scene-selection. The select-buffer is taken form fRnrCtx.
Find next select record that can be resolved, starting from position 'recIdx'. 'recIdx' is passed as reference and points to found record in the buffer.
Find next select record that can be resolved and whose result is not transparent, starting from position 'recIdx'. 'recIdx' is passed as reference and points to found record in the buffer.
Find next overlay-select record that can be resolved, starting from position 'recIdx'. 'recIdx' is passed as reference and points to found record in the buffer.