56 fIgnoreSizesOnUpdate(0),
57 fResetCamerasOnUpdate(0),
60 fMaxSceneDrawTimeHQ(0),
61 fMaxSceneDrawTimeLQ(0),
62 fPointSizeScale(0), fLineWidthScale(0),
63 fPointSmooth(0), fLineSmooth(0),
64 fWFLineWidth(0), fOLLineWidth(0),
87 fARotDt(0), fARotWPhi(0), fARotATheta(0), fARotWTheta(0), fARotADolly(0), fARotWDolly(0),
88 fASavImageGUIBaseName(0), fASavImageGUIOutMode(0),
89 fStereoZeroParallax(0), fStereoEyeOffsetFac(0), fStereoFrustumAsymFac(0),
114 fClearColor->
Connect(
"ColorSelected(Pixel_t)",
"TGLViewerEditor",
this,
"DoClearColor(Pixel_t)");
124 fLineSmooth ->
Connect(
"Clicked()",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
125 fWFLineWidth->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
126 fOLLineWidth->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
144 fCamMode->
Connect(
"Selected(Int_t)",
"TGLViewerEditor",
this,
"DoCameraOverlay()");
151 fARotDt ->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
152 fARotWPhi ->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
244 SetLabeledNEntryState(
fSceneRotDt, ! rotate_standard);
245 SetLabeledNEntryState(
fARotDt, rotate_standard);
246 SetLabeledNEntryState(
fARotWPhi, rotate_standard);
247 SetLabeledNEntryState(
fARotATheta, rotate_standard);
248 SetLabeledNEntryState(
fARotWTheta, rotate_standard);
249 SetLabeledNEntryState(
fARotADolly, rotate_standard);
250 SetLabeledNEntryState(
fARotWDolly, rotate_standard);
412 for (
Int_t i = 1; i < 4; i++) {
586 fClipSet->
Connect(
"Changed()",
"TGLViewerEditor",
this,
"ViewerRedraw()");
605 fRotateSceneOn->
SetToolTipText(
"This covers a very specific use-case and is most likely not what you need.\nProceed at your own risk. Sorry about that.");
633 b->
Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoRotatorStart()");
637 b->
Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoRotatorStop()");
663 b->
Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoASavImageStart()");
667 b->
Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoASavImageStop()");
715 for (
Int_t i = 1; i < 4; i++) {
855 Warning(
"DoASavImageStart",
"AutoSave in progress.");
870 Warning(
"DoASavImageStop",
"AutoSave not in progress.");
911 ::Error(
"FindLabelForNEntry",
"parameter 'entry' is null");
918 if (
TList *
const parents = grandpa->GetList()) {
919 TIter next1(parents);
920 while (
TGFrameElement *
const frameElement = dynamic_cast<TGFrameElement *>(next1())) {
921 if (
TGHorizontalFrame *
const parent = dynamic_cast<TGHorizontalFrame *>(frameElement->fFrame)) {
922 if (
TList *
const children = parent->GetList()) {
923 TIter next2(children);
924 while (
TGFrameElement *
const candidate = dynamic_cast<TGFrameElement *>(next2())) {
925 if ((label = dynamic_cast<TGLabel *>(candidate->fFrame)))
948 ::Error(
"SetLabeledNEntryState",
"parameter 'entry' is null");
953 if (
TGLabel *
const label = FindLabelForNEntry(entry))
955 label->Disable(!enabled);
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void UpdateCameraCenter()
Update current camera with GUI state.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
TGNumberEntry * fReferencePosY
TGGroupFrame * fRefContainer
TGRadioButton * fAxesOrigin
A GL overlay element which displays camera furstum.
TGNumberEntry * fCameraCenterY
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
TGLClipSet * GetClipSet() const
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
void UpdateStereo()
Update stereo related variables.
TGNumberEntry * fStereoZeroParallax
TGCompositeFrame * fClipFrame
void StopImageAutoSave()
Stops automatic saving of images.
TGTextEntry * fASavImageGUIBaseName
virtual void ViewerRedraw()
Initiate redraw of the viewer.
Bool_t GetRotateScene() const
void SetWDolly(Double_t w)
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
TGCompositeFrame * fStereoFrame
Int_t GetPerspectiveMode() const
TGCheckButton * fResetCamerasOnUpdate
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
void ResetCurrentCamera()
Resets position/rotation of current camera to default values.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
void UpdateViewerAxes(Int_t id)
Update viewer with GUI state.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void SetNumber(Double_t val)
TGCheckButton * fCameraCenterExt
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
TGNumberEntry * fARotWPhi
TGTextButton * fCameraHome
void SetSmoothPoints(Bool_t s)
virtual void ShowFrame(TGFrame *f)
Show sub frame.
TGCheckButton * fDrawCameraCenter
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
void SetMaxSceneDrawTimeLQ(Float_t t)
Double_t GetADolly() const
void DoAnnotation()
Create annotation via picking.
void SetDrawCameraCenter(Bool_t x)
Draw camera look at and rotation point.
GUI editor for TGLViewer.
void CreateClippingTab()
Create GUI controls - clip type (none/plane/box) and plane/box properties.
virtual void SetModel(TObject *obj)
Sets model or disables/hides viewer.
TGNumberEntry * fCameraCenterZ
void DoASavImageGUIBaseName(const char *t)
Update base-name.
void SetOLLineW(Float_t w)
TGNumberEntry * fLineWidthScale
TGButtonGroup * fASavImageGUIOutMode
GUI sub-editor for TGLClipSet.
TGCheckButton * fReferenceOn
Int_t GetOrthographicMode() const
TGNumberEntry * fWFLineWidth
void DoASavImageGUIOutMode(Int_t m)
Update output mode.
Bool_t GetResetCamerasOnUpdate() const
TGLCamera & CurrentCamera() const
Float_t GetStereoFrustumAsymFac() const
void ConnectSignals2Slots()
Connect signals to slots.
TGColorSelect * fClearColor
virtual Bool_t IsPerspective() const
void SetPointScale(Float_t s)
void DoCameraOverlay()
Update viewer with GUI state.
void SetLineScale(Float_t s)
Bool_t GetIgnoreSizesOnUpdate() const
void UpdatePointLineStuff()
Slot for point-sizes and line-widths.
Bool_t GetSmoothLines() const
TGTextButton * fCaptureCenter
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
void UpdateRotator()
Update rotator related variables.
Sub-editor for TGLLightSet.
Double_t GetWTheta() const
TGCheckButton * fLineSmooth
virtual TList * GetList() const
Double_t GetDeltaPhi() const
TGNumberEntry * fSceneRotDt
void CreateExtrasTab()
Create Extra Tab controls - camera rotator and stereo.
TGLRnrCtx & RnrCtx() const
TString GetImageGUIBaseName() const
void SetGuides()
Configuration of guides GUI called from SetModel().
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
void SetImageGUIBaseName(const TString &gname)
TGLLightSetSubEditor * fLightSet
Float_t GetStereoEyeOffsetFac() const
void DoIgnoreSizesOnUpdate()
ResetCamerasOnUpdate was toggled.
void UpdateScene(Bool_t redraw=kTRUE)
Force update of pad-scenes.
TGNumberEntry * fReferencePosX
Double_t * GetCenterVec()
virtual TGListBox * GetListBox() const
void SetModel(TGLClipSet *m)
Set model object.
void DoResetCamerasOnUpdate()
ResetCamerasOnUpdate was toggled.
TGNumberEntry * fMaxSceneDrawTimeHQ
void SetADolly(Double_t a)
Set relative amplitude of forward/backward oscillation.
Bool_t IsUsingDefaultColorSet() const
Check if the viewer is using the default color set.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void CreateGuidesTab()
Create "Guides" tab.
void DoCameraCenterExt()
Set external camera center.
Automatically rotates GL camera.
TGLAutoRotator * GetAutoRotator()
Get the auto-rotator for this viewer.
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...
TGTextButton * fUpdateScene
TGNumberEntry * fPointSizeScale
void SetWTheta(Double_t w)
TGNumberEntry * fARotADolly
void DoUpdateScene()
UpdateScene was clicked.
void DoRotatorStop()
Stop auto-rotator.
TGCheckButton * fPointSmooth
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
TGNumberEntry * fCameraCenterX
TGLCameraOverlay * GetCameraOverlay() const
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.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void SetExternalCenter(Bool_t x)
Set camera center diffrent than scene center, if enable is kTRUE.
TGLClipSetSubEditor * fClipSet
void SetStereoZeroParallax(Float_t f)
void SetStereoFrustumAsymFac(Float_t f)
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
void StartImageAutoSaveWithGUISettings()
Start auto-saving images as set-up via GUI.
Bool_t GetShowPerspective() const
Float_t GetMaxSceneDrawTimeLQ() const
Base GL viewer object - used by both standalone and embedded (in pad) GL.
void SetRotateScene(Bool_t rotateScene)
void SetShowPerspective(Bool_t x)
TGCompositeFrame * fGuidesFrame
virtual Bool_t IsOrthographic() const
void SetOrthographicMode(EMode m)
Float_t GetPointScale() const
TGCheckButton * fIgnoreSizesOnUpdate
TGNumberEntry * fARotWTheta
void SetStereoEyeOffsetFac(Float_t f)
Float_t GetStereoZeroParallax() const
void SetSmoothLines(Bool_t s)
Float_t GetLineScale() const
void SetCenterVec(Double_t x, Double_t y, Double_t z)
Set camera center vector.
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
void SetModel(TGLLightSet *m)
New model was set, refresh data.
void DoASavImageStop()
Stop auto-rotator image auto-save.
void SetDeltaPhi(Double_t dPhi)
void DoCaptureCenter()
Capture camera-center via picking.
void DoDrawCameraCenter()
Draw camera center.
void Stop()
Stop the auto-rotator.
Int_t GetImageGUIOutMode() const
void DoClearColor(Pixel_t color)
Clear-color was changed.
TGButtonGroup * fAxesContainer
void SetPerspectiveMode(EMode m)
virtual void AddEntry(TGString *s, Int_t id)
void SetResetCamerasOnUpdate(Bool_t v)
virtual Double_t GetNumber() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Color_t GetColorIndex() const
Returns color-index representing the color.
TGCheckButton * fRotateSceneOn
TGCheckButton * fAxesDepthTest
TGNumberEntry * fReferencePosZ
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
TGGroupFrame * fCamContainer
static TGNumberEntry * MakeLabeledNEntry(TGCompositeFrame *p, const char *name, Int_t labelw, Int_t nd=7, Int_t s=5)
Helper function to create fixed width TGLabel and TGNumberEntry in same row.
const TGWindow * GetParent() const
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Double_t GetATheta() const
TGLLightSet * GetLightSet() const
TGRadioButton * fAxesEdge
TGNumberEntry * fStereoEyeOffsetFac
Mother of all ROOT objects.
void SetDt(Double_t dt)
Set time between two redraws in seconds.
virtual void UnmapWindow()
TGLViewerEditor(const TGLViewerEditor &)
void UpdateMaxDrawTimes()
Slot for fMaxSceneDrawTimeHQ and fMaxSceneDrawTimeLQ.
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.
Double_t GetWDolly() const
Bool_t GetShowOrthographic() const
virtual Int_t GetSelected() const
TGNumberEntryField * GetNumberEntry() const
EPushAction GetPushAction() const
Bool_t GetImageAutoSave() const
TGNumberEntry * fARotATheta
Float_t GetMaxSceneDrawTimeHQ() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TGNumberEntry * fStereoFrustumAsymFac
Bool_t GetExternalCenter()
TGNumberEntry * fOLLineWidth
TGNumberEntry * fARotWDolly
TGCheckButton * fCaptureAnnotate
void DoASavImageStart()
Start auto-rotator image auto-save.
TGNumberEntry * fMaxSceneDrawTimeLQ
void SetMaxSceneDrawTimeHQ(Float_t t)
TGRadioButton * fAxesNone
void Enable(Bool_t on=kTRUE)
Set state of widget as enabled.
Bool_t GetDrawCameraCenter()
void Start()
Start the auto-rotator.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
Bool_t GetSmoothPoints() const
void SetColor(Int_t r, Int_t g, Int_t b, Int_t a=255)
Set color with Int_t values.
void DoCameraHome()
CameraHome was clicked.
void CreateStyleTab()
Creates "Style" tab.
void SetWFLineW(Float_t w)
virtual void MakeTitle(const char *title)
Create attribute frame title.
void DoRotatorStart()
Start auto-rotator.
TGCheckButton * fCamOverlayOn
void SetShowOrthographic(Bool_t x)
void UpdateViewerReference()
Update viewer with GUI state.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void UpdateReferencePosState()
Enable/disable reference position (x/y/z) number edits based on reference check box.
void SetIgnoreSizesOnUpdate(Bool_t v)