Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLScene Class Reference

TGLScene provides management and rendering of ROOT's default 3D /object representation as logical and physical shapes.

A GL scene is the container for all the viewable objects (shapes) loaded into the viewer. It consists of two main stl::maps containing the TGLLogicalShape and TGLPhysicalShape collections, and interface functions enabling viewers to manage objects in these. The physical shapes defined the placement of copies of the logical shapes - see TGLLogicalShape/TGLPhysicalShape for more information on relationship

The scene can be drawn by owning viewer, passing camera, draw style & quality (LOD), clipping etc - see Draw(). The scene can also be drawn for selection in similar fashion - see Select(). The scene keeps track of a single selected physical - which can be modified by viewers.

The scene maintains a lazy calculated bounding box for the total scene extents, axis aligned round TGLPhysicalShape shapes.

Currently a scene is owned exclusively by one viewer - however it is intended that it could easily be shared by multiple viewers - for efficiency and synchronisation reasons. Hence viewer variant objects camera, clips etc being owned by viewer and passed at draw/select

Definition at line 28 of file TGLScene.h.

Classes

struct  DrawElement_t
 
class  TSceneInfo
 

Public Types

typedef std::vector< DrawElement_t * >::iterator DrawElementPtrVec_i
 
typedef std::vector< DrawElement_t * > DrawElementPtrVec_t
 
typedef std::vector< DrawElement_t >::iterator DrawElementVec_i
 
typedef std::vector< DrawElement_tDrawElementVec_t
 
typedef std::map< TObject *, TGLLogicalShape * > LogicalShapeMap_t
 
typedef LogicalShapeMap_t::const_iterator LogicalShapeMapCIt_t
 
typedef LogicalShapeMap_t::iterator LogicalShapeMapIt_t
 
typedef LogicalShapeMap_t::value_type LogicalShapeMapValueType_t
 
typedef std::map< UInt_t, TGLPhysicalShape * > PhysicalShapeMap_t
 
typedef PhysicalShapeMap_t::const_iterator PhysicalShapeMapCIt_t
 
typedef PhysicalShapeMap_t::iterator PhysicalShapeMapIt_t
 
typedef PhysicalShapeMap_t::value_type PhysicalShapeMapValueType_t
 
typedef ShapeVec_t::iterator ShapeVec_i
 
typedef std::vector< const TGLPhysicalShape * > ShapeVec_t
 
- Public Types inherited from TGLLockable
enum  ELock { kUnlocked , kDrawLock , kSelectLock , kModifyLock }
 

Public Member Functions

 TGLScene ()
 
virtual ~TGLScene ()
 Destroy scene objects.
 
virtual void AdoptLogical (TGLLogicalShape &shape)
 Adopt dynamically created logical 'shape' - add to internal map and take responsibility for deleting.
 
virtual void AdoptPhysical (TGLPhysicalShape &shape)
 Adopt dynamically created physical 'shape' - add to internal map and take responsibility for deleting.
 
UInt_t BeginSmartRefresh ()
 Moves logicals that support smart-refresh to intermediate cache.
 
virtual Bool_t BeginUpdate ()
 Put scene in update mode, return true if lock acquired.
 
virtual void CalcBoundingBox () const
 Encapsulates all physical shapes bounding box with axes aligned box.
 
virtual TSceneInfoCreateSceneInfo (TGLViewerBase *view)
 Create a scene-info instance appropriate for this scene class.
 
virtual Bool_t DestroyLogical (TObject *logid, Bool_t mustFind=kTRUE)
 Destroy logical shape defined by unique 'ID'.
 
virtual Int_t DestroyLogicals ()
 Destroy all logical shapes in scene.
 
virtual Bool_t DestroyPhysical (UInt_t phid)
 Destroy physical shape defined by unique 'ID'.
 
virtual Int_t DestroyPhysicals ()
 Destroy physical shapes.
 
void DumpMapSizes () const
 Print sizes of logical and physical-shape maps.
 
