Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TEveGeoNode.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include "TEveGeoNode.h"
13#include "TEveTrans.h"
14#include "TEveManager.h"
16
17#include "TEveGeoShape.h"
18#include "TEveGeoShapeExtract.h"
19#include "TEvePad.h"
20#include "TEveGeoPolyShape.h"
21#include "TGLScenePad.h"
22#include "TGLFaceSet.h"
23
24#include "TROOT.h"
25#include "TBuffer3D.h"
26#include "TVirtualViewer3D.h"
27#include "TColor.h"
28#include "TEnv.h"
29#include "TFile.h"
30
31#include "TGeoShape.h"
32#include "TGeoVolume.h"
33#include "TGeoNode.h"
34#include "TGeoShapeAssembly.h"
35#include "TGeoCompositeShape.h"
36#include "TGeoManager.h"
37#include "TGeoMatrix.h"
38#include "TVirtualGeoPainter.h"
39
40/** \class TEveGeoNode
41\ingroup TEve
42Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
43*/
44
45
47std::list<TGeoShape*> TEveGeoNode::fgTemporaryStore;
48
49////////////////////////////////////////////////////////////////////////////////
50/// Returns number of segments used for CSG export.
51
56
57////////////////////////////////////////////////////////////////////////////////
58/// Sets number of segments used for CSG export.
59
64
65////////////////////////////////////////////////////////////////////////////////
66/// Constructor.
67
70 TObject(),
71 fNode(node)
72{
73 // Hack!! Should use Cling to retrieve TAttLine::fLineColor offset.
74 char* l = (char*) dynamic_cast<TAttLine*>(node->GetVolume());
75 SetMainColorPtr((Color_t*)(l + sizeof(void*)));
76 SetMainTransparency(fNode->GetVolume()->GetTransparency());
77
78 SetRnrSelfChildren(fNode->IsVisible(), fNode->IsVisDaughters());
79}
80
81////////////////////////////////////////////////////////////////////////////////
82/// Return name, taken from geo-node. Used via TObject.
83
84const char* TEveGeoNode::GetName() const
85{
86 return fNode->GetName();
87}
88
89////////////////////////////////////////////////////////////////////////////////
90/// Return title, taken from geo-node. Used via TObject.
91
92const char* TEveGeoNode::GetTitle() const
93{
94 return fNode->GetTitle();
95}
96
97////////////////////////////////////////////////////////////////////////////////
98/// Return name, taken from geo-node. Used via TEveElement.
99
101{
102 return fNode->GetName();
103}
104
105////////////////////////////////////////////////////////////////////////////////
106/// Return title, taken from geo-node. Used via TEveElement.
107
109{
110 return fNode->GetTitle();
111}
112
113////////////////////////////////////////////////////////////////////////////////
114/// Checks if child-nodes have been imported ... imports them if not.
115/// Then calls TEveElement::ExpandIntoListTree.
116
118 TGListTreeItem* parent)
119{
120 if ( ! HasChildren() && fNode->GetVolume()->GetNdaughters() > 0)
121 {
122 TIter next(fNode->GetVolume()->GetNodes());
123 TGeoNode* dnode;
124 while ((dnode = (TGeoNode*) next()) != nullptr)
125 {
126 TEveGeoNode* node_re = new TEveGeoNode(dnode);
127 AddElement(node_re);
128 }
129 }
130 TEveElement::ExpandIntoListTree(ltree, parent);
131}
132
133////////////////////////////////////////////////////////////////////////////////
134/// Expand children into all list-trees.
135
137{
138 for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
139 {
140 ExpandIntoListTree(i->fTree, i->fItem);
141 }
142}
143
144////////////////////////////////////////////////////////////////////////////////
145/// Expand children into all list-trees recursively.
146/// This is useful if one wants to export extracted shapes.
147
149{
151 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
152 {
153 TEveGeoNode *egn = dynamic_cast<TEveGeoNode*>(*i);
154 if (egn)
156 }
157}
158
159////////////////////////////////////////////////////////////////////////////////
160/// Override from TEveElement.
161/// Process visibility changes and forward them to fNode.
162
164{
166 if (bits & kCBVisibility)
167 {
168 fNode->SetVisibility(fRnrSelf);
169 fNode->VisibleDaughters(fRnrChildren);
170 }
171}
172
173////////////////////////////////////////////////////////////////////////////////
174/// Can edit main-color -- not available for assemblies.
175
177{
178 return ! fNode->GetVolume()->IsAssembly();
179}
180
181////////////////////////////////////////////////////////////////////////////////
182/// Set color, propagate to volume's line color.
183
185{
187 fNode->GetVolume()->SetLineColor(color);
188}
189
190////////////////////////////////////////////////////////////////////////////////
191/// Can edit main transparency -- not available for assemblies.
192
194{
195 return ! fNode->GetVolume()->IsAssembly();
196}
197
198////////////////////////////////////////////////////////////////////////////////
199/// Get transparency -- it is taken from the geo node.
200
202{
203 return fNode->GetVolume()->GetTransparency();
204}
205
206////////////////////////////////////////////////////////////////////////////////
207/// Set transparency, propagate to volume's transparency.
208
210{
212 fNode->GetVolume()->SetTransparency(t);
213}
214
215////////////////////////////////////////////////////////////////////////////////
216/// Updates all reve-browsers having the node in their contents.
217/// All 3D-pads updated if any change found.
218///
219/// Should (could?) be optimized with some assumptions about
220/// volume/node structure (search for parent, know the same node can not
221/// reoccur on lower level once found).
222
224{
225 static const TEveException eH("TEveGeoNode::UpdateNode ");
226
227 // printf("%s node %s %p\n", eH.Data(), node->GetName(), node);
228
229 if (fNode == node)
231
232 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
233 ((TEveGeoNode*)(*i))->UpdateNode(node);
234 }
235}
236
237////////////////////////////////////////////////////////////////////////////////
238/// Updates all reve-browsers having the volume in their contents.
239/// All 3D-pads updated if any change found.
240///
241/// Should (could?) be optimized with some assumptions about
242/// volume/node structure (search for parent, know the same node can not
243/// reoccur on lower level once found).
244
246{
247 static const TEveException eH("TEveGeoNode::UpdateVolume ");
248
249 // printf("%s volume %s %p\n", eH.Data(), volume->GetName(), volume);
250
251 if(fNode->GetVolume() == volume)
253
254 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
255 ((TEveGeoNode*)(*i))->UpdateVolume(volume);
256 }
257}
258
259////////////////////////////////////////////////////////////////////////////////
260/// Draw the object.
261
263{
264 TString opt("SAME");
265 opt += option;
266 fNode->GetVolume()->Draw(opt);
267}
268
269////////////////////////////////////////////////////////////////////////////////
270/// Save TEveGeoShapeExtract tree starting at this node.
271/// This function is obsolete, use SaveExtract() instead.
272
273void TEveGeoNode::Save(const char* file, const char* name, Bool_t leafs_only)
274{
275 Warning("Save()", "This function is deprecated, use SaveExtract() instead.");
276 SaveExtract(file, name, leafs_only);
277}
278
279////////////////////////////////////////////////////////////////////////////////
280/// Save the shape tree as TEveGeoShapeExtract.
281/// File is always recreated.
282
283void TEveGeoNode::SaveExtract(const char* file, const char* name, Bool_t leafs_only)
284{
285 TEveGeoShapeExtract* gse = DumpShapeTree(this, nullptr, leafs_only);
286 if (gse)
287 {
288 TFile f(file, "RECREATE");
289 gse->Write(name);
290 f.Close();
291 }
292
293 for (std::list<TGeoShape*>::iterator i = fgTemporaryStore.begin(); i != fgTemporaryStore.end(); ++i)
294 delete *i;
295 fgTemporaryStore.clear();
296}
297
298////////////////////////////////////////////////////////////////////////////////
299/// Write the shape tree as TEveGeoShapeExtract to current directory.
300
301void TEveGeoNode::WriteExtract(const char* name, Bool_t leafs_only)
302{
303 TEveGeoShapeExtract* gse = DumpShapeTree(this, nullptr, leafs_only);
304 if (gse)
305 {
306 gse->Write(name);
307 }
308}
309
310////////////////////////////////////////////////////////////////////////////////
311/// Export the node hierarchy into tree of TEveGeoShapeExtract objects.
312
314 TEveGeoShapeExtract* parent,
315 Bool_t leafs_only)
316{
317 static const TEveException eh("TEveGeoNode::DumpShapeTree ");
318
319 TGeoNode* tnode = nullptr;
320 TGeoVolume* tvolume = nullptr;
321 TGeoShape* tshape = nullptr;
322
323 tnode = geon->GetNode();
324 if (tnode == nullptr)
325 {
326 Info(eh, "Null TGeoNode for TEveGeoNode '%s': assuming it's a holder and descending.", geon->GetName());
327 }
328 else
329 {
330 tvolume = tnode->GetVolume();
331 if (tvolume == nullptr) {
332 Warning(eh, "Null TGeoVolume for TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
333 return nullptr;
334 }
335 tshape = tvolume->GetShape();
336 if (tshape->IsComposite())
337 {
338 TEvePad pad;
339 TEvePadHolder gpad(kFALSE, &pad);
340 pad.Add(tshape);
341 TGLScenePad scene_pad(&pad);
342 pad.SetViewer3D(&scene_pad);
343
344 {
346 gGeoManager->SetPaintVolume(tvolume);
347
350
351 scene_pad.BeginScene();
352 dynamic_cast<TGeoCompositeShape*>(tshape)->PaintComposite();
353 scene_pad.EndScene();
354
356 }
357
358 pad.SetViewer3D(nullptr);
359
360 TGLFaceSet* fs = dynamic_cast<TGLFaceSet*>(scene_pad.FindLogical(tvolume));
361 if (!fs) {
362 Warning(eh, "Failed extracting CSG tesselation TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
363 return nullptr;
364 }
365
367 egps->SetFromFaceSet(fs);
368 tshape = egps;
369 fgTemporaryStore.push_back(egps);
370 }
371 }
372
373 // transformation
374 TEveTrans trans;
375 if (parent)
376 trans.SetFromArray(parent->GetTrans());
377 if (tnode)
378 {
379 TGeoMatrix *gm = tnode->GetMatrix();
380 const Double_t *rm = gm->GetRotationMatrix();
381 const Double_t *tv = gm->GetTranslation();
382 TEveTrans t;
383 t(1,1) = rm[0]; t(1,2) = rm[1]; t(1,3) = rm[2];
384 t(2,1) = rm[3]; t(2,2) = rm[4]; t(2,3) = rm[5];
385 t(3,1) = rm[6]; t(3,2) = rm[7]; t(3,3) = rm[8];
386 t(1,4) = tv[0]; t(2,4) = tv[1]; t(3,4) = tv[2];
387 trans *= t;
388 }
389
390 TEveGeoShapeExtract* gse = new TEveGeoShapeExtract(geon->GetName(), geon->GetTitle());
391 gse->SetTrans(trans.Array());
392 Int_t ci = 0;
393 Char_t transp = 0;
394 if (tvolume) {
395 ci = tvolume->GetLineColor();
396 transp = tvolume->GetTransparency();
397 }
398 TColor* c = gROOT->GetColor(ci);
399 Float_t rgba[4] = {1, 0, 0, 1.0f - transp/100.0f};
400 if (c) {
401 rgba[0] = c->GetRed();
402 rgba[1] = c->GetGreen();
403 rgba[2] = c->GetBlue();
404 }
405 gse->SetRGBA(rgba);
406 rgba[3] = 1;
407 c = gROOT->GetColor(TColor::GetColorDark(ci));
408 if (c) {
409 rgba[0] = c->GetRed();
410 rgba[1] = c->GetGreen();
411 rgba[2] = c->GetBlue();
412 }
413 gse->SetRGBALine(rgba);
414
415 // Keep default extract line color --> black.
416 Bool_t rnr = tnode ? tnode->IsVisible() : geon->GetRnrSelf();
417 Bool_t rnr_els = tnode ? tnode->IsVisDaughters() : geon->GetRnrChildren();
418 if (tvolume) {
419 rnr = rnr && tvolume->IsVisible();
420 rnr_els = rnr_els && tvolume->IsVisDaughters();
421 }
422 gse->SetRnrSelf (rnr);
423 gse->SetRnrElements(rnr_els);
424 gse->SetRnrFrame (kTRUE);
425 gse->SetMiniFrame (kTRUE);
426
427 gse->SetShape((leafs_only && geon->HasChildren()) ? nullptr : tshape);
428
429 if (geon->HasChildren())
430 {
431 TList* ele = new TList();
432 gse->SetElements(ele);
433 gse->GetElements()->SetOwner(true);
434
436 while (i != geon->EndChildren())
437 {
438 TEveGeoNode* l = dynamic_cast<TEveGeoNode*>(*i);
439 DumpShapeTree(l, gse, leafs_only);
440 ++i;
441 }
442 }
443
444 if (parent)
445 parent->GetElements()->Add(gse);
446
447 return gse;
448}
449
450
451
452/** \class TEveGeoTopNode
453\ingroup TEve
454A wrapper over a TGeoNode, possibly displaced with a global
455trasformation stored in TEveElement.
456
457It holds a pointer to TGeoManager and controls for steering of
458TGeoPainter, fVisOption, fVisLevel and fMaxVisNodes. They have the
459same meaning as in TGeoManager/TGeoPainter.
460*/
461
462
463////////////////////////////////////////////////////////////////////////////////
464/// Constructor.
465
467 Int_t visopt, Int_t vislvl, Int_t maxvisnds) :
468 TEveGeoNode (node),
469 fManager (manager),
470 fVisOption (visopt),
471 fVisLevel (vislvl),
472 fMaxVisNodes (maxvisnds)
473{
475 fRnrSelf = kTRUE; // Override back from TEveGeoNode.
476}
477
478////////////////////////////////////////////////////////////////////////////////
479/// Use transformation matrix from the TGeoNode.
480/// Warning: this is local transformation of the node!
481
483{
484 RefMainTrans().SetFrom(*fNode->GetMatrix());
485}
486
487////////////////////////////////////////////////////////////////////////////////
488/// Revert from TEveGeoNode back to standard behaviour, that is,
489/// do not pass visibility changes to fNode as they are honoured
490/// in Paint() method.
491
496
497////////////////////////////////////////////////////////////////////////////////
498/// Draw the top-node.
499
501{
502 AppendPad(option);
503}
504
505////////////////////////////////////////////////////////////////////////////////
506/// Paint the enclosed TGeo hierarchy with visibility level and
507/// option given in data-members.
508/// Uses TGeoPainter internally.
509
511{
512 if (fRnrSelf)
513 {
514 const char * gpn = gEnv->GetValue("GeomPainter.Name", "");
515 if (strncmp(gpn, "root", 4))
516 gEnv->SetValue("GeomPainter.Name", "root");
517
518 TEveGeoManagerHolder geo_holder(fManager);
519 TVirtualPad *pad = gPad;
520 gPad = nullptr;
521 TGeoVolume* top_volume = fManager->GetTopVolume();
522 if (fVisLevel > 0)
523 fManager->SetVisLevel(fVisLevel);
524 else
525 fManager->SetMaxVisNodes(fMaxVisNodes);
526 TVirtualGeoPainter* vgp = fManager->GetGeomPainter();
527 fManager->SetTopVolume(fNode->GetVolume());
528 switch (fVisOption)
529 {
530 case 0:
531 fNode->GetVolume()->SetVisContainers(kTRUE);
532 fManager->SetTopVisible(kTRUE);
533 break;
534 case 1:
535 fNode->GetVolume()->SetVisLeaves(kTRUE);
536 fManager->SetTopVisible(kFALSE);
537 break;
538 case 2:
539 fNode->GetVolume()->SetVisOnly(kTRUE);
540 break;
541 }
542 gPad = pad;
543 if(vgp != nullptr) {
545 TGeoHMatrix geomat;
546 if (HasMainTrans()) RefMainTrans().SetGeoHMatrix(geomat);
547 vgp->PaintNode(fNode, option, &geomat);
548 }
549 fManager->SetTopVolume(top_volume);
550
551 if (strncmp(gpn, "root", 4))
552 gEnv->SetValue("GeomPainter.Name", gpn);
553 }
554}
555
556////////////////////////////////////////////////////////////////////////////////
557/// Callback for propagating volume visibility changes.
558
560{
561 static const TEveException eh("TEveGeoTopNode::VolumeVisChanged ");
562 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
563 UpdateVolume(volume);
564}
565
566////////////////////////////////////////////////////////////////////////////////
567/// Callback for propagating volume parameter changes.
568
570{
571 static const TEveException eh("TEveGeoTopNode::VolumeColChanged ");
572 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
573 UpdateVolume(volume);
574}
575
576////////////////////////////////////////////////////////////////////////////////
577/// Callback for propagating node visibility changes.
578
580{
581 static const TEveException eh("TEveGeoTopNode::NodeVisChanged ");
582 printf("%s node %s %p\n", eh.Data(), node->GetName(), (void*)node);
583 UpdateNode(node);
584}
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
Definition RtypesCore.h:52
char Char_t
Character 1 byte (char).
Definition RtypesCore.h:51
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
short Color_t
Color number (short).
Definition RtypesCore.h:99
float Float_t
Float 4 bytes (float).
Definition RtypesCore.h:71
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
externTEnv * gEnv
Definition TEnv.h:170
char name[80]
Definition TGX11.cxx:148
externTGeoManager * gGeoManager
#define gROOT
Definition TROOT.h:417
#define gPad
virtual Color_t GetLineColor() const
Return the line color.
Definition TAttLine.h:36
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
static Int_t GetColorDark(Int_t color)
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children)
Set state for rendering of this element and its children.
virtual void SetMainTransparency(Char_t t)
Set main-transparency.
Bool_t fRnrChildren
Definition TEveElement.h:93
List_t fChildren
Definition TEveElement.h:81
void StampColorSelection()
sLTI_t fItems
! Set of list-tree-items.
Bool_t fRnrSelf
Definition TEveElement.h:92
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
List_i EndChildren()
Bool_t HasChildren() const
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Populates parent with elements.
virtual void SetMainColor(Color_t color)
Set main color of the element.
void SetMainColorPtr(Color_t *color)
virtual Bool_t GetRnrChildren() const
TEveElement()
Default constructor.
virtual Bool_t GetRnrSelf() const
List_i BeginChildren()
List_t::iterator List_i
Definition TEveElement.h:72
sLTI_t::iterator sLTI_i
Definition TEveElement.h:68
virtual Bool_t HasMainTrans() const
Exception class thrown by TEve classes and macros.
Definition TEveUtil.h:102
Exception safe wrapper for setting gGeoManager.
Definition TEveUtil.h:142
Bool_t CanEditMainTransparency() const override
Can edit main transparency – not available for assemblies.
void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent) override
Checks if child-nodes have been imported ... imports them if not.
TGeoNode * fNode
Definition TEveGeoNode.h:37
Bool_t CanEditMainColor() const override
Can edit main-color – not available for assemblies.
static std::list< TGeoShape * > fgTemporaryStore
!
Definition TEveGeoNode.h:41
TGeoNode * GetNode() const
Definition TEveGeoNode.h:54
void UpdateVolume(TGeoVolume *volume)
Updates all reve-browsers having the volume in their contents.
static Int_t fgCSGExportNSeg
!
Definition TEveGeoNode.h:40
TEveGeoShapeExtract * DumpShapeTree(TEveGeoNode *geon, TEveGeoShapeExtract *parent=nullptr, Bool_t leafs_only=kFALSE)
Export the node hierarchy into tree of TEveGeoShapeExtract objects.
void SetMainTransparency(Char_t t) override
Set transparency, propagate to volume's transparency.
const char * GetName() const override
Return name, taken from geo-node. Used via TObject.
void SaveExtract(const char *file, const char *name, Bool_t leafs_only)
Save the shape tree as TEveGeoShapeExtract.
void Draw(Option_t *option="") override
Draw the object.
void AddStamp(UChar_t bits) override
Override from TEveElement.
virtual void ExpandIntoListTrees()
Expand children into all list-trees.
const char * GetTitle() const override
Return title, taken from geo-node. Used via TObject.
TEveGeoNode(const TEveGeoNode &)
void WriteExtract(const char *name, Bool_t leafs_only)
Write the shape tree as TEveGeoShapeExtract to current directory.
Char_t GetMainTransparency() const override
Get transparency – it is taken from the geo node.
static Int_t GetCSGExportNSeg()
Returns number of segments used for CSG export.
void Save(const char *file, const char *name="Extract", Bool_t leafs_only=kFALSE)
Save TEveGeoShapeExtract tree starting at this node.
virtual void ExpandIntoListTreesRecursively()
Expand children into all list-trees recursively.
void UpdateNode(TGeoNode *node)
Updates all reve-browsers having the node in their contents.
const char * GetElementTitle() const override
Return title, taken from geo-node. Used via TEveElement.
const char * GetElementName() const override
Return name, taken from geo-node. Used via TEveElement.
void SetMainColor(Color_t color) override
Set color, propagate to volume's line color.
static void SetCSGExportNSeg(Int_t nseg)
Sets number of segments used for CSG export.
Description of TEveGeoPolyShape.
void SetFromFaceSet(TGLFaceSet *fs)
Set data-members from a face-set.
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
void SetShape(TGeoShape *s)
void SetMiniFrame(Bool_t r)
void SetRGBA(const Float_t arr[4])
Set RGBA color.
void SetRGBALine(const Float_t arr[4])
Set RGBA color for line.
void SetRnrElements(Bool_t r)
void SetTrans(const Double_t arr[16])
Set transformation matrix.
static TGeoHMatrix * GetGeoHMatrixIdentity()
Return static identity matrix in homogeneous representation.
void VolumeColChanged(TGeoVolume *volume)
Callback for propagating volume parameter changes.
void Paint(Option_t *option="") override
Paint the enclosed TGeo hierarchy with visibility level and option given in data-members.
void UseNodeTrans()
Use transformation matrix from the TGeoNode.
TEveGeoTopNode(const TEveGeoTopNode &)
void AddStamp(UChar_t bits) override
Revert from TEveGeoNode back to standard behaviour, that is, do not pass visibility changes to fNode ...
void NodeVisChanged(TGeoNode *node)
Callback for propagating node visibility changes.
TGeoManager * fManager
Definition TEveGeoNode.h:95
void Draw(Option_t *option="") override
Draw the top-node.
void VolumeVisChanged(TGeoVolume *volume)
Callback for propagating volume visibility changes.
Exception safe wrapper for setting gPad.
Definition TEveUtil.h:126
This was intended as a TPad wrapper to allow smart updates of groups of pads.
Definition TEvePad.h:18
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition TEveTrans.h:27
void SetGeoHMatrix(TGeoHMatrix &mat)
Set TGeoHMatrix mat.
void SetFromArray(const Double_t arr[16])
Set matrix from Double_t array.
void SetFrom(Double_t *carr)
Double_t * Array()
Definition TEveTrans.h:94
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Definition TFile.h:130
Implements a native ROOT-GL representation of an arbitrary set of polygons.
Definition TGLFaceSet.h:23
Implements VirtualViewer3D interface and fills the base-class visualization structures from pad conte...
Definition TGLScenePad.h:26
void EndScene() override
End building of the scene.
void BeginScene() override
Start building of the scene.
TGLLogicalShape * FindLogical(TObject *logid) const override
Find and return logical shape identified by unique logid.
A list tree is a widget that can contain a number of items arranged in a tree structure.
Definition TGListTree.h:197
Bool_t IsVisDaughters() const
Definition TGeoAtt.h:84
Composite shapes are Boolean combinations of two or more shape components.
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:459
The manager class for any TGeo geometry.
Definition TGeoManager.h:46
Geometrical transformation package.
Definition TGeoMatrix.h:39
virtual const Double_t * GetTranslation() const =0
virtual const Double_t * GetRotationMatrix() const =0
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
Bool_t IsVisDaughters() const
Definition TGeoNode.h:111
TGeoVolume * GetVolume() const
Definition TGeoNode.h:100
virtual TGeoMatrix * GetMatrix() const =0
Bool_t IsVisible() const
Definition TGeoNode.h:110
Base abstract class for all shapes.
Definition TGeoShape.h:25
static void SetTransform(TGeoMatrix *matrix)
Set current transformation matrix that applies to shape.
virtual Bool_t IsComposite() const
Definition TGeoShape.h:139
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
TGeoManager * GetGeoManager() const
Definition TGeoVolume.h:174
TGeoShape * GetShape() const
Definition TGeoVolume.h:191
Char_t GetTransparency() const
Definition TGeoVolume.h:370
virtual Bool_t IsVisible() const
Definition TGeoVolume.h:156
A doubly linked list.
Definition TList.h:38
void Add(TObject *obj) override
Definition TList.h:81
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:1084
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition TObject.cxx:204
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition TObject.cxx:989
TObject()
TObject constructor.
Definition TObject.h:259
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:1072
void SetViewer3D(TVirtualViewer3D *viewer3d) override
Definition TPad.h:370
void Add(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object to list of primitives with specified draw option When.
Definition TPad.cxx:419
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
Abstract class for geometry painters.
virtual void SetVisOption(Int_t option=0)=0
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix *global=nullptr)=0
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
TLine l
Definition textangle.C:4