Warning, file /include/root/TGLPShapeObjEditor.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef ROOT_TGLPShapeObjEditor
0005 #define ROOT_TGLPShapeObjEditor
0006
0007 #include <memory>
0008
0009 #include "TGedFrame.h"
0010
0011 #include "TGLUtil.h"
0012
0013 #include "TGLPShapeRef.h"
0014
0015 class TGLPShapeObj;
0016 class TGLayoutHints;
0017 class TGCheckButton;
0018 class TGNumberEntry;
0019 class TGButtonGroup;
0020 class TGroupFrame;
0021 class TGHSlider;
0022 class TGRadioButton;
0023 class TGTabElement;
0024 class TGButton;
0025 class TGLViewer;
0026 class TGTab;
0027
0028 class TGLWidget;
0029
0030 class TGLPShapeObjEditor : public TGedFrame,
0031 public TGLPShapeRef
0032 {
0033
0034 private:
0035 enum ELightMode { kDiffuse, kAmbient, kSpecular, kEmission };
0036 ELightMode fLMode;
0037
0038 TGLayoutHints fLb;
0039 TGLayoutHints fLe;
0040 TGLayoutHints fLl;
0041 TGLayoutHints fLs;
0042
0043 TGCompositeFrame *fGeoFrame;
0044
0045
0046 TGNumberEntry *fGeomData[6];
0047 TGButton *fGeoApplyButton;
0048
0049
0050 TGCompositeFrame *fColorFrame;
0051 TGLWidget *fMatView;
0052
0053 TGButton *fLightTypes[4];
0054
0055 TGHSlider *fRedSlider;
0056 TGHSlider *fGreenSlider;
0057 TGHSlider *fBlueSlider;
0058 TGHSlider *fAlphaSlider;
0059 TGHSlider *fShineSlider;
0060
0061 TGButton *fColorApplyButton;
0062 TGButton *fColorApplyFamily;
0063 Float_t fRGBA[17];
0064
0065 Window_t fGLWin;
0066 ULong_t fCtx;
0067
0068 TGLPShapeObj *fPShapeObj;
0069
0070 void CreateGeoControls();
0071 void CreateColorControls();
0072
0073 void DoRedraw() override;
0074
0075 public:
0076 TGLPShapeObjEditor(const TGWindow *p = nullptr,
0077 Int_t width = 140, Int_t height = 30,
0078 UInt_t options = kChildFrame,
0079 Pixel_t back = GetDefaultFrameBackground());
0080 ~TGLPShapeObjEditor() override;
0081
0082
0083 void SetPShape(TGLPhysicalShape * shape) override;
0084 void PShapeModified() override;
0085
0086 void SetModel(TObject* obj) override;
0087
0088
0089 void SetCenter(const Double_t *center);
0090 void SetScale(const Double_t *scale);
0091 void DoGeoButton();
0092 void GetObjectData(Double_t *shift, Double_t *scale);
0093 void GeoValueSet(Long_t unusedVal);
0094
0095 void CreateColorRadioButtons();
0096 void CreateColorSliders();
0097 void SetColorSlidersPos();
0098
0099 void DrawSphere()const;
0100
0101 void SetRGBA(const Float_t *rgba);
0102 const Float_t *GetRGBA()const{return fRGBA;}
0103
0104 void DoColorSlider(Int_t val);
0105 void DoColorButton();
0106
0107 ClassDefOverride(TGLPShapeObjEditor, 0);
0108 };
0109
0110 #endif