void EndSmartRefresh ()
 Wipes logicals in refresh-cache.
 
virtual void EndUpdate (Bool_t minorChange=kTRUE, Bool_t sceneChanged=kTRUE, Bool_t updateViewers=kTRUE)
 Exit scene update mode.
 
virtual TGLLogicalShapeFindLogical (TObject *logid) const
 Find and return logical shape identified by unique logid.
 
TGLLogicalShapeFindLogicalSmartRefresh (TObject *ID) const
 Find and return logical shape identified by unique 'ID' in refresh-cache.
 
virtual TGLPhysicalShapeFindPhysical (UInt_t phid) const
 Find and return physical shape identified by unique 'ID'.
 
TGLContextIdentityGetGLCtxIdentity () const
 
virtual UInt_t GetMaxPhysicalID ()
 Returns the maximum used physical id.
 
virtual TClassIsA () const
 
virtual void LodifySceneInfo (TGLRnrCtx &rnrCtx)
 Setup LOD-dependant values in scene-info.
 
virtual void PostDraw (TGLRnrCtx &rnrCtx)
 Called after the rendering is finished.
 
virtual void PreDraw (TGLRnrCtx &rnrCtx)
 Initialize rendering.
 
virtual void RebuildSceneInfo (TGLRnrCtx &rnrCtx)
 Major change in scene, need to rebuild all-element draw-vector and sort it.
 
LogicalShapeMap_tRefLogicalShapes ()
 
virtual void RenderAllPasses (TGLRnrCtx &rnrCtx, DrawElementPtrVec_t &elVec, Bool_t check_timeout)
 Do full rendering of scene.
 
virtual void RenderElements (TGLRnrCtx &rnrCtx, DrawElementPtrVec_t &elVec, Bool_t check_timeout, const TGLPlaneSet_t *clipPlanes=nullptr)
 Render DrawElements in elementVec with given timeout.
 
virtual void RenderHighlight (TGLRnrCtx &rnrCtx, DrawElementPtrVec_t &elVec)
 
virtual void RenderOpaque (TGLRnrCtx &rnrCtx)
 Render opaque elements.
 
virtual void RenderSelOpaque (TGLRnrCtx &rnrCtx)
 Render selected opaque elements.
 
virtual void RenderSelOpaqueForHighlight (TGLRnrCtx &rnrCtx)
 Render selected opaque elements for highlight.
 
virtual void RenderSelTransp (TGLRnrCtx &rnrCtx)
 Render selected transparent elements.
 
virtual void RenderSelTranspForHighlight (TGLRnrCtx &rnrCtx)
 Render selected transparent elements for highlight.
 
virtual void RenderTransp (TGLRnrCtx &rnrCtx)
 Render transparent elements.
 
virtual Bool_t ResolveSelectRecord (TGLSelectRecord &rec, Int_t curIdx)
 Process selection record rec.
 
UInt_t SizeOfScene () const
 Return memory cost of scene.
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void UpdateLogical (TObject *logid)
 Drop display-lists for the logical (assume TGLObject/direct rendering).
 
virtual void UpdatePhysical (UInt_t phid, Double_t *trans, Color_t cidx=-1, UChar_t transp=0)
 Reposition/recolor physical shape.
 
virtual void UpdatePhysical (UInt_t phid, Double_t *trans, UChar_t *col)
 Reposition/recolor physical shape.
 
virtual void UpdatePhysioLogical (TObject *logid, Double_t *trans, Color_t cidx, UChar_t transp)
 Reposition/recolor physical for given logical (assume TGLObject and a single physical).
 
virtual void UpdatePhysioLogical (TObject *logid, Double_t *trans, UChar_t *col)
 Reposition/recolor physical for given logical (assume TGLObject and a single physical).
 
virtual void UpdateSceneInfo (TGLRnrCtx &rnrCtx)
 Fill scene-info with information needed for rendering, take into account the render-context (viewer state, camera, clipping).
 
