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 "TEveGeoShapeExtract.h"
18#include "TEvePad.h"
19#include "TEveGeoPolyShape.h"
20#include "TGLScenePad.h"
21#include "TGLFaceSet.h"
22
23#include "TROOT.h"
24#include "TBuffer3D.h"
25#include "TVirtualViewer3D.h"
26#include "TColor.h"
27#include "TFile.h"
28
29#include "TGeoShape.h"
30#include "TGeoVolume.h"
31#include "TGeoNode.h"
32#include "TGeoShapeAssembly.h"
33#include "TGeoCompositeShape.h"
34#include "TGeoManager.h"
35#include "TGeoMatrix.h"
36#include "TVirtualGeoPainter.h"
37
38/** \class TEveGeoNode
39\ingroup TEve
40Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
41*/
42
44
46std::list<TGeoShape*> TEveGeoNode::fgTemporaryStore;
47
48////////////////////////////////////////////////////////////////////////////////
49/// Returns number of segments used for CSG export.
50
52{
53 return fgCSGExportNSeg;
54}
55
56////////////////////////////////////////////////////////////////////////////////
57/// Sets number of segments used for CSG export.
58
60{
61 fgCSGExportNSeg = nseg;
62}
63
64////////////////////////////////////////////////////////////////////////////////
65/// Constructor.
66
69 TObject(),
70 fNode(node)
71{
72 // Hack!! Should use cint to retrieve TAttLine::fLineColor offset.
73 char* l = (char*) dynamic_cast<TAttLine*>(node->GetVolume());
74 SetMainColorPtr((Color_t*)(l + sizeof(void*)));
76
78}
79
80////////////////////////////////////////////////////////////////////////////////
81/// Return name, taken from geo-node. Used via TObject.
82
83const char* TEveGeoNode::GetName() const
84{
85 return fNode->GetName();
86}
87
88////////////////////////////////////////////////////////////////////////////////
89/// Return title, taken from geo-node. Used via TObject.
90
91const char* TEveGeoNode::GetTitle() const
92{
93 return fNode->GetTitle();
94}
95
96////////////////////////////////////////////////////////////////////////////////
97/// Return name, taken from geo-node. Used via TEveElement.
98
99const char* TEveGeoNode::GetElementName() const
100{
101 return fNode->GetName();
102}
103
104////////////////////////////////////////////////////////////////////////////////
105/// Return title, taken from geo-node. Used via TEveElement.
106
108{
109 return fNode->GetTitle();
110}
111
112////////////////////////////////////////////////////////////////////////////////
113/// Checks if child-nodes have been imported ... imports them if not.
114/// Then calls TEveElement::ExpandIntoListTree.
115
117 TGListTreeItem* parent)
118{
119 if ( ! HasChildren() && fNode->GetVolume()->GetNdaughters() > 0)
120 {
121 TIter next(fNode->GetVolume()->GetNodes());
122 TGeoNode* dnode;
123 while ((dnode = (TGeoNode*) next()) != 0)
124 {
125 TEveGeoNode* node_re = new TEveGeoNode(dnode);
126 AddElement(node_re);
127 }
128 }
129 TEveElement::ExpandIntoListTree(ltree, parent);
130}
131
132////////////////////////////////////////////////////////////////////////////////
133/// Expand children into all list-trees.
134
136{
137 for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
138 {
139 ExpandIntoListTree(i->fTree, i->fItem);
140 }
141}
142
143////////////////////////////////////////////////////////////////////////////////
144/// Expand children into all list-trees recursively.
145/// This is useful if one wants to export extracted shapes.
146
148{
150 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
151 {
152 TEveGeoNode *egn = dynamic_cast<TEveGeoNode*>(*i);
153 if (egn)
155 }
156}
157
158////////////////////////////////////////////////////////////////////////////////
159/// Override from TEveElement.
160/// Process visibility changes and forward them to fNode.
161
163{
165 if (bits & kCBVisibility)
166 {
169 }
170}
171
172////////////////////////////////////////////////////////////////////////////////
173/// Can edit main-color -- not available for assemblies.
174
176{
177 return ! fNode->GetVolume()->IsAssembly();
178}
179
180////////////////////////////////////////////////////////////////////////////////
181/// Set color, propagate to volume's line color.
182
184{
186 fNode->GetVolume()->SetLineColor(color);
187}
188
189////////////////////////////////////////////////////////////////////////////////
190/// Can edit main transparency -- not available for assemblies.
191
193{
194 return ! fNode->GetVolume()->IsAssembly();
195}
196
197////////////////////////////////////////////////////////////////////////////////
198/// Get transparency -- it is taken from the geo node.
199
201{
202 return fNode->GetVolume()->GetTransparency();
203}
204
205////////////////////////////////////////////////////////////////////////////////
206/// Set transparency, propagate to volume's transparency.
207
209{
212}
213
214////////////////////////////////////////////////////////////////////////////////
215/// Updates all reve-browsers having the node in their contents.
216/// All 3D-pads updated if any change found.
217///
218/// Should (could?) be optimized with some assumptions about
219/// volume/node structure (search for parent, know the same node can not
220/// reoccur on lower level once found).
221
223{
224 static const TEveException eH("TEveGeoNode::UpdateNode ");
225
226 // printf("%s node %s %p\n", eH.Data(), node->GetName(), node);
227
228 if (fNode == node)
230
231 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
232 ((TEveGeoNode*)(*i))->UpdateNode(node);
233 }
234}
235
236////////////////////////////////////////////////////////////////////////////////
237/// Updates all reve-browsers having the volume in their contents.
238/// All 3D-pads updated if any change found.
239///
240/// Should (could?) be optimized with some assumptions about
241/// volume/node structure (search for parent, know the same node can not
242/// reoccur on lower level once found).
243
245{
246 static const TEveException eH("TEveGeoNode::UpdateVolume ");
247
248 // printf("%s volume %s %p\n", eH.Data(), volume->GetName(), volume);
249
250 if(fNode->GetVolume() == volume)
252
253 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
254 ((TEveGeoNode*)(*i))->UpdateVolume(volume);
255 }
256}
257
258////////////////////////////////////////////////////////////////////////////////
259/// Draw the object.
260
262{
263 TString opt("SAME");
264 opt += option;
265 fNode->GetVolume()->Draw(opt);
266}
267
268////////////////////////////////////////////////////////////////////////////////
269/// Save TEveGeoShapeExtract tree starting at this node.
270/// This function is obsolete, use SaveExtract() instead.
271
272void TEveGeoNode::Save(const char* file, const char* name, Bool_t leafs_only)
273{
274 Warning("Save()", "This function is deprecated, use SaveExtract() instead.");
275 SaveExtract(file, name, leafs_only);
276}
277
278////////////////////////////////////////////////////////////////////////////////
279/// Save the shape tree as TEveGeoShapeExtract.
280/// File is always recreated.
281
282void TEveGeoNode::SaveExtract(const char* file, const char* name, Bool_t leafs_only)
283{
284 TEveGeoShapeExtract* gse = DumpShapeTree(this, 0, leafs_only);
285 if (gse)
286 {
287 TFile f(file, "RECREATE");
288 gse->Write(name);
289 f.Close();
290 }
291
292 for (std::list<TGeoShape*>::iterator i = fgTemporaryStore.begin(); i != fgTemporaryStore.end(); ++i)
293 delete *i;
294 fgTemporaryStore.clear();
295}
296
297////////////////////////////////////////////////////////////////////////////////
298/// Write the shape tree as TEveGeoShapeExtract to current directory.
299
300void TEveGeoNode::WriteExtract(const char* name, Bool_t leafs_only)
301{
302 TEveGeoShapeExtract* gse = DumpShapeTree(this, 0, leafs_only);
303 if (gse)
304 {
305 gse->Write(name);
306 }
307}
308
309////////////////////////////////////////////////////////////////////////////////
310/// Export the node hierarchy into tree of TEveGeoShapeExtract objects.
311
313 TEveGeoShapeExtract* parent,
314 Bool_t leafs_only)
315{
316 static const TEveException eh("TEveGeoNode::DumpShapeTree ");
317
318 TGeoNode* tnode = 0;
319 TGeoVolume* tvolume = 0;
320 TGeoShape* tshape = 0;
321
322 tnode = geon->GetNode();
323 if (tnode == 0)
324 {
325 Info(eh, "Null TGeoNode for TEveGeoNode '%s': assuming it's a holder and descending.", geon->GetName());
326 }
327 else
328 {
329 tvolume = tnode->GetVolume();
330 if (tvolume == 0) {
331 Warning(eh, "Null TGeoVolume for TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
332 return 0;
333 }
334 tshape = tvolume->GetShape();
335 if (tshape->IsComposite())
336 {
337 TEvePad pad;
338 TEvePadHolder gpad(kFALSE, &pad);
339 pad.GetListOfPrimitives()->Add(tshape);
340 TGLScenePad scene_pad(&pad);
341 pad.SetViewer3D(&scene_pad);
342
343 {
345 gGeoManager->SetPaintVolume(tvolume);
346
349
350 scene_pad.BeginScene();
351 dynamic_cast<TGeoCompositeShape*>(tshape)->PaintComposite();
352 scene_pad.EndScene();
353
355 }
356
357 pad.SetViewer3D(0);
358
359 TGLFaceSet* fs = dynamic_cast<TGLFaceSet*>(scene_pad.FindLogical(tvolume));
360 if (!fs) {
361 Warning(eh, "Failed extracting CSG tesselation TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
362 return 0;
363 }
364
366 egps->SetFromFaceSet(fs);
367 tshape = egps;
368 fgTemporaryStore.push_back(egps);
369 }
370 }
371
372 // transformation
373 TEveTrans trans;
374 if (parent)
375 trans.SetFromArray(parent->GetTrans());
376 if (tnode)
377 {
378 TGeoMatrix *gm = tnode->GetMatrix();
379 const Double_t *rm = gm->GetRotationMatrix();
380 const Double_t *tv = gm->GetTranslation();
381 TEveTrans t;
382 t(1,1) = rm[0]; t(1,2) = rm[1]; t(1,3) = rm[2];
383 t(2,1) = rm[3]; t(2,2) = rm[4]; t(2,3) = rm[5];
384 t(3,1) = rm[6]; t(3,2) = rm[7]; t(3,3) = rm[8];
385 t(1,4) = tv[0]; t(2,4) = tv[1]; t(3,4) = tv[2];
386 trans *= t;
387 }
388
389 TEveGeoShapeExtract* gse = new TEveGeoShapeExtract(geon->GetName(), geon->GetTitle());
390 gse->SetTrans(trans.Array());
391 Int_t ci = 0;
392 Char_t transp = 0;
393 if (tvolume) {
394 ci = tvolume->GetLineColor();
395 transp = tvolume->GetTransparency();
396 }
397 TColor* c = gROOT->GetColor(ci);
398 Float_t rgba[4] = {1, 0, 0, 1.0f - transp/100.0f};
399 if (c) {
400 rgba[0] = c->GetRed();
401 rgba[1] = c->GetGreen();
402 rgba[2] = c->GetBlue();
403 }
404 gse->SetRGBA(rgba);
405 rgba[3] = 1;
406 c = gROOT->GetColor(TColor::GetColorDark(ci));
407 if (c) {
408 rgba[0] = c->GetRed();
409 rgba[1] = c->GetGreen();
410 rgba[2] = c->GetBlue();
411 }
412 gse->SetRGBALine(rgba);
413
414 // Keep default extract line color --> black.
415 Bool_t rnr = tnode ? tnode->IsVisible() : geon->GetRnrSelf();
416 Bool_t rnr_els = tnode ? tnode->IsVisDaughters() : geon->GetRnrChildren();
417 if (tvolume) {
418 rnr = rnr && tvolume->IsVisible();
419 rnr_els = rnr_els && tvolume->IsVisDaughters();
420 }
421 gse->SetRnrSelf (rnr);
422 gse->SetRnrElements(rnr_els);
423 gse->SetRnrFrame (kTRUE);
424 gse->SetMiniFrame (kTRUE);
425
426 gse->SetShape((leafs_only && geon->HasChildren()) ? 0 : tshape);
427
428 if (geon->HasChildren())
429 {
430 TList* ele = new TList();
431 gse->SetElements(ele);
432 gse->GetElements()->SetOwner(true);
433
435 while (i != geon->EndChildren())
436 {
437 TEveGeoNode* l = dynamic_cast<TEveGeoNode*>(*i);
438 DumpShapeTree(l, gse, leafs_only);
439 ++i;
440 }
441 }
442
443 if (parent)
444 parent->GetElements()->Add(gse);
445
446 return gse;
447}
448
449
450
451/** \class TEveGeoTopNode
452\ingroup TEve
453A wrapper over a TGeoNode, possibly displaced with a global
454trasformation stored in TEveElement.
455
456It holds a pointer to TGeoManager and controls for steering of
457TGeoPainter, fVisOption, fVisLevel and fMaxVisNodes. They have the
458same meaning as in TGeoManager/TGeoPainter.
459*/
460
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{
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
493{
495}
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 TEveGeoManagerHolder geo_holder(fManager);
515 TVirtualPad *pad = gPad;
516 gPad = 0;
517 TGeoVolume* top_volume = fManager->GetTopVolume();
518 if (fVisLevel > 0)
520 else
524 switch (fVisOption)
525 {
526 case 0:
529 break;
530 case 1:
533 break;
534 case 2:
536 break;
537 }
538 gPad = pad;
539 if(vgp != 0) {
541 TGeoHMatrix geomat;
542 if (HasMainTrans()) RefMainTrans().SetGeoHMatrix(geomat);
543 vgp->PaintNode(fNode, option, &geomat);
544 }
545 fManager->SetTopVolume(top_volume);
546 }
547}
548
549////////////////////////////////////////////////////////////////////////////////
550/// Callback for propagating volume visibility changes.
551
553{
554 static const TEveException eh("TEveGeoTopNode::VolumeVisChanged ");
555 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
556 UpdateVolume(volume);
557}
558
559////////////////////////////////////////////////////////////////////////////////
560/// Callback for propagating volume parameter changes.
561
563{
564 static const TEveException eh("TEveGeoTopNode::VolumeColChanged ");
565 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
566 UpdateVolume(volume);
567}
568
569////////////////////////////////////////////////////////////////////////////////
570/// Callback for propagating node visibility changes.
571
573{
574 static const TEveException eh("TEveGeoTopNode::NodeVisChanged ");
575 printf("%s node %s %p\n", eh.Data(), node->GetName(), (void*)node);
576 UpdateNode(node);
577}
#define f(i)
Definition: RSha256.hxx:104
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:43
unsigned char UChar_t
Definition: RtypesCore.h:36
char Char_t
Definition: RtypesCore.h:31
const Bool_t kFALSE
Definition: RtypesCore.h:90
bool Bool_t
Definition: RtypesCore.h:61
double Double_t
Definition: RtypesCore.h:57
short Color_t
Definition: RtypesCore.h:81
float Float_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassImp(name)
Definition: Rtypes.h:361
char name[80]
Definition: TGX11.cxx:109
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:600
#define gROOT
Definition: TROOT.h:406
#define gPad
Definition: TVirtualPad.h:287
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:1948
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:34
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:91
List_t fChildren
Definition: TEveElement.h:79
void StampColorSelection()
Definition: TEveElement.h:395
sLTI_t fItems
Definition: TEveElement.h:100
Bool_t fRnrSelf
Definition: TEveElement.h:90
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
List_i EndChildren()
Definition: TEveElement.h:165
Bool_t HasChildren() const
Definition: TEveElement.h:169
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:267
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:255
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:254
List_i BeginChildren()
Definition: TEveElement.h:164
List_t::iterator List_i
Definition: TEveElement.h:70
sLTI_t::iterator sLTI_i
Definition: TEveElement.h:66
virtual Bool_t HasMainTrans() const
Definition: TEveElement.h:285
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:33
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:40
static std::list< TGeoShape * > fgTemporaryStore
Definition: TEveGeoNode.h:44
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Checks if child-nodes have been imported ... imports them if not.
TGeoNode * GetNode() const
Definition: TEveGeoNode.h:57
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:43
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:83
virtual const char * GetTitle() const
Return title, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:91
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:51
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.
Definition: TEveGeoNode.cxx:99
static void SetCSGExportNSeg(Int_t nseg)
Sets number of segments used for CSG export.
Definition: TEveGeoNode.cxx:59
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:93
Int_t fVisOption
Definition: TEveGeoNode.h:99
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:101
virtual void Draw(Option_t *option="")
Draw the top-node.
TGeoManager * fManager
Definition: TEveGeoNode.h:98
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:1020
void SetFromArray(const Double_t arr[16])
Set matrix from Double_t array.
Definition: TEveTrans.cxx:178
void SetFrom(Double_t *carr)
Definition: TEveTrans.cxx:981
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:53
Implements a native ROOT-GL representation of an arbitrary set of polygons.
Definition: TGLFaceSet.h:22
Implements VirtualViewer3D interface and fills the base-class visualization structures from pad conte...
Definition: TGLScenePad.h:25
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
Bool_t IsVisDaughters() const
Definition: TGeoAtt.h:89
Class handling Boolean composition of shapes.
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:43
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:235
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:530
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:47
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:169
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
Int_t GetNdaughters() const
Definition: TGeoVolume.h:347
TObjArray * GetNodes()
Definition: TGeoVolume.h:165
void SetTransparency(Char_t transparency=0)
Definition: TGeoVolume.h:215
TGeoShape * GetShape() const
Definition: TGeoVolume.h:186
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:185
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:151
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:796
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:877
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition: TObject.cxx:105
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:865
virtual void SetViewer3D(TVirtualViewer3D *viewer3d)
Definition: TPad.h:359
TList * GetListOfPrimitives() const
Definition: TPad.h:242
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
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