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
41 Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
42 */
43 
45 
47 std::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 
69  TEveElement(),
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 
84 const char* TEveGeoNode::GetName() const
85 {
86  return fNode->GetName();
87 }
88 
89 ////////////////////////////////////////////////////////////////////////////////
90 /// Return title, taken from geo-node. Used via TObject.
91 
92 const char* TEveGeoNode::GetTitle() const
93 {
94  return fNode->GetTitle();
95 }
96 
97 ////////////////////////////////////////////////////////////////////////////////
98 /// Return name, taken from geo-node. Used via TEveElement.
99 
100 const char* TEveGeoNode::GetElementName() const
101 {
102  return fNode->GetName();
103 }
104 
105 ////////////////////////////////////////////////////////////////////////////////
106 /// Return title, taken from geo-node. Used via TEveElement.
107 
108 const char* TEveGeoNode::GetElementTitle() const
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 {
165  TEveElement::AddStamp(bits);
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 
273 void 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 
283 void 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 
301 void 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 
366  TEveGeoPolyShape* egps = new TEveGeoPolyShape();
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
454 A wrapper over a TGeoNode, possibly displaced with a global
455 trasformation stored in TEveElement.
456 
457 It holds a pointer to TGeoManager and controls for steering of
458 TGeoPainter, fVisOption, fVisLevel and fMaxVisNodes. They have the
459 same 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 {
475  InitMainTrans();
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 {
495  TEveElement::AddStamp(bits);
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) {
541  vgp->SetVisOption(fVisOption);
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 }
TGeoVolume::SetVisOnly
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
Definition: TGeoVolume.cxx:2238
TGeoShape.h
TEveElement::HasChildren
Bool_t HasChildren() const
Definition: TEveElement.h:171
c
#define c(i)
Definition: RSha256.hxx:101
l
auto * l
Definition: textangle.C:4
TEveGeoManagerHolder
Exception safe wrapper for setting gGeoManager.
Definition: TEveUtil.h:142
TEveElement::SetRnrSelfChildren
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children)
Set state for rendering of this element and its children.
Definition: TEveElement.cxx:1104
TEveGeoShapeExtract::SetRnrSelf
void SetRnrSelf(Bool_t r)
Definition: TEveGeoShapeExtract.h:46
TGeoShapeAssembly.h
TEveGeoTopNode::fVisOption
Int_t fVisOption
Definition: TEveGeoNode.h:96
TEveGeoShape.h
TEveGeoTopNode
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement.
Definition: TEveGeoNode.h:90
TEveElement::fRnrSelf
Bool_t fRnrSelf
Definition: TEveElement.h:92
TEveTrans::SetFromArray
void SetFromArray(const Double_t arr[16])
Set matrix from Double_t array.
Definition: TEveTrans.cxx:177
TEveGeoNode::GetNode
TGeoNode * GetNode() const
Definition: TEveGeoNode.h:54
TEveGeoShapeExtract::SetMiniFrame
void SetMiniFrame(Bool_t r)
Definition: TEveGeoShapeExtract.h:49
TEveGeoNode::SetMainTransparency
virtual void SetMainTransparency(Char_t t)
Set transparency, propagate to volume's transparency.
Definition: TEveGeoNode.cxx:209
TEveElement
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
TEveGeoNode::SaveExtract
void SaveExtract(const char *file, const char *name, Bool_t leafs_only)
Save the shape tree as TEveGeoShapeExtract.
Definition: TEveGeoNode.cxx:283
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TEveTrans
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition: TEveTrans.h:27
TEveGeoNode::ExpandIntoListTrees
virtual void ExpandIntoListTrees()
Expand children into all list-trees.
Definition: TEveGeoNode.cxx:136
TPad::SetViewer3D
virtual void SetViewer3D(TVirtualViewer3D *viewer3d)
Definition: TPad.h:356
TGeoManager::GetTopVolume
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:532
TGeoVolume::GetShape
TGeoShape * GetShape() const
Definition: TGeoVolume.h:188
TEveElement::sLTI_i
sLTI_t::iterator sLTI_i
Definition: TEveElement.h:68
TGeoManager::SetVisLevel
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
Definition: TGeoManager.cxx:2248
TEveGeoTopNode::Paint
virtual void Paint(Option_t *option="")
Paint the enclosed TGeo hierarchy with visibility level and option given in data-members.
Definition: TEveGeoNode.cxx:511
f
#define f(i)
Definition: RSha256.hxx:104
TEveGeoNode::CanEditMainColor
virtual Bool_t CanEditMainColor() const
Can edit main-color – not available for assemblies.
Definition: TEveGeoNode.cxx:176
TGeoVolume::GetNdaughters
Int_t GetNdaughters() const
Definition: TGeoVolume.h:349
Option_t
const char Option_t
Definition: RtypesCore.h:66
TEvePad.h
TEveGeoNode::ExpandIntoListTree
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Checks if child-nodes have been imported ...
Definition: TEveGeoNode.cxx:117
TEveGeoNode::UpdateNode
void UpdateNode(TGeoNode *node)
Updates all reve-browsers having the node in their contents.
Definition: TEveGeoNode.cxx:223
TEveElement::fRnrChildren
Bool_t fRnrChildren
Definition: TEveElement.h:93
TGeoShape::IsComposite
virtual Bool_t IsComposite() const
Definition: TGeoShape.h:130
TEveGeoShapeExtract::SetTrans
void SetTrans(const Double_t arr[16])
Set transformation matrix.
Definition: TEveGeoShapeExtract.cxx:80
gGeoManager
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:602
TString::Data
const char * Data() const
Definition: TString.h:369
TEveGeoNode::fgTemporaryStore
static std::list< TGeoShape * > fgTemporaryStore
Definition: TEveGeoNode.h:41
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TNamed::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
TEveElement::HasMainTrans
virtual Bool_t HasMainTrans() const
Definition: TEveElement.h:287
TEveGeoShapeExtract::SetRnrElements
void SetRnrElements(Bool_t r)
Definition: TEveGeoShapeExtract.h:47
TObject::Info
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:864
TCollection::SetOwner
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
Definition: TCollection.cxx:746
TEveGeoShapeExtract
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
Definition: TEveGeoShapeExtract.h:21
TGeoNode::GetVolume
TGeoVolume * GetVolume() const
Definition: TGeoNode.h:97
TEveTrans::Array
Double_t * Array()
Definition: TEveTrans.h:94
TEveElement::GetRnrSelf
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:256
TEveElement::fItems
sLTI_t fItems
Definition: TEveElement.h:102
Float_t
float Float_t
Definition: RtypesCore.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
TGeoVolume.h
TEveElement::SetMainColorPtr
void SetMainColorPtr(Color_t *color)
Definition: TEveElement.h:269
TVirtualGeoPainter::PaintNode
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix *global=nullptr)=0
TEveGeoNode::SetMainColor
virtual void SetMainColor(Color_t color)
Set color, propagate to volume's line color.
Definition: TEveGeoNode.cxx:184
TGeoAtt::IsVisDaughters
Bool_t IsVisDaughters() const
Definition: TGeoAtt.h:89
TGListTree
Definition: TGListTree.h:210
TObject::AppendPad
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition: TObject.cxx:107
TEveElement::AddStamp
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
Definition: TEveElement.cxx:2035
TEveGeoNode::WriteExtract
void WriteExtract(const char *name, Bool_t leafs_only)
Write the shape tree as TEveGeoShapeExtract to current directory.
Definition: TEveGeoNode.cxx:301
TColor.h
TGLScenePad
Implements VirtualViewer3D interface and fills the base-class visualization structures from pad conte...
Definition: TGLScenePad.h:26
TEveElement::fChildren
List_t fChildren
Definition: TEveElement.h:81
TEveGeoShape::GetGeoHMatrixIdentity
static TGeoHMatrix * GetGeoHMatrixIdentity()
Return static identity matrix in homogeneous representation.
Definition: TEveGeoShape.cxx:99
TEveGeoPolyShape.h
TString
Basic string class.
Definition: TString.h:136
TEveGeoNode::GetElementTitle
virtual const char * GetElementTitle() const
Return title, taken from geo-node. Used via TEveElement.
Definition: TEveGeoNode.cxx:108
TEveElement::List_i
List_t::iterator List_i
Definition: TEveElement.h:72
TGeoManager::SetTopVisible
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
Definition: TGeoManager.cxx:2193
TEveGeoTopNode::fManager
TGeoManager * fManager
Definition: TEveGeoNode.h:95
TGeoNode::GetMatrix
virtual TGeoMatrix * GetMatrix() const =0
TGeoVolume::GetGeoManager
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:171
TGeoShape::GetTransform
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:536
Color_t
short Color_t
Definition: RtypesCore.h:83
TGeoNode
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:41
TFile.h
TEveGeoTopNode::VolumeVisChanged
void VolumeVisChanged(TGeoVolume *volume)
Callback for propagating volume visibility changes.
Definition: TEveGeoNode.cxx:553
TEveTrans::SetGeoHMatrix
void SetGeoHMatrix(TGeoHMatrix &mat)
Set TGeoHMatrix mat.
Definition: TEveTrans.cxx:1019
bool
TEveGeoNode::fgCSGExportNSeg
static Int_t fgCSGExportNSeg
Definition: TEveGeoNode.h:40
TGeoCompositeShape
Class handling Boolean composition of shapes.
Definition: TGeoCompositeShape.h:28
TEveGeoTopNode::fVisLevel
Int_t fVisLevel
Definition: TEveGeoNode.h:97
TEveGeoNode::AddStamp
virtual void AddStamp(UChar_t bits)
Override from TEveElement.
Definition: TEveGeoNode.cxx:163
TGeoManager::SetPaintVolume
void SetPaintVolume(TGeoVolume *vol)
Definition: TGeoManager.h:237
TGLScenePad.h
TROOT.h
TEveGeoShapeExtract::GetElements
TList * GetElements()
Definition: TEveGeoShapeExtract.h:61
TEveGeoNode::CanEditMainTransparency
virtual Bool_t CanEditMainTransparency() const
Can edit main transparency – not available for assemblies.
Definition: TEveGeoNode.cxx:193
TGeoMatrix::GetRotationMatrix
virtual const Double_t * GetRotationMatrix() const =0
TEveGeoNode::Save
void Save(const char *file, const char *name="Extract", Bool_t leafs_only=kFALSE)
Save TEveGeoShapeExtract tree starting at this node.
Definition: TEveGeoNode.cxx:273
TEveElement::GetRnrChildren
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:257
TEveGeoNode::GetElementName
virtual const char * GetElementName() const
Return name, taken from geo-node. Used via TEveElement.
Definition: TEveGeoNode.cxx:100
TEveGeoShapeExtract::GetTrans
Double_t * GetTrans()
Definition: TEveGeoShapeExtract.h:53
TEveGeoTopNode::Draw
virtual void Draw(Option_t *option="")
Draw the top-node.
Definition: TEveGeoNode.cxx:501
TGeoManager::SetTopVolume
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
Definition: TGeoManager.cxx:3397
TEveElement::InitMainTrans
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
Definition: TEveElement.cxx:1274
TGLScene::FindLogical
virtual TGLLogicalShape * FindLogical(TObject *logid) const
Find and return logical shape identified by unique logid.
Definition: TGLScene.cxx:1107
TGeoShape
Base abstract class for all shapes.
Definition: TGeoShape.h:26
TEveGeoTopNode::UseNodeTrans
void UseNodeTrans()
Use transformation matrix from the TGeoNode.
Definition: TEveGeoNode.cxx:483
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
TGeoHMatrix
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition: TGeoMatrix.h:421
TColor
The color creation and management class.
Definition: TColor.h:19
TGeoManager::GetGeomPainter
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
Definition: TGeoManager.cxx:2685
TAttLine::GetLineColor
virtual Color_t GetLineColor() const
Return the line color.
Definition: TAttLine.h:33
TEveElement::SetMainTransparency
virtual void SetMainTransparency(Char_t t)
Set main-transparency.
Definition: TEveElement.cxx:1211
TEveGeoNode::GetMainTransparency
virtual Char_t GetMainTransparency() const
Get transparency – it is taken from the geo node.
Definition: TEveGeoNode.cxx:201
TGeoVolume::GetNodes
TObjArray * GetNodes()
Definition: TGeoVolume.h:167
TGeoVolume::Draw
virtual void Draw(Option_t *option="")
draw top volume according to option
Definition: TGeoVolume.cxx:1146
TGeoNode::VisibleDaughters
void VisibleDaughters(Bool_t vis=kTRUE)
Set visibility of the daughters (obsolete).
Definition: TGeoNode.cxx:674
TVirtualViewer3D.h
TVirtualGeoPainter::SetVisOption
virtual void SetVisOption(Int_t option=0)=0
TEveGeoTopNode::fMaxVisNodes
Int_t fMaxVisNodes
Definition: TEveGeoNode.h:98
TBuffer3D.h
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TEveGeoPolyShape
Description of TEveGeoPolyShape.
Definition: TEveGeoPolyShape.h:24
TGeoVolume::SetVisLeaves
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
Definition: TGeoVolume.cxx:2226
TEveGeoShapeExtract::SetRGBA
void SetRGBA(const Float_t arr[4])
Set RGBA color.
Definition: TEveGeoShapeExtract.cxx:89
TEveGeoTopNode::TEveGeoTopNode
TEveGeoTopNode(const TEveGeoTopNode &)
TEveElement::AddElement
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Definition: TEveElement.cxx:1324
TEveElement::ExpandIntoListTree
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Populates parent with elements.
Definition: TEveElement.cxx:729
TGeoCompositeShape.h
TPad::GetListOfPrimitives
TList * GetListOfPrimitives() const
Definition: TPad.h:239
TEveTrans.h
TEvePadHolder
Exception safe wrapper for setting gPad.
Definition: TEveUtil.h:126
TGeoVolume::SetTransparency
void SetTransparency(Char_t transparency=0)
Definition: TGeoVolume.h:217
TGeoVolume::IsAssembly
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Definition: TGeoVolume.cxx:1705
TGeoNode::IsVisDaughters
Bool_t IsVisDaughters() const
Definition: TGeoNode.h:108
TObject::Warning
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:876
TEveGeoShapeExtract::SetRnrFrame
void SetRnrFrame(Bool_t r)
Definition: TEveGeoShapeExtract.h:48
TGLFaceSet.h
TFile
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
TGeoMatrix.h
TGeoNode::SetVisibility
void SetVisibility(Bool_t vis=kTRUE)
Set visibility of the node (obsolete).
Definition: TGeoNode.cxx:663
TGeoVolume::SetVisContainers
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
Definition: TGeoVolume.cxx:2214
TGLScenePad::BeginScene
virtual void BeginScene()
Start building of the scene.
Definition: TGLScenePad.cxx:259
TEvePolygonSetProjected.h
TEveGeoNode::Draw
virtual void Draw(Option_t *option="")
Draw the object.
Definition: TEveGeoNode.cxx:262
TEveElement::StampColorSelection
void StampColorSelection()
Definition: TEveElement.h:397
TGeoManager.h
TEveElement::kCBVisibility
@ kCBVisibility
Definition: TEveElement.h:385
TEveGeoNode::DumpShapeTree
TEveGeoShapeExtract * DumpShapeTree(TEveGeoNode *geon, TEveGeoShapeExtract *parent=0, Bool_t leafs_only=kFALSE)
Export the node hierarchy into tree of TEveGeoShapeExtract objects.
Definition: TEveGeoNode.cxx:313
TEveGeoNode::SetCSGExportNSeg
static void SetCSGExportNSeg(Int_t nseg)
Sets number of segments used for CSG export.
Definition: TEveGeoNode.cxx:60
TEveGeoShapeExtract::SetRGBALine
void SetRGBALine(const Float_t arr[4])
Set RGBA color for line.
Definition: TEveGeoShapeExtract.cxx:98
TEveManager.h
TVirtualGeoPainter.h
TVirtualGeoPainter
Abstract class for geometry painters.
Definition: TVirtualGeoPainter.h:32
TEvePad
This was intended as a TPad wrapper to allow smart updates of groups of pads.
Definition: TEvePad.h:18
Double_t
double Double_t
Definition: RtypesCore.h:59
TGeoMatrix
Geometrical transformation package.
Definition: TGeoMatrix.h:41
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
TGLFaceSet
Implements a native ROOT-GL representation of an arbitrary set of polygons.
Definition: TGLFaceSet.h:23
TEveGeoNode
Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
Definition: TEveGeoNode.h:30
TEveException
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
TEveGeoShapeExtract::SetElements
void SetElements(TList *e)
Definition: TEveGeoShapeExtract.h:51
TGeoManager::SetMaxVisNodes
void SetMaxVisNodes(Int_t maxnodes=10000)
set the maximum number of visible nodes.
Definition: TGeoManager.cxx:2180
TGeoVolume::IsVisible
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:153
TEveGeoNode.h
file
Definition: file.py:1
TEveTrans::SetFrom
void SetFrom(Double_t *carr)
Definition: TEveTrans.cxx:980
TEveGeoPolyShape::SetFromFaceSet
void SetFromFaceSet(TGLFaceSet *fs)
Set data-members from a face-set.
Definition: TEveGeoPolyShape.cxx:111
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
TEveGeoNode::GetTitle
virtual const char * GetTitle() const
Return title, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:92
TObject::Write
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:795
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TEveElement::SetMainColor
virtual void SetMainColor(Color_t color)
Set main color of the element.
Definition: TEveElement.cxx:1158
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TEveGeoNode::TEveGeoNode
TEveGeoNode(const TEveGeoNode &)
TEveElement::BeginChildren
List_i BeginChildren()
Definition: TEveElement.h:166
TColor::GetColorDark
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:1945
TEveGeoNode::GetCSGExportNSeg
static Int_t GetCSGExportNSeg()
Returns number of segments used for CSG export.
Definition: TEveGeoNode.cxx:52
name
char name[80]
Definition: TGX11.cxx:110
TEveGeoNode::fNode
TGeoNode * fNode
Definition: TEveGeoNode.h:37
gPad
#define gPad
Definition: TVirtualPad.h:287
TIter
Definition: TCollection.h:233
TEveGeoShapeExtract.h
TGeoNode::IsVisible
Bool_t IsVisible() const
Definition: TGeoNode.h:107
TEveElement::EndChildren
List_i EndChildren()
Definition: TEveElement.h:167
TGLScenePad::EndScene
virtual void EndScene()
End building of the scene.
Definition: TGLScenePad.cxx:310
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TEveGeoNode::ExpandIntoListTreesRecursively
virtual void ExpandIntoListTreesRecursively()
Expand children into all list-trees recursively.
Definition: TEveGeoNode.cxx:148
TGeoVolume::SetLineColor
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TGeoVolume.cxx:2035
TEveElement::RefMainTrans
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
Definition: TEveElement.cxx:1261
TEveGeoNode::UpdateVolume
void UpdateVolume(TGeoVolume *volume)
Updates all reve-browsers having the volume in their contents.
Definition: TEveGeoNode.cxx:245
TGListTreeItem
Definition: TGListTree.h:44
TGeoMatrix::GetTranslation
virtual const Double_t * GetTranslation() const =0
Char_t
char Char_t
Definition: RtypesCore.h:33
TGeoManager
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
TEveGeoTopNode::AddStamp
virtual void AddStamp(UChar_t bits)
Revert from TEveGeoNode back to standard behaviour, that is, do not pass visibility changes to fNode ...
Definition: TEveGeoNode.cxx:493
TGeoVolume::GetTransparency
Char_t GetTransparency() const
Definition: TGeoVolume.h:187
TGeoVolume
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:49
TGeoNode.h
TEveGeoTopNode::NodeVisChanged
void NodeVisChanged(TGeoNode *node)
Callback for propagating node visibility changes.
Definition: TEveGeoNode.cxx:573
TEveGeoShapeExtract::SetShape
void SetShape(TGeoShape *s)
Definition: TEveGeoShapeExtract.h:50
TEveGeoNode::GetName
virtual const char * GetName() const
Return name, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:84
TEveGeoTopNode::VolumeColChanged
void VolumeColChanged(TGeoVolume *volume)
Callback for propagating volume parameter changes.
Definition: TEveGeoNode.cxx:563
TList
A doubly linked list.
Definition: TList.h:44
gROOT
#define gROOT
Definition: TROOT.h:406
int
TGeoShape::SetTransform
static void SetTransform(TGeoMatrix *matrix)
Set current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:544