- Public Member Functions inherited from TGLSceneBase
 TGLSceneBase ()
 
virtual ~TGLSceneBase ()
 Destructor.
 
void AddViewer (TGLViewerBase *viewer)
 Add viewer to the list.
 
const TGLBoundingBoxBoundingBox () const
 
TGLClipClip () const
 
Bool_t GetAutoDestruct () const
 
UInt_t GetMinorStamp () const
 
virtual const char * GetName () const
 
Bool_t GetSelectable () const
 
UInt_t GetTimeStamp () const
 
virtual const char * GetTitle () const
 
void IncMinorStamp ()
 
void IncTimeStamp ()
 
void InvalidateBoundingBox ()
 
virtual const char * LockIdStr () const
 Name printed on locking info messages.
 
Short_t LOD () const
 
virtual void PostRender (TGLRnrCtx &rnrCtx)
 Perform post-render clean-up.
 
virtual void PreRender (TGLRnrCtx &rnrCtx)
 Perform pre-render initialization - fill rnrCtx with values stored during PreDraw().
 
void RemoveViewer (TGLViewerBase *viewer)
 Remove viewer from the list.
 
virtual 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.
 
void SetAutoDestruct (Bool_t a)
 
void SetClip (TGLClip *p)
 
void SetLOD (Short_t lod)
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
void SetSelectable (Bool_t a)
 
void SetStyle (Short_t st)
 
virtual void SetTitle (const char *title)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
Short_t Style () const
 
void TagViewersChanged ()
 Tag all viewers as changed.
 
- Public Member Functions inherited from TGLLockable
 TGLLockable ()
 
virtual ~TGLLockable ()
 
ELock CurrentLock () const
 
Bool_t IsDrawOrSelectLock () const
 
Bool_t IsLocked () const
 
Bool_t ReleaseLock (ELock lock) const
 Release current lock, make sure it the same as the 'lock' argument.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
Bool_t TakeLock (ELock lock) const
 Lock the object in mode 'lock'.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Bool_t IsOutside (const TGLBoundingBox &box, const TGLPlaneSet_t &planes)
 Check if box is outside of all planes.
 
static void RGBAFromColorIdx (Float_t rgba[4], Color_t ci, Char_t transp=0)
 Fill rgba color from ROOT color-index ci and transparency (0->100).
 
- Static Public Member Functions inherited from TGLSceneBase
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TGLLockable
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static const char * LockName (ELock lock)
 Return name-string for given lock-type.
 
static Bool_t LockValid (ELock lock)
 Test if lock is a valid type to take/release.
 

Protected Member Functions

virtual void DestroyPhysicalInternal (PhysicalShapeMapIt_t pit)
 Virtual function to destroy a physical.
 
void ReleaseGLCtxIdentity ()
 Release all GL resources for current context identity.
 

Protected Attributes

TGLContextIdentityfGLCtxIdentity
 
Bool_t fInSmartRefresh
 
Float_t fLastLineWidthScale
 
Float_t fLastPointSizeScale
 
LogicalShapeMap_t fLogicalShapes
 
PhysicalShapeMap_t fPhysicalShapes
 
LogicalShapeMap_t fSmartRefreshCache
 
- Protected Attributes inherited from TGLSceneBase
Bool_t fAutoDestruct
 
TGLBoundingBox fBoundingBox
 
Bool_t fBoundingBoxValid
 
TGLClipfClip
 
Bool_t fDoClipCheck
 
Bool_t fDoFrustumCheck
 
Short_t fLOD
 
UInt_t fMinorStamp
 
TString fName
 
Float_t fOLLineW
 
UInt_t fSceneID
 
Bool_t fSelectable
 
Short_t fStyle
 
UInt_t fTimeStamp
 
TString fTitle
 
ViewerList_t fViewers
 
Float_t fWFLineW
 
