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
46
48std::list<TGeoShape*> TEveGeoNode::fgTemporaryStore;
49
50////////////////////////////////////////////////////////////////////////////////
51/// Returns number of segments used for CSG export.
52
54{
55 return fgCSGExportNSeg;
56}
57
58////////////////////////////////////////////////////////////////////////////////
59/// Sets number of segments used for CSG export.
60
62{
63 fgCSGExportNSeg = nseg;
64}
65
66////////////////////////////////////////////////////////////////////////////////
67/// Constructor.
68
71 TObject(),
72 fNode(node)
73{
74 // Hack!! Should use cint to retrieve TAttLine::fLineColor offset.
75 char* l = (char*) dynamic_cast<TAttLine*>(node->GetVolume());
76 SetMainColorPtr((Color_t*)(l + sizeof(void*)));
78
80}
81
82////////////////////////////////////////////////////////////////////////////////
83/// Return name, taken from geo-node. Used via TObject.
84
85const char* TEveGeoNode::GetName() const
86{
87 return fNode->GetName();
88}
89
90////////////////////////////////////////////////////////////////////////////////
91/// Return title, taken from geo-node. Used via TObject.
92
93const char* TEveGeoNode::GetTitle() const
94{
95 return fNode->GetTitle();
96}
97
98////////////////////////////////////////////////////////////////////////////////
99/// Return name, taken from geo-node. Used via TEveElement.
100
102{
103 return fNode->GetName();
104}
105
106////////////////////////////////////////////////////////////////////////////////
107/// Return title, taken from geo-node. Used via TEveElement.
108
110{
111 return fNode->GetTitle();
112}
113
114////////////////////////////////////////////////////////////////////////////////
115/// Checks if child-nodes have been imported ... imports them if not.
116/// Then calls TEveElement::ExpandIntoListTree.
117
119 TGListTreeItem* parent)
120{
121 if ( ! HasChildren() && fNode->GetVolume()->GetNdaughters() > 0)
122 {
123 TIter next(fNode->GetVolume()->GetNodes());
124 TGeoNode* dnode;
125 while ((dnode = (TGeoNode*) next()) != nullptr)
126 {
127 TEveGeoNode* node_re = new TEveGeoNode(dnode);
128 AddElement(node_re);
129 }
130 }
131 TEveElement::ExpandIntoListTree(ltree, parent);
132}
133
134////////////////////////////////////////////////////////////////////////////////
135/// Expand children into all list-trees.
136
138{
139 for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
140 {
141 ExpandIntoListTree(i->fTree, i->fItem);
142 }
143}
144
145////////////////////////////////////////////////////////////////////////////////
146/// Expand children into all list-trees recursively.
147/// This is useful if one wants to export extracted shapes.
148
150{
152 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
153 {
154 TEveGeoNode *egn = dynamic_cast<TEveGeoNode*>(*i);
155 if (egn)
157 }
158}
159
160////////////////////////////////////////////////////////////////////////////////
161/// Override from TEveElement.
162/// Process visibility changes and forward them to fNode.
163
165{
167 if (bits & kCBVisibility)
168 {
171 }
172}
173
174////////////////////////////////////////////////////////////////////////////////
175/// Can edit main-color -- not available for assemblies.
176
178{
179 return ! fNode->GetVolume()->IsAssembly();
180}
181
182////////////////////////////////////////////////////////////////////////////////
183/// Set color, propagate to volume's line color.
184
186{
188 fNode->GetVolume()->SetLineColor(color);
189}
190
191////////////////////////////////////////////////////////////////////////////////
192/// Can edit main transparency -- not available for assemblies.
193
195{
196 return ! fNode->GetVolume()->IsAssembly();
197}
198
199////////////////////////////////////////////////////////////////////////////////
200/// Get transparency -- it is taken from the geo node.
201
203{
204 return fNode->GetVolume()->GetTransparency();
205}
206
207////////////////////////////////////////////////////////////////////////////////
208/// Set transparency, propagate to volume's transparency.
209
211{
214}
215
216////////////////////////////////////////////////////////////////////////////////
217/// Updates all reve-browsers having the node in their contents.
218/// All 3D-pads updated if any change found.
219///
220/// Should (could?) be optimized with some assumptions about
221/// volume/node structure (search for parent, know the same node can not
222/// reoccur on lower level once found).
223
225{
226 static const TEveException eH("TEveGeoNode::UpdateNode ");
227
228 // printf("%s node %s %p\n", eH.Data(), node->GetName(), node);
229
230 if (fNode == node)
232
233 for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
234 ((TEveGeoNode*)(*i))->UpdateNode(node);
235 }
236}
237
238////////////////////////////////////////////////////////////////////////////////
239/// Updates all reve-browsers having the volume in their contents.
240/// All 3D-pads updated if any change found.
241///
242/// Should (could?) be optimized with some assumptions about
243/// volume/node structure (search for parent, know the same node can not
244/// reoccur on lower level once found).
245
247{
248 static const TEveException eH("TEveGeoNode::UpdateVolume ");
249
250 // printf("%s volume %s %p\n", eH.Data(), volume->GetName(), volume);
251
252 if(fNode->GetVolume() == volume)
254
255 for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
256 ((TEveGeoNode*)(*i))->UpdateVolume(volume);
257 }
258}
259
260////////////////////////////////////////////////////////////////////////////////
261/// Draw the object.
262
264{
265 TString opt("SAME");
266 opt += option;
267 fNode->GetVolume()->Draw(opt);
268}
269
270////////////////////////////////////////////////////////////////////////////////
271/// Save TEveGeoShapeExtract tree starting at this node.
272/// This function is obsolete, use SaveExtract() instead.
273
274void TEveGeoNode::Save(const char* file, const char* name, Bool_t leafs_only)
275{
276 Warning("Save()", "This function is deprecated, use SaveExtract() instead.");
277 SaveExtract(file, name, leafs_only);
278}
279
280////////////////////////////////////////////////////////////////////////////////
281/// Save the shape tree as TEveGeoShapeExtract.
282/// File is always recreated.
283
284void TEveGeoNode::SaveExtract(const char* file, const char* name, Bool_t leafs_only)
285{
286 TEveGeoShapeExtract* gse = DumpShapeTree(this, nullptr, leafs_only);
287 if (gse)
288 {
289 TFile f(file, "RECREATE");
290 gse->Write(name);
291 f.Close();
292 }
293
294 for (std::list<TGeoShape*>::iterator i = fgTemporaryStore.begin(); i != fgTemporaryStore.end(); ++i)
295 delete *i;
296 fgTemporaryStore.clear();
297}
298
299////////////////////////////////////////////////////////////////////////////////
300/// Write the shape tree as TEveGeoShapeExtract to current directory.
301
302void TEveGeoNode::WriteExtract(const char* name, Bool_t leafs_only)
303{
304 TEveGeoShapeExtract* gse = DumpShapeTree(this, nullptr, leafs_only);
305 if (gse)
306 {
307 gse->Write(name);
308 }
309}
310
311////////////////////////////////////////////////////////////////////////////////
312/// Export the node hierarchy into tree of TEveGeoShapeExtract objects.
313
315 TEveGeoShapeExtract* parent,
316 Bool_t leafs_only)
317{
318 static const TEveException eh("TEveGeoNode::DumpShapeTree ");
319
320 TGeoNode* tnode = nullptr;
321 TGeoVolume* tvolume = nullptr;
322 TGeoShape* tshape = nullptr;
323
324 tnode = geon->GetNode();
325 if (tnode == nullptr)
326 {
327 Info(eh, "Null TGeoNode for TEveGeoNode '%s': assuming it's a holder and descending.", geon->GetName());
328 }
329 else
330 {
331 tvolume = tnode->GetVolume();
332 if (tvolume == nullptr) {
333 Warning(eh, "Null TGeoVolume for TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
334 return nullptr;
335 }
336 tshape = tvolume->GetShape();
337 if (tshape->IsComposite())
338 {
339 TEvePad pad;
340 TEvePadHolder gpad(kFALSE, &pad);
341 pad.Add(tshape);
342 TGLScenePad scene_pad(&pad);
343 pad.SetViewer3D(&scene_pad);
344
345 {
347 gGeoManager->SetPaintVolume(tvolume);
348
351
352 scene_pad.BeginScene();
353 dynamic_cast<TGeoCompositeShape*>(tshape)->PaintComposite();
354 scene_pad.EndScene();
355
357 }
358
359 pad.SetViewer3D(nullptr);
360
361 TGLFaceSet* fs = dynamic_cast<TGLFaceSet*>(scene_pad.FindLogical(tvolume));
362 if (!fs) {
363 Warning(eh, "Failed extracting CSG tesselation TEveGeoNode '%s'; skipping its sub-tree.\n", geon->GetName());
364 return nullptr;
365 }
366
368 egps->SetFromFaceSet(fs);
369 tshape = egps;
370 fgTemporaryStore.push_back(egps);
371 }
372 }
373
374 // transformation
375 TEveTrans trans;
376 if (parent)
377 trans.SetFromArray(parent->GetTrans());
378 if (tnode)
379 {
380 TGeoMatrix *gm = tnode->GetMatrix();
381 const Double_t *rm = gm->GetRotationMatrix();
382 const Double_t *tv = gm->GetTranslation();
383 TEveTrans t;
384 t(1,1) = rm[0]; t(1,2) = rm[1]; t(1,3) = rm[2];
385 t(2,1) = rm[3]; t(2,2) = rm[4]; t(2,3) = rm[5];
386 t(3,1) = rm[6]; t(3,2) = rm[7]; t(3,3) = rm[8];
387 t(1,4) = tv[0]; t(2,4) = tv[1]; t(3,4) = tv[2];
388 trans *= t;
389 }
390
391 TEveGeoShapeExtract* gse = new TEveGeoShapeExtract(geon->GetName(), geon->GetTitle());
392 gse->SetTrans(trans.Array());
393 Int_t ci = 0;
394 Char_t transp = 0;
395 if (tvolume) {
396 ci = tvolume->GetLineColor();
397 transp = tvolume->GetTransparency();
398 }
399 TColor* c = gROOT->GetColor(ci);
400 Float_t rgba[4] = {1, 0, 0, 1.0f - transp/100.0f};
401 if (c) {
402 rgba[0] = c->GetRed();
403 rgba[1] = c->GetGreen();
404 rgba[2] = c->GetBlue();
405 }
406 gse->SetRGBA(rgba);
407 rgba[3] = 1;
408 c = gROOT->GetColor(TColor::GetColorDark(ci));
409 if (c) {
410 rgba[0] = c->GetRed();
411 rgba[1] = c->GetGreen();
412 rgba[2] = c->GetBlue();
413 }
414 gse->SetRGBALine(rgba);
415
416 // Keep default extract line color --> black.
417 Bool_t rnr = tnode ? tnode->IsVisible() : geon->GetRnrSelf();
418 Bool_t rnr_els = tnode ? tnode->IsVisDaughters() : geon->GetRnrChildren();
419 if (tvolume) {
420 rnr = rnr && tvolume->IsVisible();
421 rnr_els = rnr_els && tvolume->IsVisDaughters();
422 }
423 gse->SetRnrSelf (rnr);
424 gse->SetRnrElements(rnr_els);
425 gse->SetRnrFrame (kTRUE);
426 gse->SetMiniFrame (kTRUE);
427
428 gse->SetShape((leafs_only && geon->HasChildren()) ? nullptr : tshape);
429
430 if (geon->HasChildren())
431 {
432 TList* ele = new TList();
433 gse->SetElements(ele);
434 gse->GetElements()->SetOwner(true);
435
437 while (i != geon->EndChildren())
438 {
439 TEveGeoNode* l = dynamic_cast<TEveGeoNode*>(*i);
440 DumpShapeTree(l, gse, leafs_only);
441 ++i;
442 }
443 }
444
445 if (parent)
446 parent->GetElements()->Add(gse);
447
448 return gse;
449}
450
451
452
453/** \class TEveGeoTopNode
454\ingroup TEve
455A wrapper over a TGeoNode, possibly displaced with a global
456trasformation stored in TEveElement.
457
458It holds a pointer to TGeoManager and controls for steering of
459TGeoPainter, fVisOption, fVisLevel and fMaxVisNodes. They have the
460same meaning as in TGeoManager/TGeoPainter.
461*/
462
464
465////////////////////////////////////////////////////////////////////////////////
466/// Constructor.
467
469 Int_t visopt, Int_t vislvl, Int_t maxvisnds) :
470 TEveGeoNode (node),
471 fManager (manager),
472 fVisOption (visopt),
473 fVisLevel (vislvl),
474 fMaxVisNodes (maxvisnds)
475{
477 fRnrSelf = kTRUE; // Override back from TEveGeoNode.
478}
479
480////////////////////////////////////////////////////////////////////////////////
481/// Use transformation matrix from the TGeoNode.
482/// Warning: this is local transformation of the node!
483
485{
487}
488
489////////////////////////////////////////////////////////////////////////////////
490/// Revert from TEveGeoNode back to standard behaviour, that is,
491/// do not pass visibility changes to fNode as they are honoured
492/// in Paint() method.
493
495{
497}
498
499////////////////////////////////////////////////////////////////////////////////
500/// Draw the top-node.
501
503{
505}
506
507////////////////////////////////////////////////////////////////////////////////
508/// Paint the enclosed TGeo hierarchy with visibility level and
509/// option given in data-members.
510/// Uses TGeoPainter internally.
511
513{
514 if (fRnrSelf)
515 {
516 const char * gpn = gEnv->GetValue("GeomPainter.Name", "");
517 if (strncmp(gpn, "root", 4))
518 gEnv->SetValue("GeomPainter.Name", "root");
519
520 TEveGeoManagerHolder geo_holder(fManager);
521 TVirtualPad *pad = gPad;
522 gPad = nullptr;
523 TGeoVolume* top_volume = fManager->GetTopVolume();
524 if (fVisLevel > 0)
526 else
530 switch (fVisOption)
531 {
532 case 0:
535 break;
536 case 1:
539 break;
540 case 2:
542 break;
543 }
544 gPad = pad;
545 if(vgp != nullptr) {
547 TGeoHMatrix geomat;
548 if (HasMainTrans()) RefMainTrans().SetGeoHMatrix(geomat);
549 vgp->PaintNode(fNode, option, &geomat);
550 }
551 fManager->SetTopVolume(top_volume);
552
553 if (strncmp(gpn, "root", 4))
554 gEnv->SetValue("GeomPainter.Name", gpn);
555 }
556}
557
558////////////////////////////////////////////////////////////////////////////////
559/// Callback for propagating volume visibility changes.
560
562{
563 static const TEveException eh("TEveGeoTopNode::VolumeVisChanged ");
564 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
565 UpdateVolume(volume);
566}
567
568////////////////////////////////////////////////////////////////////////////////
569/// Callback for propagating volume parameter changes.
570
572{
573 static const TEveException eh("TEveGeoTopNode::VolumeColChanged ");
574 printf("%s volume %s %p\n", eh.Data(), volume->GetName(), (void*)volume);
575 UpdateVolume(volume);
576}
577
578////////////////////////////////////////////////////////////////////////////////
579/// Callback for propagating node visibility changes.
580
582{
583 static const TEveException eh("TEveGeoTopNode::NodeVisChanged ");
584 printf("%s node %s %p\n", eh.Data(), node->GetName(), (void*)node);
585 UpdateNode(node);
586}
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:85
unsigned char UChar_t
Definition RtypesCore.h:38
char Char_t
Definition RtypesCore.h:37
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:382
R__EXTERN TEnv * gEnv
Definition TEnv.h:170
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
#define gROOT
Definition TROOT.h:406
#define gPad
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:21
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition TColor.cxx:1920
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:2130
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition TEnv.cxx:491
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
Definition TEnv.cxx:736
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()
sLTI_t fItems
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
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
Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
Definition TEveGeoNode.h:30
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.
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement.
Definition TEveGeoNode.h:90
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 ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
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:195
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:458
The manager class for any TGeo geometry.
Definition TGeoManager.h:44
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)
TGeoVolume * GetTopVolume() const
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:38
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:110
TGeoVolume * GetVolume() const
Definition TGeoNode.h:99
virtual TGeoMatrix * GetMatrix() const =0
void SetVisibility(Bool_t vis=kTRUE) override
Set visibility of the node (obsolete).
Definition TGeoNode.cxx:718
Bool_t IsVisible() const
Definition TGeoNode.h:109
void VisibleDaughters(Bool_t vis=kTRUE)
Set visibility of the daughters (obsolete).
Definition TGeoNode.cxx:731
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:130
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
void SetVisContainers(Bool_t flag=kTRUE) override
Set visibility for containers.
TGeoManager * GetGeoManager() const
Definition TGeoVolume.h:173
void SetVisOnly(Bool_t flag=kTRUE) override
Set visibility for leaves.
void Draw(Option_t *option="") override
draw top volume according to option
Int_t GetNdaughters() const
Definition TGeoVolume.h:362
TObjArray * GetNodes()
Definition TGeoVolume.h:169
void SetTransparency(Char_t transparency=0)
Definition TGeoVolume.h:376
void SetLineColor(Color_t lcolor) override
Set the line color.
TGeoShape * GetShape() const
Definition TGeoVolume.h:190
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Char_t GetTransparency() const
Definition TGeoVolume.h:369
virtual Bool_t IsVisible() const
Definition TGeoVolume.h:155
void SetVisLeaves(Bool_t flag=kTRUE) override
Set visibility for leaves.
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:47
const char * GetTitle() const override
Returns title of object.
Definition TNamed.h:48
Mother of all ROOT objects.
Definition TObject.h:41
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:991
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition TObject.cxx:202
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:898
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:979
void SetViewer3D(TVirtualViewer3D *viewer3d) override
Definition TPad.h:364
void Add(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object to list of primitives with speicified draw option When.
Definition TPad.cxx:418
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
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