4 #ifndef ROOT_TGLPShapeObjEditor
5 #define ROOT_TGLPShapeObjEditor
30 class TGLPShapeObjEditor :
public TGedFrame,
35 enum ELightMode { kDiffuse, kAmbient, kSpecular, kEmission };
43 TGCompositeFrame *fGeoFrame;
46 TGNumberEntry *fGeomData[6];
47 TGButton *fGeoApplyButton;
50 TGCompositeFrame *fColorFrame;
53 TGButton *fLightTypes[4];
55 TGHSlider *fRedSlider;
56 TGHSlider *fGreenSlider;
57 TGHSlider *fBlueSlider;
58 TGHSlider *fAlphaSlider;
59 TGHSlider *fShineSlider;
61 TGButton *fColorApplyButton;
62 TGButton *fColorApplyFamily;
68 TGLPShapeObj *fPShapeObj;
70 void CreateGeoControls();
71 void CreateColorControls();
73 virtual void DoRedraw();
76 TGLPShapeObjEditor(
const TGWindow *p = 0,
77 Int_t width = 140, Int_t height = 30,
78 UInt_t options = kChildFrame,
79 Pixel_t back = GetDefaultFrameBackground());
80 ~TGLPShapeObjEditor();
83 virtual void SetPShape(TGLPhysicalShape * shape);
84 virtual void PShapeModified();
86 virtual void SetModel(TObject* obj);
89 void SetCenter(
const Double_t *center);
90 void SetScale(
const Double_t *scale);
92 void GetObjectData(Double_t *shift, Double_t *scale);
93 void GeoValueSet(Long_t unusedVal);
95 void CreateColorRadioButtons();
96 void CreateColorSliders();
97 void SetColorSlidersPos();
99 void DrawSphere()
const;
101 void SetRGBA(
const Float_t *rgba);
102 const Float_t *GetRGBA()
const{
return fRGBA;}
104 void DoColorSlider(Int_t val);
105 void DoColorButton();
107 ClassDef(TGLPShapeObjEditor, 0);