- Protected Attributes inherited from TGLLockable
ELock fLock
 

Private Member Functions

 TGLScene (const TGLScene &)
 
TGLSceneoperator= (const TGLScene &)
 

Static Private Member Functions

static Bool_t ComparePhysicalDiagonals (const TGLPhysicalShape *shape1, const TGLPhysicalShape *shape2)
 Compare 'shape1' and 'shape2' bounding box volumes - return kTRUE if 'shape1' bigger than 'shape2'.
 
static Bool_t ComparePhysicalVolumes (const TGLPhysicalShape *shape1, const TGLPhysicalShape *shape2)
 Compare 'shape1' and 'shape2' bounding box volumes - return kTRUE if 'shape1' bigger than 'shape2'.
 

Friends

class TSceneInfo
 

Additional Inherited Members

- Protected Types inherited from TGLSceneBase
typedef std::list< TGLViewerBase * >::iterator ViewerList_i
 
typedef std::list< TGLViewerBase * > ViewerList_t
 

#include <TGLScene.h>

Inheritance diagram for TGLScene:
[legend]

Member Typedef Documentation

◆ DrawElementPtrVec_i

typedef std::vector<DrawElement_t*>::iterator TGLScene::DrawElementPtrVec_i

Definition at line 69 of file TGLScene.h.

◆ DrawElementPtrVec_t

Definition at line 68 of file TGLScene.h.

◆ DrawElementVec_i

typedef std::vector<DrawElement_t>::iterator TGLScene::DrawElementVec_i

Definition at line 66 of file TGLScene.h.

◆ DrawElementVec_t

Definition at line 65 of file TGLScene.h.

◆ LogicalShapeMap_t

Definition at line 41 of file TGLScene.h.

◆ LogicalShapeMapCIt_t

typedef LogicalShapeMap_t::const_iterator TGLScene::LogicalShapeMapCIt_t

Definition at line 44 of file TGLScene.h.

◆ LogicalShapeMapIt_t

typedef LogicalShapeMap_t::iterator TGLScene::LogicalShapeMapIt_t

Definition at line 43 of file TGLScene.h.

◆ LogicalShapeMapValueType_t

typedef LogicalShapeMap_t::value_type TGLScene::LogicalShapeMapValueType_t

Definition at line 42 of file TGLScene.h.

◆ PhysicalShapeMap_t

Definition at line 47 of file TGLScene.h.

◆ PhysicalShapeMapCIt_t

typedef PhysicalShapeMap_t::const_iterator TGLScene::PhysicalShapeMapCIt_t

Definition at line 50 of file TGLScene.h.

◆ PhysicalShapeMapIt_t

typedef PhysicalShapeMap_t::iterator TGLScene::PhysicalShapeMapIt_t

Definition at line 49 of file TGLScene.h.

◆ PhysicalShapeMapValueType_t

typedef PhysicalShapeMap_t::value_type TGLScene::PhysicalShapeMapValueType_t

Definition at line 48 of file TGLScene.h.

◆ ShapeVec_i

typedef ShapeVec_t::iterator TGLScene::ShapeVec_i

Definition at line 73 of file TGLScene.h.

◆ ShapeVec_t

typedef std::vector<const TGLPhysicalShape*> TGLScene::ShapeVec_t

Definition at line 72 of file TGLScene.h.

Constructor & Destructor Documentation

◆ TGLScene() [1/2]

TGLScene::TGLScene ( const TGLScene )
private

◆ TGLScene() [2/2]

TGLScene::TGLScene ( )

Definition at line 278 of file TGLScene.cxx.

◆ ~TGLScene()

TGLScene::~TGLScene ( )
virtual

Destroy scene objects.

Definition at line 292 of file TGLScene.cxx.

Member Function Documentation

◆ AdoptLogical()

void TGLScene::AdoptLogical ( TGLLogicalShape shape)
virtual

Adopt dynamically created logical 'shape' - add to internal map and take responsibility for deleting.

