12 #ifndef ROOT_TGLScene_H 13 #define ROOT_TGLScene_H 64 fPhysical(pshp), fPixelSize(0), fPixelLOD(0), fFinalLOD(0) {}
86 void ClearDrawElementVec(DrawElementVec_t& vec,
Int_t maxSize);
87 void ClearDrawElementPtrVec(DrawElementPtrVec_t& vec,
Int_t maxSize);
103 void ClearAfterRebuild();
104 void ClearAfterUpdate();
119 void ResetDrawStats();
121 void DumpDrawStats();
171 DrawElementPtrVec_t& elVec);
177 DrawElementPtrVec_t& elVec,
182 DrawElementPtrVec_t& elVec,
DrawElementPtrVec_t fTranspElements
ShapeVec_t::iterator ShapeVec_i
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
std::vector< DrawElement_t > DrawElementVec_t
static Bool_t ComparePhysicalVolumes(const TGLPhysicalShape *shape1, const TGLPhysicalShape *shape2)
Compare 'shape1' and 'shape2' bounding box volumes - return kTRUE if 'shape1' bigger than 'shape2'...
virtual void EndUpdate(Bool_t minorChange=kTRUE, Bool_t sceneChanged=kTRUE, Bool_t updateViewers=kTRUE)
Exit scene update mode.
virtual void UpdatePhysioLogical(TObject *logid, Double_t *trans, UChar_t *col)
Reposition/recolor physical for given logical (assume TGLObject and a single physical).
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
std::map< TObject *, TGLLogicalShape * > LogicalShapeMap_t
TGLLogicalShape * FindLogicalSmartRefresh(TObject *ID) const
Find and return logical shape identified by unique 'ID' in refresh-cache.
virtual ~TGLScene()
Destroy scene objects.
LogicalShapeMap_t::iterator LogicalShapeMapIt_t
PhysicalShapeMap_t::value_type PhysicalShapeMapValueType_t
virtual void RenderTransp(TGLRnrCtx &rnrCtx)
Render transparent elements.
static Bool_t ComparePhysicalDiagonals(const TGLPhysicalShape *shape1, const TGLPhysicalShape *shape2)
Compare 'shape1' and 'shape2' bounding box volumes - return kTRUE if 'shape1' bigger than 'shape2'...
Identifier of a shared GL-context.
virtual void RenderSelOpaqueForHighlight(TGLRnrCtx &rnrCtx)
Render selected opaque elements for highlight.
Scene base-class – provides basic interface expected by the TGLViewer or its sub-classes: ...
virtual void UpdateLogical(TObject *logid)
Drop display-lists for the logical (assume TGLObject/direct rendering).
virtual void RenderOpaque(TGLRnrCtx &rnrCtx)
Render opaque elements.
PhysicalShapeMap_t::const_iterator PhysicalShapeMapCIt_t
LogicalShapeMap_t fSmartRefreshCache
LogicalShapeMap_t::value_type LogicalShapeMapValueType_t
virtual UInt_t GetMaxPhysicalID()
Returns the maximum used physical id.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual Bool_t ResolveSelectRecord(TGLSelectRecord &rec, Int_t curIdx)
Process selection record rec.
LogicalShapeMap_t fLogicalShapes
Base class for GL viewers.
Concrete physical shape - a GL drawable.
PhysicalShapeMap_t::iterator PhysicalShapeMapIt_t
virtual void RenderSelTranspForHighlight(TGLRnrCtx &rnrCtx)
Render selected transparent elements for highlight.
virtual TSceneInfo * CreateSceneInfo(TGLViewerBase *view)
Create a scene-info instance appropriate for this scene class.
virtual TGLLogicalShape * FindLogical(TObject *logid) const
Find and return logical shape identified by unique logid.
virtual void AdoptPhysical(TGLPhysicalShape &shape)
Adopt dynamically created physical 'shape' - add to internal map and take responsibility for deleting...
#define ClassDef(name, id)
virtual void CalcBoundingBox() const
Encapsulates all physical shapes bounding box with axes aligned box.
virtual void UpdatePhysical(UInt_t phid, Double_t *trans, UChar_t *col)
Reposition/recolor physical shape.
UInt_t BeginSmartRefresh()
Moves logicals that support smart-refresh to intermediate cache.
std::map< UInt_t, TGLPhysicalShape * > PhysicalShapeMap_t
void DumpMapSizes() const
Print sizes of logical and physical-shape maps.
Base-class for direct OpenGL renderers.
std::map< TClass *, UInt_t > fByShapeCnt
Float_t fLastLineWidthScale
LogicalShapeMap_t & RefLogicalShapes()
PhysicalShapeMap_t fPhysicalShapes
TGLContextIdentity * fGLCtxIdentity
virtual Bool_t DestroyLogical(TObject *logid, Bool_t mustFind=kTRUE)
Destroy logical shape defined by unique 'ID'.
DrawElementPtrVec_t fSelTranspElements
virtual TGLPhysicalShape * FindPhysical(UInt_t phid) const
Find and return physical shape identified by unique 'ID'.
Standard selection record including information about containing scene and details ob out selected ob...
virtual Bool_t DestroyPhysical(UInt_t phid)
Destroy physical shape defined by unique 'ID'.
std::vector< DrawElement_t * > DrawElementPtrVec_t
TGLContextIdentity * GetGLCtxIdentity() const
const TGLPhysicalShape * fPhysical
virtual void RenderHighlight(TGLRnrCtx &rnrCtx, DrawElementPtrVec_t &elVec)
Abstract logical shape - a GL 'drawable' - base for all shapes - faceset sphere etc.
void EndSmartRefresh()
Wipes logicals in refresh-cache.
Float_t fLastPointSizeScale
std::vector< TGLPlane > TGLPlaneSet_t
virtual Int_t DestroyPhysicals()
Destroy physical shapes.
virtual void RenderElements(TGLRnrCtx &rnrCtx, DrawElementPtrVec_t &elVec, Bool_t check_timeout, const TGLPlaneSet_t *clipPlanes=0)
Render DrawElements in elementVec with given timeout.
UInt_t SizeOfScene() const
Return memory cost of scene.
virtual void DestroyPhysicalInternal(PhysicalShapeMapIt_t pit)
Virtual function to destroy a physical.
std::vector< const TGLPhysicalShape * > ShapeVec_t
DrawElement_t(const TGLPhysicalShape *pshp=0)
virtual void RenderSelOpaque(TGLRnrCtx &rnrCtx)
Render selected opaque elements.
virtual void PostDraw(TGLRnrCtx &rnrCtx)
Called after the rendering is finished.
TGLScene & operator=(const TGLScene &)
virtual void RenderSelTransp(TGLRnrCtx &rnrCtx)
Render selected transparent elements.
Mother of all ROOT objects.
virtual void RebuildSceneInfo(TGLRnrCtx &rnrCtx)
Major change in scene, need to rebuild all-element draw-vector and sort it.
Concrete class describing an orientated (free) or axis aligned box of 8 vertices. ...
void ReleaseGLCtxIdentity()
Release all GL resources for current context identity.
static Bool_t IsOutside(const TGLBoundingBox &box, const TGLPlaneSet_t &planes)
Check if box is outside of all planes.
DrawElementPtrVec_t fOpaqueElements
TGLScene provides management and rendering of ROOT's default 3D /object representation as logical and...
virtual void RenderAllPasses(TGLRnrCtx &rnrCtx, DrawElementPtrVec_t &elVec, Bool_t check_timeout)
Do full rendering of scene.
DrawElementPtrVec_t fSelOpaqueElements
Base class for extended scene context.
virtual void UpdateSceneInfo(TGLRnrCtx &rnrCtx)
Fill scene-info with information needed for rendering, take into account the render-context (viewer s...
virtual Bool_t BeginUpdate()
Put scene in update mode, return true if lock acquired.
virtual void AdoptLogical(TGLLogicalShape &shape)
Adopt dynamically created logical 'shape' - add to internal map and take responsibility for deleting...
std::vector< DrawElement_t >::iterator DrawElementVec_i
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).
DrawElementVec_t fVisibleElements
std::vector< DrawElement_t * >::iterator DrawElementPtrVec_i
virtual Int_t DestroyLogicals()
Destroy all logical shapes in scene.
LogicalShapeMap_t::const_iterator LogicalShapeMapCIt_t
virtual void LodifySceneInfo(TGLRnrCtx &rnrCtx)
Setup LOD-dependant values in scene-info.
virtual void PreDraw(TGLRnrCtx &rnrCtx)
Initialize rendering.
ShapeVec_t fShapesOfInterest