Logo ROOT  
Reference Guide
TGLPShapeObjEditor.cxx
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Matevz Tadel 25/09/2006
3
4#include <cstring>
5
7#include "TGLPShapeObj.h"
8#include "TGedEditor.h"
9
10#include "TG3DLine.h"
11#include "TGButton.h"
12#include "TGButtonGroup.h"
13#include "TString.h"
14#include "TGLabel.h"
15#include "TClass.h"
16#include "TGCanvas.h"
17#include "TGTab.h"
18#include "TGSlider.h"
19#include "TGNumberEntry.h"
20#include "TROOT.h"
21#include "TVirtualMutex.h"
22
23#include "TVirtualX.h"
24#include "TGLViewer.h"
25#include "TGLUtil.h"
26#include "TGLPhysicalShape.h"
27#include "TGLWidget.h"
28#include "TGLIncludes.h"
29
30#include "Buttons.h"
31
32/** \class TGLPShapeObjEditor
33\ingroup opengl
34GUI editor for TGLPShapeObj.
35*/
36
38
46 kTot
47};
48
56};
57
66 kNEat
67};
68
69////////////////////////////////////////////////////////////////////////////////
70/// Constructor of TGLPhysicalShape editor GUI.
71
73 : TGedFrame(p, width, height, options | kVerticalFrame, back),
74 fLb(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 2, 3, 3), //button
75 fLe(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 3, 3), //entries
76 fLl(kLHintsLeft, 0, 8, 6, 0), // labels
77 fLs(kLHintsTop | kLHintsCenterX, 2, 2, 0, 0), ///sliders
78 fGeoFrame(0),fGeoApplyButton(0),
79 fColorFrame(0),
80 fRedSlider(0), fGreenSlider(0), fBlueSlider(0), fAlphaSlider(0), fShineSlider(0),
81 fColorApplyButton(0), fColorApplyFamily(0),
82 fRGBA(),
83 fPShapeObj(0)
84{
85 fRGBA[12] = fRGBA[13] = fRGBA[14] = 0.0f;
86 fRGBA[15] = 1.0f;
87 fRGBA[16] = 60.0f;
88
91}
92
93////////////////////////////////////////////////////////////////////////////////
94/// Destroy color editor GUI component.
95/// Done automatically.
96
98{
99}
100
101////////////////////////////////////////////////////////////////////////////////
102/// Shape has changed.
103/// Check if set to zero and make sure we're no longer in editor.
104
106{
108 if (shape == 0 && fGedEditor->GetModel() == fPShapeObj)
110}
111
112////////////////////////////////////////////////////////////////////////////////
113/// Shape has been modified.
114/// Update editor if we're still shown. Otherwise unref.
115
117{
120 else
121 SetPShape(0);
122}
123
124////////////////////////////////////////////////////////////////////////////////
125/// Sets model or disables/hides viewer.
126
128{
129 fPShapeObj = 0;
130
131 fPShapeObj = static_cast<TGLPShapeObj *>(obj);
133
138}
139
140////////////////////////////////////////////////////////////////////////////////
141/// Set internal center data from 3 component 'c'.
142
144{
148}
149
150////////////////////////////////////////////////////////////////////////////////
151/// Set internal scale data from 3 component 'c'.
152
154{
158}
159
160////////////////////////////////////////////////////////////////////////////////
161/// Process 'Apply' - update the viewer object from GUI.
162
164{
165 TGLVertex3 trans;
166 TGLVector3 scale;
167 GetObjectData(trans.Arr(), scale.Arr());
168 if (fPShape) {
169 fPShape->SetTranslation(trans);
170 fPShape->Scale(scale);
171 }
174}
175
176////////////////////////////////////////////////////////////////////////////////
177/// Extract the GUI object data, return center in 3 component 'center'
178/// scale in 3 component 'scale'.
179
181{
182 center[0] = fGeomData[kCenterX]->GetNumber();
183 center[1] = fGeomData[kCenterY]->GetNumber();
184 center[2] = fGeomData[kCenterZ]->GetNumber();
185 scale[0] = fGeomData[kScaleX]->GetNumber();
186 scale[1] = fGeomData[kScaleY]->GetNumber();
187 scale[2] = fGeomData[kScaleZ]->GetNumber();
188}
189
190////////////////////////////////////////////////////////////////////////////////
191/// Process setting of value in edit box - activate 'Apply' button.
192
194{
197}
198
199////////////////////////////////////////////////////////////////////////////////
200/// Create GUI for setting scale and position.
201
203{
205
206 TGLabel *label=0;
207
208 // Postion container
209 TGGroupFrame* container = new TGGroupFrame(fGeoFrame, "Object position:");
211 fGeoFrame->AddFrame(container, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 8, 8, 3, 3));//-
213
215
216 hf = new TGHorizontalFrame(container);
217 label = new TGLabel(hf, "X:");
218 hf->AddFrame(label, new TGLayoutHints(fLl));
219 fGeomData[kCenterX] = new TGNumberEntry(hf, 0.0, 8, kNExc);
221 fGeomData[kCenterX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
222 this, "GeoValueSet(Long_t)");
223 container->AddFrame(hf, new TGLayoutHints(lh));
224
225 hf = new TGHorizontalFrame(container);
226 label = new TGLabel(hf, "Y:");
227 hf->AddFrame(label, new TGLayoutHints(fLl));
228 fGeomData[kCenterY] = new TGNumberEntry(hf, 0.0, 8, kNEyc);
230 fGeomData[kCenterY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
231 this, "GeoValueSet(Long_t)");
232 container->AddFrame(hf, new TGLayoutHints(lh));
233
234 hf = new TGHorizontalFrame(container);
235 hf->AddFrame(new TGLabel(hf, "Z:"), new TGLayoutHints(fLl));
236 fGeomData[kCenterZ] = new TGNumberEntry(hf, 1.0, 8, kNEzc);
238 fGeomData[kCenterZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
239 this, "GeoValueSet(Long_t)");
240 container->AddFrame(hf, new TGLayoutHints(lh));
241
242 // Scale container
243 TGGroupFrame* osf = new TGGroupFrame(fGeoFrame, "Object scale:", kLHintsTop | kLHintsCenterX);
246
247 hf = new TGHorizontalFrame(osf);
248 hf->AddFrame(new TGLabel(hf, "X:"),new TGLayoutHints(fLl));
249 fGeomData[kScaleX] = new TGNumberEntry(hf, 1.0, 5, kNExs);
251 fGeomData[kScaleX]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
252 this, "GeoValueSet(Long_t)");
253 osf->AddFrame(hf, new TGLayoutHints(lh));
254
255 hf = new TGHorizontalFrame(osf);
256 hf->AddFrame(new TGLabel(hf, "Y:"),new TGLayoutHints(fLl));
257 fGeomData[kScaleY] = new TGNumberEntry(hf, 1.0, 5, kNEys);
259 fGeomData[kScaleY]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
260 this, "GeoValueSet(Long_t)");
261 osf->AddFrame(hf, new TGLayoutHints(lh));
262
263 hf = new TGHorizontalFrame(osf);
264 hf->AddFrame(new TGLabel(hf, "Z:"),new TGLayoutHints(fLl));
265 fGeomData[kScaleZ] = new TGNumberEntry(hf, 1.0, 5, kNEzs);
267 fGeomData[kScaleZ]->Connect("ValueSet(Long_t)", "TGLPShapeObjEditor",
268 this, "GeoValueSet(Long_t)");
269 osf->AddFrame(hf, new TGLayoutHints(lh));
270
271 hf = new TGHorizontalFrame(osf);
275 osf->AddFrame(hf, new TGLayoutHints(lh));
276
277 // Modify button
278 fGeoApplyButton = new TGTextButton(fGeoFrame, "Modify object");
281 fGeoApplyButton->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoGeoButton()");
282}
283
284////////////////////////////////////////////////////////////////////////////////
285/// Set color sliders from 17 component 'rgba'.
286
288{
291
292 for (Int_t i = 0; i < 17; ++i) fRGBA[i] = rgba[i];
293
295 fGreenSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 1] * 100));
296 fBlueSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 2] * 100));
298
299 DrawSphere();
300}
301
302////////////////////////////////////////////////////////////////////////////////
303/// Process slider movement.
304
306{
307 TGSlider *frm = (TGSlider *)gTQSender;
308
309 if (frm) {
310 Int_t wid = frm->WidgetId();
311
312 switch (wid) {
313 case kHSr:
314 fRGBA[fLMode * 4] = val / 100.f;
315 break;
316 case kHSg:
317 fRGBA[fLMode * 4 + 1] = val / 100.f;
318 break;
319 case kHSb:
320 fRGBA[fLMode * 4 + 2] = val / 100.f;
321 break;
322 case kHSa:
323 fRGBA[fLMode * 4 + 3] = val / 100.f;
324 break;
325 case kHSs:
326 fRGBA[16] = val;
327 break;
328 }
329
332 DrawSphere();
333 }
334}
335
336////////////////////////////////////////////////////////////////////////////////
337/// Process button action.
338
340{
341 TGButton *btn = (TGButton *) gTQSender;
342 Int_t id = btn->WidgetId();
343
344 switch (id) {
345 case kCPd:
349 break;
350 case kCPa:
354 break;
355 case kCPs:
359 break;
360 case kCPe:
364 break;
365 case kTBa:
368 if (fPShape) {
370 }
372 break;
373 case kTBaf:
376 if (fPShape) {
378 }
380 break;
381 }
382}
383
384////////////////////////////////////////////////////////////////////////////////
385/// Create Diffuse/Ambient/Specular/Emissive radio buttons and sub-frames.
386
388{
389 TGGroupFrame *partFrame = new TGGroupFrame(fColorFrame, "Color components:", kLHintsTop | kLHintsCenterX);
390 fColorFrame->AddFrame(partFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 0, 2, 2));
391
393 TGMatrixLayout *ml = new TGMatrixLayout(partFrame, 0, 1, 10);
394 partFrame->SetLayoutManager(ml);
395
396 // partFrame will delete the layout manager ml for us so don't add to fTrash
397 fLightTypes[kDiffuse] = new TGRadioButton(partFrame, "Diffuse", kCPd);
398 fLightTypes[kDiffuse]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
399 fLightTypes[kDiffuse]->SetToolTipText("Diffuse component of color");
400 partFrame->AddFrame(fLightTypes[kDiffuse]);
401
402 fLightTypes[kAmbient] = new TGRadioButton(partFrame, "Ambient", kCPa);
403 fLightTypes[kAmbient]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
404 fLightTypes[kAmbient]->SetToolTipText("Ambient component of color");
405 partFrame->AddFrame(fLightTypes[kAmbient]);
406
407 fLightTypes[kSpecular] = new TGRadioButton(partFrame, "Specular", kCPs);
408 fLightTypes[kSpecular]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
409 fLightTypes[kSpecular]->SetToolTipText("Specular component of color");
410 partFrame->AddFrame(fLightTypes[kSpecular]);
411
412 fLightTypes[kEmission] = new TGRadioButton(partFrame, "Emissive", kCPe);
413 fLightTypes[kEmission]->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
414 fLightTypes[kEmission]->SetToolTipText("Emissive component of color");
415 partFrame->AddFrame(fLightTypes[kEmission]);
416
419}
420
421////////////////////////////////////////////////////////////////////////////////
422/// Create GUI for setting light color.
423
425{
426 UInt_t sw = 120; //fColorFrame->GetDefalutWidth();,
427
428 // Create Red/Green/BlueAlpha/Shine sliders
429 fColorFrame->AddFrame(new TGLabel(fColorFrame, "Red :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
431 fRedSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
432 fRedSlider->SetRange(0, 100);
433 fRedSlider->SetPosition(Int_t(fRGBA[0] * 100));
435
436
437 fColorFrame->AddFrame(new TGLabel(fColorFrame, "Green :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
439 fGreenSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
440 fGreenSlider->SetRange(0, 100);
443
444
445 fColorFrame->AddFrame(new TGLabel(fColorFrame, "Blue :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
447 fBlueSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
448 fBlueSlider->SetRange(0, 100);
451
452 fColorFrame->AddFrame(new TGLabel(fColorFrame, "Shine :"), new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 0, 0, 0));
454 fShineSlider->Connect("PositionChanged(Int_t)", "TGLPShapeObjEditor", this, "DoColorSlider(Int_t)");
455 fShineSlider->SetRange(0, 128);
457}
458
459////////////////////////////////////////////////////////////////////////////////
460/// Update GUI sliders from internal data.
461
463{
465 fGreenSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 1] * 100));
466 fBlueSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 2] * 100));
467 // fAlphaSlider->SetPosition(Int_t(fRGBA[fLMode * 4 + 3] * 100));
468
469 if (fRGBA[16] >= 0.f)
471}
472
473////////////////////////////////////////////////////////////////////////////////
474/// Redraw widget. Render sphere and pass to base-class.
475
477{
478 DrawSphere();
480}
481
482////////////////////////////////////////////////////////////////////////////////
483
484namespace {
485 GLUquadric *GetQuadric()
486 {
487 // GLU quadric.
488
489 static struct Init {
490 Init()
491 {
492 fQuad = gluNewQuadric();
493 if (!fQuad) {
494 Error("GetQuadric::Init", "could not create quadric object");
495 } else {
496 gluQuadricOrientation(fQuad, (GLenum)GLU_OUTSIDE);
497 gluQuadricDrawStyle(fQuad, (GLenum)GLU_FILL);
498 gluQuadricNormals(fQuad, (GLenum)GLU_FLAT);
499 }
500 }
501 ~Init()
502 {
503 if(fQuad)
504 gluDeleteQuadric(fQuad);
505 }
506 GLUquadric *fQuad;
507 }singleton;
508
509 return singleton.fQuad;
510 }
511
512}
513
514////////////////////////////////////////////////////////////////////////////////
515/// Draw local sphere reflecting current color options.
516
518{
519 if (!gVirtualX->IsCmdThread()) {
520 gROOT->ProcessLineFast(Form("((TGLPShapeObjEditor *)0x%lx)->DrawSphere()", (ULong_t)this));
521 return;
522 }
523
525
527 glViewport(0, 0, fMatView->GetWidth(), fMatView->GetHeight());
528 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
529
530 glEnable(GL_LIGHTING);
531 glEnable(GL_LIGHT0);
532 glEnable(GL_DEPTH_TEST);
533 glEnable(GL_CULL_FACE);
534 glCullFace(GL_BACK);
535 glMatrixMode(GL_PROJECTION);
536 glLoadIdentity();
537 glFrustum(-0.5, 0.5, -0.5, 0.5, 1., 10.);
538 glMatrixMode(GL_MODELVIEW);
539 glLoadIdentity();
540 Float_t ligPos[] = {0.f, 0.f, 0.f, 1.f};
541 glLightfv(GL_LIGHT0, GL_POSITION, ligPos);
542 glTranslated(0., 0., -3.);
543
544 const Float_t whiteColor[] = {1.f, 1.f, 1.f, 1.f};
545 const Float_t nullColor[] = {0.f, 0.f, 0.f, 1.f};
546
547 if (fRGBA[16] < 0.f) {
548 glLightfv(GL_LIGHT0, GL_DIFFUSE, fRGBA);
549 glLightfv(GL_LIGHT0, GL_AMBIENT, fRGBA + 4);
550 glLightfv(GL_LIGHT0, GL_SPECULAR, fRGBA + 8);
551 glMaterialfv(GL_FRONT, GL_DIFFUSE, whiteColor);
552 glMaterialfv(GL_FRONT, GL_AMBIENT, nullColor);
553 glMaterialfv(GL_FRONT, GL_SPECULAR, whiteColor);
554 glMaterialfv(GL_FRONT, GL_EMISSION, nullColor);
555 glMaterialf(GL_FRONT, GL_SHININESS, 60.f);
556 } else {
557 glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteColor);
558 glLightfv(GL_LIGHT0, GL_AMBIENT, nullColor);
559 glLightfv(GL_LIGHT0, GL_SPECULAR, whiteColor);
560 glMaterialfv(GL_FRONT, GL_DIFFUSE, fRGBA);
561 glMaterialfv(GL_FRONT, GL_AMBIENT, fRGBA + 4);
562 glMaterialfv(GL_FRONT, GL_SPECULAR, fRGBA + 8);
563 glMaterialfv(GL_FRONT, GL_EMISSION, fRGBA + 12);
564 glMaterialf(GL_FRONT, GL_SHININESS, fRGBA[16]);
565 }
566
567 glEnable(GL_BLEND);
568 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
569 GLUquadric * quad = GetQuadric();
570 if (quad) {
571 glRotated(-90., 1., 0., 0.);
572 gluSphere(quad, 1., 100, 100);
573 }
574 glDisable(GL_BLEND);
575
577}
578
579////////////////////////////////////////////////////////////////////////////////
580/// Create widgets to chose colors component and its RGBA values on fGedEditor
581/// model or family it belongs to.
582
584{
585 fColorFrame = this;
586
589
591
593
594 //apply button creation
598 fColorApplyButton->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
599 //apply to family button creation
600 fColorApplyFamily = new TGTextButton(fColorFrame, "Apply to family", kTBaf);
603 fColorApplyFamily->Connect("Pressed()", "TGLPShapeObjEditor", this, "DoColorButton()");
604}
@ kButton1Down
Definition: Buttons.h:17
#define GLU_OUTSIDE
Definition: GL_glu.h:203
#define GLU_FLAT
Definition: GL_glu.h:199
unsigned int GLenum
Definition: GL_glu.h:266
#define GLU_FILL
Definition: GL_glu.h:191
@ kVerticalFrame
Definition: GuiTypes.h:381
ULong_t Pixel_t
Definition: GuiTypes.h:39
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:43
const Bool_t kFALSE
Definition: RtypesCore.h:90
unsigned long ULong_t
Definition: RtypesCore.h:53
long Long_t
Definition: RtypesCore.h:52
double Double_t
Definition: RtypesCore.h:57
float Float_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassImp(name)
Definition: Rtypes.h:361
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
void Error(const char *location, const char *msgfmt,...)
@ kButtonDown
Definition: TGButton.h:54
@ kButtonDisabled
Definition: TGButton.h:56
@ kButtonUp
Definition: TGButton.h:53
EApplyButtonIds
@ kTBEndOfList
EGLEditorIdent
@ kCenterY
@ kCenterX
@ kCenterZ
@ kLHintsLeft
Definition: TGLayout.h:31
@ kLHintsCenterX
Definition: TGLayout.h:32
@ kLHintsTop
Definition: TGLayout.h:34
@ kLHintsExpandX
Definition: TGLayout.h:37
@ kScaleBoth
Definition: TGSlider.h:62
@ kSlider1
Definition: TGSlider.h:56
R__EXTERN void * gTQSender
Definition: TQObject.h:44
R__EXTERN TVirtualMutex * gROOTMutex
Definition: TROOT.h:59
#define gROOT
Definition: TROOT.h:406
char * Form(const char *fmt,...)
#define R__LOCKGUARD(mutex)
#define gVirtualX
Definition: TVirtualX.h:338
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition: TGButton.cxx:397
virtual EButtonState GetState() const
Definition: TGButton.h:112
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:187
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
Definition: TGFrame.cxx:984
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1101
virtual void DoRedraw()
Redraw the frame.
Definition: TGFrame.cxx:414
UInt_t GetHeight() const
Definition: TGFrame.h:250
UInt_t GetWidth() const
Definition: TGFrame.h:249
virtual void SetTitlePos(ETitlePos pos=kLeft)
Definition: TGFrame.h:629
GUI editor for TGLPShapeObj.
TGButton * fColorApplyFamily
void SetColorSlidersPos()
Update GUI sliders from internal data.
void CreateColorSliders()
Create GUI for setting light color.
TGCompositeFrame * fColorFrame
TGButton * fLightTypes[4]
void CreateGeoControls()
Create GUI for setting scale and position.
TGNumberEntry * fGeomData[6]
void GeoValueSet(Long_t unusedVal)
Process setting of value in edit box - activate 'Apply' button.
virtual void PShapeModified()
Shape has been modified.
~TGLPShapeObjEditor()
Destroy color editor GUI component.
void SetScale(const Double_t *scale)
Set internal scale data from 3 component 'c'.
TGLPShapeObj * fPShapeObj
TGButton * fColorApplyButton
TGLPShapeObjEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor of TGLPhysicalShape editor GUI.
void DoColorButton()
Process button action.
void DrawSphere() const
Draw local sphere reflecting current color options.
virtual void DoRedraw()
Redraw widget. Render sphere and pass to base-class.
void CreateColorControls()
Create widgets to chose colors component and its RGBA values on fGedEditor model or family it belongs...
virtual void SetPShape(TGLPhysicalShape *shape)
Shape has changed.
TGCompositeFrame * fGeoFrame
virtual void SetModel(TObject *obj)
Sets model or disables/hides viewer.
const Float_t * GetRGBA() const
void SetRGBA(const Float_t *rgba)
Set color sliders from 17 component 'rgba'.
void CreateColorRadioButtons()
Create Diffuse/Ambient/Specular/Emissive radio buttons and sub-frames.
void SetCenter(const Double_t *center)
Set internal center data from 3 component 'c'.
void DoGeoButton()
Process 'Apply' - update the viewer object from GUI.
void GetObjectData(Double_t *shift, Double_t *scale)
Extract the GUI object data, return center in 3 component 'center' scale in 3 component 'scale'.
void DoColorSlider(Int_t val)
Process slider movement.
Wrap TGLPysicalShape into TObject so that it can be edited using GED.
Definition: TGLPShapeObj.h:21
TGLViewer * fViewer
Definition: TGLPShapeObj.h:24
TGLPhysicalShape * fPShape
Definition: TGLPShapeObj.h:23
virtual void SetPShape(TGLPhysicalShape *shape)
Set the shape.
TGLPhysicalShape * fPShape
Definition: TGLPShapeRef.h:29
Concrete physical shape - a GL drawable.
void Scale(const TGLVector3 &scale)
const Float_t * Color() const
TGLVector3 GetScale() const
void SetColor(const Float_t rgba[17])
Set full color attributes - see OpenGL material documentation for full description.
TGLVertex3 GetTranslation() const
void SetColorOnFamily(const Float_t rgba[17])
Set full color attributes to all physicals sharing the same logical with this object.
void SetTranslation(const TGLVertex3 &translation)
3 component (x/y/z) vector class.
Definition: TGLUtil.h:247
3 component (x/y/z) vertex class.
Definition: TGLUtil.h:83
Double_t * Arr()
Definition: TGLUtil.h:126
const Double_t * CArr() const
Definition: TGLUtil.h:125
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...
Definition: TGLViewer.cxx:438
Bool_t MakeCurrent()
Make the gl-context current.
Definition: TGLWidget.cxx:201
static TGLWidget * Create(const TGWindow *parent, Bool_t selectInput, Bool_t shareDefault, const TGLPaintDevice *shareDevice, UInt_t width, UInt_t height)
Static constructor for creating widget with default pixel format.
Definition: TGLWidget.cxx:83
void SwapBuffers()
Swap buffers.
Definition: TGLWidget.cxx:217
virtual void SetNumber(Double_t val)
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual Double_t GetNumber() const
virtual void SetPosition(Int_t pos)
Definition: TGSlider.h:105
virtual void SetRange(Int_t min, Int_t max)
Definition: TGSlider.h:101
Int_t WidgetId() const
Definition: TGWidget.h:80
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
Definition: TGedEditor.cxx:351
virtual TVirtualPad * GetPad() const
Definition: TGedEditor.h:89
virtual TObject * GetModel() const
Definition: TGedEditor.h:90
TGedEditor * fGedEditor
Definition: TGedFrame.h:54
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
Definition: TGedFrame.cxx:123
Mother of all ROOT objects.
Definition: TObject.h:37
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.
Definition: TQObject.cxx:866
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Definition: TClassEdit.cxx:154
static constexpr double s