Definition at line 1018 of file TGLScene.cxx.

◆ AdoptPhysical()

void TGLScene::AdoptPhysical ( TGLPhysicalShape shape)
virtual

Adopt dynamically created physical 'shape' - add to internal map and take responsibility for deleting.

Definition at line 1129 of file TGLScene.cxx.

◆ BeginSmartRefresh()

UInt_t TGLScene::BeginSmartRefresh ( )

Moves logicals that support smart-refresh to intermediate cache.

Destroys the others and returns the number of destroyed ones.

Definition at line 1416 of file TGLScene.cxx.

◆ BeginUpdate()

Bool_t TGLScene::BeginUpdate ( )
virtual

Put scene in update mode, return true if lock acquired.

Definition at line 1245 of file TGLScene.cxx.

◆ CalcBoundingBox()

void TGLScene::CalcBoundingBox ( ) const
virtual

Encapsulates all physical shapes bounding box with axes aligned box.

Validity checked in the base-class.

Implements TGLSceneBase.

Definition at line 977 of file TGLScene.cxx.

◆ Class()

static TClass * TGLScene::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGLScene::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TGLScene::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 244 of file TGLScene.h.

◆ ComparePhysicalDiagonals()

Bool_t TGLScene::ComparePhysicalDiagonals ( const TGLPhysicalShape shape1,
const TGLPhysicalShape shape2 
)
inlinestaticprivate

Compare 'shape1' and 'shape2' bounding box volumes - return kTRUE if 'shape1' bigger than 'shape2'.

Definition at line 366 of file TGLScene.cxx.

◆ ComparePhysicalVolumes()

Bool_t TGLScene::ComparePhysicalVolumes ( const TGLPhysicalShape shape1,
const TGLPhysicalShape shape2 
)
inlinestaticprivate

Compare 'shape1' and 'shape2' bounding box volumes - return kTRUE if 'shape1' bigger than 'shape2'.

Definition at line 356 of file TGLScene.cxx.

◆ CreateSceneInfo()

TGLScene::TSceneInfo * TGLScene::CreateSceneInfo ( TGLViewerBase view)
virtual

Create a scene-info instance appropriate for this scene class.

Here we instantiate the inner class TSceneInfo that includes camera/clipping specific draw-list containers.

Reimplemented from TGLSceneBase.

Definition at line 347 of file TGLScene.cxx.

◆ DeclFileName()

static const char * TGLScene::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 244 of file TGLScene.h.

◆ DestroyLogical()

Bool_t TGLScene::DestroyLogical ( TObject logid,
Bool_t  mustFind = kTRUE 
)
virtual

Destroy logical shape defined by unique 'ID'.

Returns kTRUE if found/destroyed - kFALSE otherwise.

If mustFind is true, an error is reported if the logical is not found.

Definition at line 1036 of file TGLScene.cxx.

◆ DestroyLogicals()

Int_t TGLScene::DestroyLogicals ( )
virtual

Destroy all logical shapes in scene.

Return number of destroyed logicals.

Definition at line 1073 of file TGLScene.cxx.

◆ DestroyPhysical()

Bool_t TGLScene::DestroyPhysical ( UInt_t  phid)
virtual

Destroy physical shape defined by unique 'ID'.

Returns kTRUE if found/destroyed - kFALSE otherwise.

Definition at line 1159 of file TGLScene.cxx.

◆ DestroyPhysicalInternal()

void TGLScene::DestroyPhysicalInternal ( PhysicalShapeMapIt_t  pit)
protectedvirtual

Virtual function to destroy a physical.

Sub-classes might have special checks to perform. Caller should also invalidate the draw-list.

Definition at line 1149 of file TGLScene.cxx.

◆ DestroyPhysicals()

Int_t TGLScene::DestroyPhysicals ( )
virtual

Destroy physical shapes.

Definition at line 1183 of file TGLScene.cxx.

◆ DumpMapSizes()

