bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
short Color_t
Color number (short)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
Generic 3D primitive description class.
Automatically rotates GL camera.
A GL overlay element which displays camera furstum.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
A collection of concrete TGLClip objects to be selected from.
void SetAutoUpdate(Bool_t aup)
Bool_t GetAutoUpdate() const
Class encapsulating a set of colors used throughout standard rendering.
Identifier of a shared GL-context.
Base-class and default implementation of event-handler for TGLViewer.
TGLFaderHelper & operator=(const TGLFaderHelper &)=delete
TGLFaderHelper(TGLViewer *v, Float_t fade, Float_t time, Int_t steps)
void MakeFadeStep()
Make one fading step and request redraw.
virtual ~TGLFaderHelper()
TGLFaderHelper(const TGLFaderHelper &)=delete
Encapsulates a set of lights for OpenGL.
Combine all available manipulators in a collection.
Orthographic projection camera.
Wrapper class for GL capture & output routines.
Selection record for overlay objects.
Wrap TGLPysicalShape into TObject so that it can be edited using GED.
Perspective projection camera - with characteristic foreshortening.
Concrete physical shape - a GL drawable.
Viewport (pixel base) 2D rectangle class.
Int_t Diagonal() const
Return the diagonal of the rectangle.
TGLRedrawTimer(TGLViewer &viewer)
~TGLRedrawTimer() override
void RequestDraw(Int_t milliSec, Short_t redrawLOD)
Bool_t Notify() override
This method must be overridden to handle object notification (the base implementation is no-op).
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
TGLColorSet * GetBaseColorSet()
Returns the current base color-set.
Scene base-class – provides basic interface expected by the TGLViewer or its sub-classes:
Standard selection record including information about containing scene and details ob out selected ob...
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
Base class for GL viewers.
GUI editor for TGLViewer.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
TGLRedrawTimer * fRedrawTimer
! timer for triggering redraws
Bool_t CanLoopOnPrimitives() const override
virtual void MouseOver(TGLPhysicalShape *)
Emit MouseOver signal.
void SetDrawCameraCenter(Bool_t x)
Draw camera look at and rotation point.
TGLAutoRotator * fAutoRotator
!
Bool_t PreferLocalFrame() const override
Float_t fLineScale
! width scale for lines
void FadeView(Float_t alpha)
Draw a rectangle (background color and given alpha) across the whole viewport.
Bool_t SavePictureScale(const TString &fileName, Float_t scale, Bool_t pixel_object_scale=kTRUE)
Save picture with given scale to current window size.
TGLCamera * fCurrentCamera
!
void SetMaxSceneDrawTimeLQ(Float_t t)
TGLCameraOverlay * fCameraOverlay
! markup size of viewport in scene units
Int_t AddObject(const TBuffer3D &, Bool_t *=nullptr) override
virtual void RefreshPadEditor(TObject *obj=nullptr)
Update GED editor if it is set.
void SetStereoFrustumAsymFac(Float_t f)
TGLOvlSelectRecord & GetOvlSelRec()
Bool_t fAxesDepthTest
! remove guides hidden-lines
virtual void SetEventHandler(TGEventHandler *handler)
Set the event-handler.
Float_t GetStereoEyeOffsetFac() const
TGLPerspectiveCamera fPerspectiveCameraYOZ
!
EPushAction GetPushAction() const
void PrintObjects() override
Pass viewer for print capture by TGLOutput.
TGEventHandler * GetEventHandler() const
TGLOrthoCamera fOrthoXOYCamera
!
TGLSelectRecord fSelRec
! select record from last select (should go to context)
Int_t AddObject(UInt_t, const TBuffer3D &, Bool_t *=nullptr) override
TGLColorSet & RefLightColorSet()
Bool_t GetSmoothPoints() const
virtual void ReMouseOver(TObject *obj, UInt_t state)
Emit MouseOver signal.
TImage * GetPictureUsingFBO(Int_t w, Int_t h, Float_t pixel_object_scale=0)
Returns current image.
TGLOrthoCamera fOrthoXnOZCamera
!
static TGLColorSet & GetDefaultColorSet()
Returns reference to the default color-set.
void InitGL()
Initialise GL state.
TGLCameraOverlay * GetCameraOverlay() const
void SetAutoRotator(TGLAutoRotator *ar)
Set the auto-rotator for this viewer. The old rotator is deleted.
Bool_t GetSmoothLines() const
virtual void Clicked(TObject *obj)
Emit Clicked signal.
void MakeCurrent() const
Make GL context current.
static TGLColorSet fgDefaultColorSet
! a shared, default color-set
Float_t GetStereoZeroParallax() const
void SetupClipObject() override
Setup clip-object. Protected virtual method.
Float_t GetMaxSceneDrawTimeLQ() const
Bool_t OpenComposite(const TBuffer3D &, Bool_t *=nullptr) override
TGEventHandler * fEventHandler
! event handler
EDragAction GetDragAction() const
Bool_t GetDrawCameraCenter()
TGLPerspectiveCamera fPerspectiveCameraXOY
!
TGLOrthoCamera fOrthoZnOYCamera
!
TGLRect fViewport
! viewport - drawn area
virtual void SelectionChanged()
Update GUI components for embedded viewer selection change.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Process event of type 'event' - one of EEventType types, occurring at window location px,...
void SetCameraOverlay(TGLCameraOverlay *m)
virtual void UnClicked(TObject *obj, UInt_t button, UInt_t state)
Emit UnClicked signal with button id and modifier state.
void SetPerspectiveCamera(ECameraType camera, Double_t fov, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Set a perspective camera to supplied configuration - note this does not need to be the current camera...
TGLVertex3 fReferencePos
! reference position
void PreRender() override
Initialize objects that influence rendering.
Bool_t RequestOverlaySelect(Int_t x, Int_t y)
Post request for secondary selection rendering of selected object around the window point (x,...
Float_t GetPointScale() const
static Bool_t IsUsingDefaultColorSetForNewViewers()
Returns the value of the static flag that determines if new viewers should use the default color-set.
Int_t ViewportDiagonal() const
virtual void MouseIdle(TGLPhysicalShape *, UInt_t, UInt_t)
Emit MouseIdle signal.
Bool_t SavePictureWidth(const TString &fileName, Int_t width, Bool_t pixel_object_scale=kTRUE)
Save picture with given width (height scaled proportionally).
void DoDrawStereo(Bool_t swap_buffers)
Draw out in stereoscopic mode.
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenceOn, const Double_t *referencePos)
Set the state of guides (axes & reference markers) from arguments.
void DoDraw(Bool_t swap_buffers=kTRUE)
Draw out the viewer.
TGLOrthoCamera fOrthoZOYCamera
!
virtual void CreateGLWidget()
void SwitchColorSet()
Switch between dark and light colorsets.
TGLPShapeObj * fPShapeWrap
TGLSelectRecord fSecSelRec
! select record from last secondary select (should go to context)
~TGLViewer() override
Destroy viewer object.
TGLLightSet * GetLightSet() const
void DrawDebugInfo()
If in debug mode draw camera aids and overall bounding box.
void SetSmartRefresh(Bool_t smart_ref)
void SetIgnoreSizesOnUpdate(Bool_t v)
void AutoFade(Float_t fade, Float_t time=1, Int_t steps=10)
Animate fading from current value to fade over given time (sec) and number of steps.
Bool_t fReferenceOn
! reference marker on?
TGLCamera & CurrentCamera() const
void SetCurrentCamera(ECameraType camera)
Set current active camera - 'cameraType' one of: kCameraPerspX, kCameraPerspY, kCameraPerspZ,...
void SetupCameras(Bool_t reset)
Setup cameras for current bounding box.
Float_t GetStereoFrustumAsymFac() const
Bool_t fResetCamerasOnUpdate
void SetStereoEyeOffsetFac(Float_t f)
Int_t fAxesType
! axes type
TGLClipSet * GetClipSet() const
void SetStereo(Bool_t stereo, Bool_t quad_buf=kTRUE)
Enable stereo rendering.
TImage * GetPictureUsingBB()
Returns current image.
TGLColorSet & RefDarkColorSet()
virtual void DestroyGLWidget()
TGLCamera & RefCamera(ECameraType camera)
Return camera reference by type.
TContextMenu * fContextMenu
!
void UseLightColorSet()
Use the light color-set.
Bool_t IsUsingDefaultColorSet() const
Check if the viewer is using the default color set.
Bool_t DoSelect(Int_t x, Int_t y)
Perform GL selection, picking objects overlapping WINDOW area described by 'rect'.
void PreDraw()
Perform GL work which must be done before each draw.
Float_t fStereoZeroParallax
! position of zero-parallax plane: 0 - near clipping plane, 1 - far clipping plane
virtual void PostSceneBuildSetup(Bool_t resetCameras)
Perform post scene-build setup.
TGedEditor * GetGedEditor() const
Float_t fStereoEyeOffsetFac
!
Bool_t SavePictureUsingBB(const TString &fileName)
Save current image in various formats (gif, gif+, jpg, png).
Bool_t SavePicture()
Save current image using the default file name which can be set via SetPictureFileName() and defaults...
Float_t fFader
! fade the view (0 - no fade/default, 1 - full fade/no rendering done)
void SetSmoothPoints(Bool_t s)
void UpdateScene(Bool_t redraw=kTRUE)
Force update of pad-scenes.
void SetLineScale(Float_t s)
TGLOrthoCamera fOrthoZOXCamera
!
Bool_t SavePictureUsingFBO(const TString &fileName, Int_t w, Int_t h, Float_t pixel_object_scale=0)
Save current image in various formats (gif, gif+, jpg, png).
static void SetAxisLabelScale(Float_t als)
Sets static scaling facor that allows simple guide axies to have label values scaled relative to actu...
TGLOrthoCamera fOrthoXOZCamera
!
Bool_t GetClipAutoUpdate() const
virtual void OverlayDragFinished()
An overlay operation can result in change to an object.
TGLOverlayElement * GetCurrentOvlElm() const
void SetMaxSceneDrawTimeHQ(Float_t t)
Bool_t SavePictureHeight(const TString &fileName, Int_t height, Bool_t pixel_object_scale=kTRUE)
Save picture with given height (width scaled proportionally).
void SetOrthoCamera(ECameraType camera, Double_t zoom, Double_t dolly, Double_t center[3], Double_t hRotate, Double_t vRotate)
Set an orthographic camera to supplied configuration - note this does not need to be the current came...
void DrawGuides()
Draw reference marker and coordinate axes.
void SetPointScale(Float_t s)
const TGLRect & RefViewport() const
void UseDefaultColorSet(Bool_t x)
Set usage of the default color set.
void SetStereoZeroParallax(Float_t f)
void AddCompositeOp(UInt_t) override
Float_t fMaxSceneDrawTimeHQ
! max time for scene rendering at high LOD (in ms)
void BeginScene() override
Bool_t RequestSecondarySelect(Int_t x, Int_t y)
Request secondary select.
TGedEditor * fGedEditor
! GED editor
TGLSelectRecord & GetSelRec()
void SetViewport(Int_t x, Int_t y, Int_t width, Int_t height)
Set viewer viewport (window area) with bottom/left at (x,y), with dimensions 'width'/'height'.
Bool_t GetSmartRefresh() const
Float_t fPointScale
! size scale for points
TGLColorSet fLightColorSet
! color-set with light background
void SetSmoothLines(Bool_t s)
Bool_t fStereo
! use stereo rendering
virtual void UnMouseOver(TObject *obj, UInt_t state)
Emit UnMouseOver signal.
void PadPaint(TVirtualPad *pad) override
Entry point for updating viewer contents via VirtualViewer3D interface.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Calculate and return pixel distance to nearest viewer object from window location px,...
TVirtualPad * fPad
! external pad - remove replace with signal
virtual void ReClicked(TObject *obj, UInt_t button, UInt_t state)
Emit ReClicked signal with button id and modifier state.
Bool_t fResetCamerasOnNextUpdate
Float_t GetLineScale() const
Bool_t fSmoothPoints
! smooth point edge rendering
void SetClipAutoUpdate(Bool_t x)
TGLOrthoCamera fOrthoZnOXCamera
!
Float_t fMaxSceneDrawTimeLQ
! max time for scene rendering at high LOD (in ms)
Bool_t fSmoothLines
! smooth line edge rendering
TGLManipSet * fSelectedPShapeRef
!
TString fPictureFileName
! default file-name for SavePicture()
void ClearCurrentOvlElm()
Reset current overlay-element to zero, eventually notifying the old one that the mouse has left.
Bool_t GetIgnoreSizesOnUpdate() const
void ApplySelection()
Process result from last selection (in fSelRec) and extract a new current selection from it.
TGLColorSet fDarkColorSet
! color-set with dark background
void InitSecondaryObjects()
Common initialization.
Bool_t DoSecondarySelect(Int_t x, Int_t y)
Secondary selection.
void UseDarkColorSet()
Use the dark color-set.
void ResetCameras() override
virtual void SetGedEditor(TGedEditor *ed)
Bool_t RequestSelect(Int_t x, Int_t y)
Post request for selection render pass viewer, picking objects around the window point (x,...
void SetClearColor(Color_t col)
Set background method.
static Float_t fgAxisLabelScale
! allow simple guide axes labels to be scaled relative to scene units
Bool_t DoOverlaySelect(Int_t x, Int_t y)
Perform GL selection, picking overlay objects only.
Bool_t fDrawCameraCenter
! reference marker on?
void ReinitializeCurrentCamera(const TGLVector3 &hAxis, const TGLVector3 &vAxis, Bool_t redraw=kTRUE)
Change base-vectors defining the camera-base transformation of current camera.
Bool_t IsColorSetDark() const
Returns true if current color set is dark.
void CloseComposite() override
virtual void DoubleClicked()
Bool_t fIgnoreSizesOnUpdate
void PostDraw()
Perform GL work which must be done after each draw.
TGLAutoRotator * GetAutoRotator()
Get the auto-rotator for this viewer.
Bool_t GetResetCamerasOnUpdate() const
TGLPerspectiveCamera fPerspectiveCameraXOZ
!
void Render() override
Normal rendering, used by mono and stereo rendering.
Bool_t BuildingScene() const override
const TGLPhysicalShape * GetSelected() const
Return selected physical shape.
Bool_t fSmartRefresh
! cache logicals during scene rebuilds
Float_t fStereoFrustumAsymFac
!
Bool_t fDebugMode
! debug mode (forced rebuild + draw scene/frustum/interest boxes)
TGLOrthoCamera fOrthoXnOYCamera
!
Float_t GetMaxSceneDrawTimeHQ() const
static Bool_t fgUseDefaultColorSetForNewViewers
! name says it all
void GetGuideState(Int_t &axesType, Bool_t &axesDepthTest, Bool_t &referenceOn, Double_t *referencePos) const
Fetch the state of guides (axes & reference markers) into arguments.
void RemoveOverlayElement(TGLOverlayElement *el) override
Remove overlay element.
TGLSelectRecord fCurrentSelRec
! select record in use as selected
TGLViewer & operator=(const TGLViewer &)=delete
TGLViewer(const TGLViewer &)=delete
void SetPictureFileName(const TString &f)
void ResetCamerasAfterNextUpdate() override
void DoDrawMono(Bool_t swap_buffers)
Draw out in monoscopic mode.
Bool_t fStereoQuadBuf
! draw quad buffer or left/right stereo in left/right half of window
TGLContextIdentity * fGLCtxId
!for embedded gl viewer
Int_t fGLDevice
!for embedded gl viewer
void PostRender() override
Restore state set in PreRender().
static void UseDefaultColorSetForNewViewers(Bool_t x)
Sets static flag that determines if new viewers should use the default color-set.
const char * GetPictureFileName() const
TGLOvlSelectRecord fOvlSelRec
! select record from last overlay select
TGLOverlayElement * fCurrentOvlElm
! current overlay element
void SetResetCamerasOnUpdate(Bool_t v)
void SwapBuffers() const
Swap GL buffers.
void ResetCurrentCamera()
Resets position/rotation of current camera to default values.
TGLWidget * GetGLWidget()
An abstract interface to image processing library.
Mother of all ROOT objects.
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
const char * Data() const
Handles synchronous and a-synchronous timer events.
virtual void TurnOff()
Remove timer from system timer list.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Abstract 3D shapes viewer.