Logo ROOT  
Reference Guide
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 "TFile.h"
29
30#include "TGeoShape.h"
31#include "TGeoVolume.h"
32#include "TGeoNode.h"
33#include "TGeoShapeAssembly.h"
34#include "TGeoCompositeShape.h"
35#include "TGeoManager.h"
36#include "TGeoMatrix.h"
37#include "TVirtualGeoPainter.h"
38
39/** \class TEveGeoNode
40\ingroup TEve
41Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
42*/
43
45
47std::list<TGeoShape*> TEveGeoNode::fgTemporaryStore;
48
49////////////////////////////////////////////////////////////////////////////////
50/// Returns number of segments used for CSG export.
51
53{
54 return fgCSGExportNSeg;
55}
56
57////////////////////////////////////////////////////////////////////////////////
58/// Sets number of segments used for CSG export.
59
61{
62 fgCSGExportNSeg = nseg;
63}
64
65////////////////////////////////////////////////////////////////////////////////
66/// Constructor.
67
70 TObject(),
71 fNode(node)
72{
73 // Hack!! Should use cint to retrieve TAttLine::fLineColor offset.
74 char* l = (char*) dynamic_cast<TAttLine*>(node->GetVolume());
75 SetMainColorPtr((Color_t*)(l + sizeof(void*)));
77
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()) != 0)
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 {
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{
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, 0, 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, 0, 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 = 0;
320 TGeoVolume* tvolume = 0;
321 TGeoShape* tshape = 0;
322
323 tnode = geon->GetNode();
324 if (tnode == 0)
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 == 0) {
332 Warning(eh, "Null TGeoVolume for TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
333 return 0;
334 }
335 tshape = tvolume->GetShape();
336 if (tshape->IsComposite())
337 {
338 TEvePad pad;
339 TEvePadHolder gpad(kFALSE, &pad);
340 pad.GetListOfPrimitives()->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(0);
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 0;
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()) ? 0 : 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
463
464////////////////////////////////////////////////////////////////////////////////
465/// Constructor.
466
468 Int_t visopt, Int_t vislvl, Int_t maxvisnds) :
469 TEveGeoNode (node),
470 fManager (manager),
471 fVisOption (visopt),
472 fVisLevel (vislvl),
473 fMaxVisNodes (maxvisnds)
474{
476 fRnrSelf = kTRUE; // Override back from TEveGeoNode.
477}
478
479////////////////////////////////////////////////////////////////////////////////
480/// Use transformation matrix from the TGeoNode.
481/// Warning: this is local transformation of the node!
482
484{
486}
487
488////////////////////////////////////////////////////////////////////////////////
489/// Revert from TEveGeoNode back to standard behaviour, that is,
490/// do not pass visibility changes to fNode as they are honoured
491/// in Paint() method.
492
494{
496}
497
498////////////////////////////////////////////////////////////////////////////////
499/// Draw the top-node.
500
502{
503 AppendPad(option);
504}
505
506////////////////////////////////////////////////////////////////////////////////
507/// Paint the enclosed TGeo hierarchy with visibility level and
508/// option given in data-members.
509/// Uses TGeoPainter internally.
510
512{
513 if (fRnrSelf)
514 {
515 TEveGeoManagerHolder geo_holder(fManager);
516 TVirtualPad *pad = gPad;
517 gPad = 0;
518 TGeoVolume* top_volume = fManager->GetTopVolume();
519 if (fVisLevel > 0)
521 else
525 switch (fVisOption)
526 {
527 case 0:
530 break;
531 case 1:
534 break;
535 case 2:
537 break;
538 }
539 gPad = pad;
540 if(vgp != 0) {
542 TGeoHMatrix geomat;
543 if (HasMainTrans()) RefMainTrans().SetGeoHMatrix(geomat);
544 vgp->PaintNode(fNode, option, &geomat);
545 }
546 fManager->SetTopVolume(top_volume);
547 }
548}
549
550////////////////////////////////////////////////////////////////////////////////
551/// Callback for propagating volume visibility changes.
552
554{
555 static const TEveException eh("TEveGeoTopNode::VolumeVisChanged ");
556 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
557 UpdateVolume(volume);
558}
559
560////////////////////////////////////////////////////////////////////////////////
561/// Callback for propagating volume parameter changes.
562
564{
565 static const TEveException eh("TEveGeoTopNode::VolumeColChanged ");
566 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
567 UpdateVolume(volume);
568}
569
570////////////////////////////////////////////////////////////////////////////////
571/// Callback for propagating node visibility changes.
572
574{
575 static const TEveException eh("TEveGeoTopNode::NodeVisChanged ");
576 printf("%s node %s %p\n", eh.Data(), node->GetName(), (void*)node);
577 UpdateNode(node);
578}
#define f(i)
Definition: RSha256.hxx:104
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:45
unsigned char UChar_t
Definition: RtypesCore.h:38
char Char_t
Definition: RtypesCore.h:33
const Bool_t kFALSE
Definition: RtypesCore.h:101
bool Bool_t
Definition: RtypesCore.h:63
double Double_t
Definition: RtypesCore.h:59
short Color_t
Definition: RtypesCore.h:92
float Float_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:100
const char Option_t
Definition: RtypesCore.h:66
#define ClassImp(name)
Definition: Rtypes.h:364
char name[80]
Definition: TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:602
#define gROOT
Definition: TROOT.h:404
#define gPad
Definition: TVirtualPad.h:288
Line Attributes class.
Definition: TAttLine.h:18
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
The color creation and management class.
Definition: TColor.h:19
static Int_t GetColorDark(Int_t color)
Static function: Returns the dark color number corresponding to n If the TColor object does not exist...
Definition: TColor.cxx:2001
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
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()
Definition: TEveElement.h:397
sLTI_t fItems
Definition: TEveElement.h:102
Bool_t fRnrSelf
Definition: TEveElement.h:92
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
List_i EndChildren()
Definition: TEveElement.h:167
Bool_t HasChildren() const
Definition: TEveElement.h:171
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)
Definition: TEveElement.h:269
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:257
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:256
List_i BeginChildren()
Definition: TEveElement.h:166
List_t::iterator List_i
Definition: TEveElement.h:72
sLTI_t::iterator sLTI_i
Definition: TEveElement.h:68
virtual Bool_t HasMainTrans() const
Definition: TEveElement.h:287
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
Exception safe wrapper for setting gGeoManager.
Definition: TEveUtil.h:142
Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
Definition: TEveGeoNode.h:30
virtual Char_t GetMainTransparency() const
Get transparency – it is taken from the geo node.
TEveGeoShapeExtract * DumpShapeTree(TEveGeoNode *geon, TEveGeoShapeExtract *parent=0, Bool_t leafs_only=kFALSE)
Export the node hierarchy into tree of TEveGeoShapeExtract objects.
virtual Bool_t CanEditMainTransparency() const
Can edit main transparency – not available for assemblies.
TGeoNode * fNode
Definition: TEveGeoNode.h:37
static std::list< TGeoShape * > fgTemporaryStore
Definition: TEveGeoNode.h:41
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Checks if child-nodes have been imported ... imports them if not.
TGeoNode * GetNode() const
Definition: TEveGeoNode.h:54
virtual void Draw(Option_t *option="")
Draw the object.
void UpdateVolume(TGeoVolume *volume)
Updates all reve-browsers having the volume in their contents.
virtual void AddStamp(UChar_t bits)
Override from TEveElement.
static Int_t fgCSGExportNSeg
Definition: TEveGeoNode.h:40
virtual void SetMainTransparency(Char_t t)
Set transparency, propagate to volume's transparency.
virtual const char * GetName() const
Return name, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:84
virtual const char * GetTitle() const
Return title, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:92
void SaveExtract(const char *file, const char *name, Bool_t leafs_only)
Save the shape tree as TEveGeoShapeExtract.
virtual Bool_t CanEditMainColor() const
Can edit main-color – not available for assemblies.
virtual void ExpandIntoListTrees()
Expand children into all list-trees.
TEveGeoNode(const TEveGeoNode &)
void WriteExtract(const char *name, Bool_t leafs_only)
Write the shape tree as TEveGeoShapeExtract to current directory.
static Int_t GetCSGExportNSeg()
Returns number of segments used for CSG export.
Definition: TEveGeoNode.cxx:52
void Save(const char *file, const char *name="Extract", Bool_t leafs_only=kFALSE)
Save TEveGeoShapeExtract tree starting at this node.
virtual void SetMainColor(Color_t color)
Set color, propagate to volume's line color.
virtual void ExpandIntoListTreesRecursively()
Expand children into all list-trees recursively.
virtual const char * GetElementTitle() const
Return title, taken from geo-node. Used via TEveElement.
void UpdateNode(TGeoNode *node)
Updates all reve-browsers having the node in their contents.
virtual const char * GetElementName() const
Return name, taken from geo-node. Used via TEveElement.
static void SetCSGExportNSeg(Int_t nseg)
Sets number of segments used for CSG export.
Definition: TEveGeoNode.cxx:60
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 SetRnrSelf(Bool_t r)
void SetTrans(const Double_t arr[16])
Set transformation matrix.
void SetElements(TList *e)
void SetRnrFrame(Bool_t r)
static TGeoHMatrix * GetGeoHMatrixIdentity()
Return static identity matrix in homogeneous representation.
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement.
Definition: TEveGeoNode.h:90
Int_t fVisOption
Definition: TEveGeoNode.h:96
virtual void Paint(Option_t *option="")
Paint the enclosed TGeo hierarchy with visibility level and option given in data-members.
void VolumeColChanged(TGeoVolume *volume)
Callback for propagating volume parameter changes.
void UseNodeTrans()
Use transformation matrix from the TGeoNode.
TEveGeoTopNode(const TEveGeoTopNode &)
void NodeVisChanged(TGeoNode *node)
Callback for propagating node visibility changes.
Int_t fMaxVisNodes
Definition: TEveGeoNode.h:98
virtual void Draw(Option_t *option="")
Draw the top-node.
TGeoManager * fManager
Definition: TEveGeoNode.h:95
void VolumeVisChanged(TGeoVolume *volume)
Callback for propagating volume visibility changes.
virtual void AddStamp(UChar_t bits)
Revert from TEveGeoNode back to standard behaviour, that is, do not pass visibility changes to fNode ...
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.
Definition: TEveTrans.cxx:1019
void SetFromArray(const Double_t arr[16])
Set matrix from Double_t array.
Definition: TEveTrans.cxx:177
void SetFrom(Double_t *carr)
Definition: TEveTrans.cxx:980
Double_t * Array()
Definition: TEveTrans.h:94
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
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
virtual void BeginScene()
Start building of the scene.
virtual void EndScene()
End building of the scene.
virtual TGLLogicalShape * FindLogical(TObject *logid) const
Find and return logical shape identified by unique logid.
Definition: TGLScene.cxx:1107
A list tree is a widget that can contain a number of items arranged in a tree structure.
Definition: TGListTree.h:195
Bool_t IsVisDaughters() const
Definition: TGeoAtt.h:89
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:421
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void SetPaintVolume(TGeoVolume *vol)
Definition: TGeoManager.h:237
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:532
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
void SetMaxVisNodes(Int_t maxnodes=10000)
set the maximum number of visible nodes.
Geometrical transformation package.
Definition: TGeoMatrix.h:41
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:41
Bool_t IsVisDaughters() const
Definition: TGeoNode.h:108
TGeoVolume * GetVolume() const
Definition: TGeoNode.h:97
virtual TGeoMatrix * GetMatrix() const =0
Bool_t IsVisible() const
Definition: TGeoNode.h:107
void SetVisibility(Bool_t vis=kTRUE)
Set visibility of the node (obsolete).
Definition: TGeoNode.cxx:663
void VisibleDaughters(Bool_t vis=kTRUE)
Set visibility of the daughters (obsolete).
Definition: TGeoNode.cxx:674
Base abstract class for all shapes.
Definition: TGeoShape.h:26
static void SetTransform(TGeoMatrix *matrix)
Set current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:544
virtual Bool_t IsComposite() const
Definition: TGeoShape.h:130
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:536
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:171
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
Int_t GetNdaughters() const
Definition: TGeoVolume.h:349
TObjArray * GetNodes()
Definition: TGeoVolume.h:167
void SetTransparency(Char_t transparency=0)
Definition: TGeoVolume.h:217
TGeoShape * GetShape() const
Definition: TGeoVolume.h:188
virtual void Draw(Option_t *option="")
draw top volume according to option
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Char_t GetTransparency() const
Definition: TGeoVolume.h:187
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:153
A doubly linked list.
Definition: TList.h:44
virtual void Add(TObject *obj)
Definition: TList.h:87
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TObject.cxx:798
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:879
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition: TObject.cxx:107
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:867
void SetViewer3D(TVirtualViewer3D *viewer3d) override
Definition: TPad.h:355
TList * GetListOfPrimitives() const override
Definition: TPad.h:239
Basic string class.
Definition: TString.h:136
const char * Data() const
Definition: TString.h:369
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
Definition: file.py:1
auto * l
Definition: textangle.C:4