void TGLScene::DumpMapSizes ( ) const

Print sizes of logical and physical-shape maps.

Definition at line 1523 of file TGLScene.cxx.

◆ EndSmartRefresh()

void TGLScene::EndSmartRefresh ( )

Wipes logicals in refresh-cache.

Definition at line 1439 of file TGLScene.cxx.

◆ EndUpdate()

void TGLScene::EndUpdate ( Bool_t  minorChange = kTRUE,
Bool_t  sceneChanged = kTRUE,
Bool_t  updateViewers = kTRUE 
)
virtual

Exit scene update mode.

If sceneChanged is true (default), the scene timestamp is increased and basic draw-lists etc will be rebuild on next draw request. If you only changed colors or some other visual parameters that do not affect object bounding-box or transformation matrix, you can set it to false.

If updateViewers is true (default), the viewers using this scene will be tagged as changed. If sceneChanged is true the updateViewers should be true as well, unless you take care of the viewers elsewhere or in some other way.

Definition at line 1265 of file TGLScene.cxx.

◆ FindLogical()

TGLLogicalShape * TGLScene::FindLogical ( TObject logid) const
virtual

Find and return logical shape identified by unique logid.

Returns 0 if not found.

Reimplemented from TGLSceneBase.

Definition at line 1107 of file TGLScene.cxx.

◆ FindLogicalSmartRefresh()

TGLLogicalShape * TGLScene::FindLogicalSmartRefresh ( TObject ID) const

Find and return logical shape identified by unique 'ID' in refresh-cache.

Returns 0 if not found.

Definition at line 1455 of file TGLScene.cxx.

◆ FindPhysical()

TGLPhysicalShape * TGLScene::FindPhysical ( UInt_t  phid) const
virtual

Find and return physical shape identified by unique 'ID'.

Returns 0 if not found.

Definition at line 1221 of file TGLScene.cxx.

◆ GetGLCtxIdentity()

TGLContextIdentity * TGLScene::GetGLCtxIdentity ( ) const
inline

Definition at line 230 of file TGLScene.h.

◆ GetMaxPhysicalID()

UInt_t TGLScene::GetMaxPhysicalID ( )
virtual

Returns the maximum used physical id.

Returns 0 if empty.

Definition at line 1231 of file TGLScene.cxx.

◆ IsA()

virtual TClass * TGLScene::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented from TGLSceneBase.

Reimplemented in TGLScenePad.

Definition at line 244 of file TGLScene.h.

◆ IsOutside()

Bool_t TGLScene::IsOutside ( const TGLBoundingBox box,
const TGLPlaneSet_t planes 
)
static

Check if box is outside of all planes.

Definition at line 1543 of file TGLScene.cxx.

◆ LodifySceneInfo()

void TGLScene::LodifySceneInfo ( TGLRnrCtx rnrCtx)
virtual

Setup LOD-dependant values in scene-info.

We have to perform LOD quantization for all draw-elements.

Reimplemented from TGLSceneBase.

Definition at line 544 of file TGLScene.cxx.

◆ operator=()

TGLScene & TGLScene::operator= ( const TGLScene )
private

◆ PostDraw()

void TGLScene::PostDraw ( TGLRnrCtx rnrCtx)
virtual

Called after the rendering is finished.

In debug mode draw statistics is dumped. Parent's PostDraw is called for GL cleanup.

Reimplemented from TGLSceneBase.

Definition at line 707 of file TGLScene.cxx.

◆ PreDraw()

void TGLScene::PreDraw ( TGLRnrCtx rnrCtx)
virtual

Initialize rendering.

Pass to base-class where most work is done. Check if GL-ctx is shared with the previous one; if not wipe display-lists of all logicals.

Reimplemented from TGLSceneBase.

Definition at line 568 of file TGLScene.cxx.

◆ RebuildSceneInfo()

void TGLScene::RebuildSceneInfo ( TGLRnrCtx rnrCtx)
virtual

