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))
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
Float_t GetStereoEyeOffsetFac() const
A GL overlay element which displays camera furstum.
TGNumberEntry * fCameraCenterY
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
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
const TGWindow * GetParent() const
virtual void ViewerRedraw()
Initiate redraw of the viewer.
void SetWDolly(Double_t w)
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
TGCompositeFrame * fStereoFrame
TGCheckButton * fResetCamerasOnUpdate
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
void ResetCurrentCamera()
Resets position/rotation of current camera to default values.
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.
Float_t GetLineScale() const
TGNumberEntry * fARotWPhi
virtual TList * GetList() const
TGTextButton * fCameraHome
void SetSmoothPoints(Bool_t s)
Double_t GetDeltaPhi() const
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)
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.
Bool_t IsUsingDefaultColorSet() const
Check if the viewer is using the default color set.
virtual void SetModel(TObject *obj)
Sets model or disables/hides viewer.
Int_t GetImageGUIOutMode() const
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
TGNumberEntry * fWFLineWidth
Float_t GetStereoZeroParallax() const
void DoASavImageGUIOutMode(Int_t m)
Update output mode.
Float_t GetStereoFrustumAsymFac() const
void ConnectSignals2Slots()
Connect signals to slots.
TGColorSelect * fClearColor
TGLCameraOverlay * GetCameraOverlay() const
virtual Bool_t IsOrthographic() const
Bool_t GetRotateScene() const
void SetPointScale(Float_t s)
Double_t GetWDolly() const
void DoCameraOverlay()
Update viewer with GUI state.
EPushAction GetPushAction() const
void SetLineScale(Float_t s)
TGNumberEntryField * GetNumberEntry() const
void UpdatePointLineStuff()
Slot for point-sizes and line-widths.
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.
TGCheckButton * fLineSmooth
Bool_t GetSmoothPoints() const
TGNumberEntry * fSceneRotDt
void CreateExtrasTab()
Create Extra Tab controls - camera rotator and stereo.
Double_t GetADolly() 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.
TGLClipSet * GetClipSet() const
void Error(const char *location, const char *msgfmt,...)
void SetImageGUIBaseName(const TString &gname)
TGLLightSetSubEditor * fLightSet
void DoIgnoreSizesOnUpdate()
ResetCamerasOnUpdate was toggled.
void UpdateScene(Bool_t redraw=kTRUE)
Force update of pad-scenes.
TGNumberEntry * fReferencePosX
virtual Int_t GetSelected() const
Double_t * GetCenterVec()
void SetModel(TGLClipSet *m)
Set model object.
void DoResetCamerasOnUpdate()
ResetCamerasOnUpdate was toggled.
TGLLightSet * GetLightSet() const
TGNumberEntry * fMaxSceneDrawTimeHQ
void SetADolly(Double_t a)
Set relative amplitude of forward/backward oscillation.
Bool_t GetShowPerspective() const
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.
Bool_t GetSmoothLines() const
Float_t GetMaxSceneDrawTimeLQ() const
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
TGLRnrCtx & RnrCtx() const
void DoUpdateScene()
UpdateScene was clicked.
void DoRotatorStop()
Stop auto-rotator.
virtual void Disable(Bool_t on=kTRUE)
Double_t GetATheta() const
TGCheckButton * fPointSmooth
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
TGNumberEntry * fCameraCenterX
Float_t GetMaxSceneDrawTimeHQ() const
TGLCamera & CurrentCamera() const
virtual TGListBox * GetListBox() const
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.
TString GetImageGUIBaseName() const
Base GL viewer object - used by both standalone and embedded (in pad) GL.
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.
Double_t GetWTheta() const
Float_t GetPointScale() const
void SetRotateScene(Bool_t rotateScene)
void SetShowPerspective(Bool_t x)
TGCompositeFrame * fGuidesFrame
void SetOrthographicMode(EMode m)
TGCheckButton * fIgnoreSizesOnUpdate
virtual Bool_t IsPerspective() const
TGNumberEntry * fARotWTheta
void SetStereoEyeOffsetFac(Float_t f)
void SetSmoothLines(Bool_t s)
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
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.
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 Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
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.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
ClassImp(TGLViewerEditor)
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 &)
Bool_t GetIgnoreSizesOnUpdate() const
void UpdateMaxDrawTimes()
Slot for fMaxSceneDrawTimeHQ and fMaxSceneDrawTimeLQ.
Color_t GetColorIndex() const
Returns color-index representing the color.
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.
Bool_t GetImageAutoSave() const
Int_t GetOrthographicMode() const
TGNumberEntry * fARotATheta
Int_t GetPerspectiveMode() const
TGNumberEntry * fStereoFrustumAsymFac
Bool_t GetExternalCenter()
TGNumberEntry * fOLLineWidth
TGNumberEntry * fARotWDolly
TGCheckButton * fCaptureAnnotate
void DoASavImageStart()
Start auto-rotator image auto-save.
TGNumberEntry * fMaxSceneDrawTimeLQ
virtual Double_t GetNumber() const
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 GetShowOrthographic() 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)
Bool_t GetResetCamerasOnUpdate() const
void UpdateViewerReference()
Update viewer with GUI state.
void UpdateReferencePosState()
Enable/disable reference position (x/y/z) number edits based on reference check box.
void SetIgnoreSizesOnUpdate(Bool_t v)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.