Major change in scene, need to rebuild all-element draw-vector and sort it.

Sort the TGLPhysical draw list by shape bounding box diagonal, from large to small. This makes dropout of shapes with time limited Draw() calls must less noticeable. As this does not use projected size it only needs to be done after a scene content change - not every time scene drawn (potential camera/projection change).

Reimplemented from TGLSceneBase.

Definition at line 382 of file TGLScene.cxx.

◆ RefLogicalShapes()

LogicalShapeMap_t & TGLScene::RefLogicalShapes ( )
inline

Definition at line 216 of file TGLScene.h.

◆ ReleaseGLCtxIdentity()

void TGLScene::ReleaseGLCtxIdentity ( )
protected

Release all GL resources for current context identity.

Requires iteration over all logical shapes.

Definition at line 311 of file TGLScene.cxx.

◆ RenderAllPasses()

void TGLScene::RenderAllPasses ( TGLRnrCtx rnrCtx,
DrawElementPtrVec_t elVec,
Bool_t  check_timeout 
)
virtual

Do full rendering of scene.

First draw the opaques, then the transparents. For each we do the number of passes required by draw mode and clipping setup.

Definition at line 725 of file TGLScene.cxx.

◆ RenderElements()

void TGLScene::RenderElements ( TGLRnrCtx rnrCtx,
DrawElementPtrVec_t elVec,
Bool_t  check_timeout,
const TGLPlaneSet_t clipPlanes = nullptr 
)
virtual

Render DrawElements in elementVec with given timeout.

If clipPlanes is non-zero, test each element against its clipping planes.

Definition at line 893 of file TGLScene.cxx.

◆ RenderHighlight()

void TGLScene::RenderHighlight ( TGLRnrCtx rnrCtx,
DrawElementPtrVec_t elVec 
)
virtual

Definition at line 672 of file TGLScene.cxx.

◆ RenderOpaque()

void TGLScene::RenderOpaque ( TGLRnrCtx rnrCtx)
virtual

Render opaque elements.

Reimplemented from TGLSceneBase.

Definition at line 613 of file TGLScene.cxx.

◆ RenderSelOpaque()

void TGLScene::RenderSelOpaque ( TGLRnrCtx rnrCtx)
virtual

Render selected opaque elements.

Reimplemented from TGLSceneBase.

Definition at line 633 of file TGLScene.cxx.

◆ RenderSelOpaqueForHighlight()

void TGLScene::RenderSelOpaqueForHighlight ( TGLRnrCtx rnrCtx)
virtual

Render selected opaque elements for highlight.

Reimplemented from TGLSceneBase.

Definition at line 653 of file TGLScene.cxx.

◆ RenderSelTransp()

void TGLScene::RenderSelTransp ( TGLRnrCtx rnrCtx)
virtual

Render selected transparent elements.

Reimplemented from TGLSceneBase.

Definition at line 643 of file TGLScene.cxx.

◆ RenderSelTranspForHighlight()

void TGLScene::RenderSelTranspForHighlight ( TGLRnrCtx rnrCtx)
virtual

Render selected transparent elements for highlight.

Reimplemented from TGLSceneBase.

Definition at line 663 of file TGLScene.cxx.

◆ RenderTransp()

void TGLScene::RenderTransp ( TGLRnrCtx rnrCtx)
virtual

Render transparent elements.

Reimplemented from TGLSceneBase.

Definition at line 623 of file TGLScene.cxx.

◆ ResolveSelectRecord()

Bool_t TGLScene::ResolveSelectRecord ( TGLSelectRecord rec,
Int_t  curIdx 
)
virtual

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.

Reimplemented from TGLSceneBase.

Definition at line 950 of file TGLScene.cxx.

◆ RGBAFromColorIdx()

void TGLScene::RGBAFromColorIdx ( Float_t  rgba[4],
Color_t  ci,
Char_t  transp = 0 
)
static

Fill rgba color from ROOT color-index ci and transparency (0->100).

Definition at line 1532 of file TGLScene.cxx.

◆ SizeOfScene()

UInt_t TGLScene::SizeOfScene ( ) const

Return memory cost of scene.

Warning: NOT CORRECT at present - doesn't correctly calculate size. of logical shapes with dynamic internal contents.

Definition at line 1491 of file TGLScene.cxx.

◆ Streamer()

virtual void TGLScene::Streamer ( TBuffer )
virtual

Reimplemented from TGLSceneBase.

Reimplemented in TGLScenePad.

◆ StreamerNVirtual()

void TGLScene::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 244 of file TGLScene.h.

◆ UpdateLogical()

void TGLScene::UpdateLogical ( TObject logid)
virtual

Drop display-lists for the logical (assume TGLObject/direct rendering).

Re-calculate the bounding box (also for all physicals).

Definition at line 1283 of file TGLScene.cxx.

◆ UpdatePhysical() [1/2]

void TGLScene::UpdatePhysical ( UInt_t  phid,
Double_t trans,
Color_t  cidx = -1,
UChar_t  transp = 0 
)
virtual

Reposition/recolor physical shape.

Definition at line 1325 of file TGLScene.cxx.

◆ UpdatePhysical() [2/2]

void TGLScene::UpdatePhysical ( UInt_t  phid,
Double_t trans,
UChar_t col 
)
virtual

Reposition/recolor physical shape.

Definition at line 1304 of file TGLScene.cxx.

◆ UpdatePhysioLogical() [1/2]

void TGLScene::UpdatePhysioLogical ( TObject logid,
Double_t trans,
Color_t  cidx,
UChar_t  transp 
)
virtual

Reposition/recolor physical for given logical (assume TGLObject and a single physical).

Definition at line 1379 of file TGLScene.cxx.

◆ UpdatePhysioLogical() [2/2]

void TGLScene::UpdatePhysioLogical ( TObject logid,
Double_t trans,
UChar_t col 
)
virtual

Reposition/recolor physical for given logical (assume TGLObject and a single physical).

Definition at line 1352 of file TGLScene.cxx.

◆ UpdateSceneInfo()

void TGLScene::UpdateSceneInfo ( TGLRnrCtx rnrCtx)
virtual

Fill scene-info with information needed for rendering, take into account the render-context (viewer state, camera, clipping).

Here we have to iterate over all the physical shapes and select the visible ones. While at it, opaque and transparent shapes are divided into two groups.

Reimplemented from TGLSceneBase.

Definition at line 426 of file TGLScene.cxx.

Friends And Related Symbol Documentation

◆ TSceneInfo

friend class TSceneInfo
friend

Definition at line 121 of file TGLScene.h.

Member Data Documentation

◆ fGLCtxIdentity

TGLContextIdentity* TGLScene::fGLCtxIdentity
protected

Definition at line 131 of file TGLScene.h.

◆ fInSmartRefresh

Bool_t TGLScene::fInSmartRefresh
protected

Definition at line 135 of file TGLScene.h.

◆ fLastLineWidthScale

Float_t TGLScene::fLastLineWidthScale
protected

Definition at line 140 of file TGLScene.h.

◆ fLastPointSizeScale

Float_t TGLScene::fLastPointSizeScale
protected

Definition at line 139 of file TGLScene.h.

◆ fLogicalShapes

LogicalShapeMap_t TGLScene::fLogicalShapes
protected

Definition at line 125 of file TGLScene.h.

◆ fPhysicalShapes

PhysicalShapeMap_t TGLScene::fPhysicalShapes
protected

Definition at line 126 of file TGLScene.h.

◆ fSmartRefreshCache

LogicalShapeMap_t TGLScene::fSmartRefreshCache
mutableprotected

Definition at line 136 of file TGLScene.h.

Libraries for TGLScene:

The documentation for this class was generated from the following files: