ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
40 Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
41 */
42 
44 
46 std::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 
68  TEveElement(),
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 
83 const char* TEveGeoNode::GetName() const
84 {
85  return fNode->GetName();
86 }
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Return title, taken from geo-node. Used via TObject.
90 
91 const char* TEveGeoNode::GetTitle() const
92 {
93  return fNode->GetTitle();
94 }
95 
96 ////////////////////////////////////////////////////////////////////////////////
97 /// Return name, taken from geo-node. Used via TEveElement.
98 
99 const char* TEveGeoNode::GetElementName() const
100 {
101  return fNode->GetName();
102 }
103 
104 ////////////////////////////////////////////////////////////////////////////////
105 /// Return title, taken from geo-node. Used via TEveElement.
106 
107 const char* TEveGeoNode::GetElementTitle() const
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  {
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 {
164  TEveElement::AddStamp(bits);
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 
272 void 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 
282 void 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 
300 void 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 
365  TEveGeoPolyShape* egps = new TEveGeoPolyShape();
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
453 A wrapper over a TGeoNode, possibly displaced with a global
454 trasformation stored in TEveElement.
455 
456 It holds a pointer to TGeoManager and controls for steering of
457 TGeoPainter, fVisOption, fVisLevel and fMaxVisNodes. They have the
458 same 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 {
474  InitMainTrans();
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 {
494  TEveElement::AddStamp(bits);
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) {
540  vgp->SetVisOption(fVisOption);
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 }
void SetTrans(const Double_t arr[16])
Set transformation matrix.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition: TEveTrans.h:26
virtual void AddStamp(UChar_t bits)
Revert from TEveGeoNode back to standard behaviour, that is, do not pass visibility changes to fNode ...
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:823
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:52
virtual void ExpandIntoListTrees()
Expand children into all list-trees.
sLTI_t::iterator sLTI_i
Definition: TEveElement.h:66
List_i EndChildren()
Definition: TEveElement.h:165
void VolumeColChanged(TGeoVolume *volume)
Callback for propagating volume parameter changes.
virtual TGLLogicalShape * FindLogical(TObject *logid) const
Find and return logical shape identified by unique logid.
Definition: TGLScene.cxx:1104
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Checks if child-nodes have been imported ...
void SetRGBA(const Float_t arr[4])
Set RGBA color.
static TGeoHMatrix * GetGeoHMatrixIdentity()
Return static identity matrix in homogeneous representation.
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
TGeoVolume * GetVolume() const
Definition: TGeoNode.h:106
virtual Bool_t HasMainTrans() const
Definition: TEveElement.h:285
virtual void SetMainTransparency(Char_t t)
Set transparency, propagate to volume's transparency.
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
float Float_t
Definition: RtypesCore.h:53
void SaveExtract(const char *file, const char *name, Bool_t leafs_only)
Save the shape tree as TEveGeoShapeExtract.
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
return c
const char Option_t
Definition: RtypesCore.h:62
virtual Bool_t CanEditMainTransparency() const
Can edit main transparency – not available for assemblies.
List_t fChildren
Definition: TEveElement.h:79
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:1165
void SetRnrSelf(Bool_t r)
virtual const Double_t * GetRotationMatrix() const =0
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Paint(Option_t *option="")
Paint the enclosed TGeo hierarchy with visibility level and option given in data-members.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
Bool_t fRnrChildren
Definition: TEveElement.h:91
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
Implements a native ROOT-GL representation of an arbitrary set of polygons.
Definition: TGLFaceSet.h:25
virtual void Draw(Option_t *option="")
draw top volume according to option
List_t::iterator List_i
Definition: TEveElement.h:70
Bool_t fRnrSelf
Definition: TEveElement.h:90
#define gROOT
Definition: TROOT.h:344
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
static std::list< TGeoShape * > fgTemporaryStore
Definition: TEveGeoNode.h:44
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGeoManager * fManager
Definition: TEveGeoNode.h:98
const Bool_t kFALSE
Definition: Rtypes.h:92
Float_t GetGreen() const
Definition: TColor.h:86
void WriteExtract(const char *name, Bool_t leafs_only)
Write the shape tree as TEveGeoShapeExtract to current directory.
Wrapper for TGeoNode that allows it to be shown in GUI and controlled as a TEveElement.
Definition: TEveGeoNode.h:31
Bool_t IsVisDaughters() const
Definition: TGeoNode.h:117
sLTI_t fItems
Definition: TEveElement.h:100
void UseNodeTrans()
Use transformation matrix from the TGeoNode.
void VisibleDaughters(Bool_t vis=kTRUE)
Set visibility of the daughters (obsolete).
Definition: TGeoNode.cxx:697
Int_t GetNdaughters() const
Definition: TGeoVolume.h:362
TFile * f
void SetMainColorPtr(Color_t *color)
Definition: TEveElement.h:267
virtual void SetMainColor(Color_t color)
Set color, propagate to volume's line color.
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix *global=0)=0
TObjArray * GetNodes()
Definition: TGeoVolume.h:183
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
Definition: TObject.cxx:164
void SetMiniFrame(Bool_t r)
const char * Data() const
Definition: TString.h:349
Exception safe wrapper for setting gPad.
Definition: TEveUtil.h:126
void SetShape(TGeoShape *s)
Int_t fMaxVisNodes
Definition: TEveGeoNode.h:101
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
virtual void AddStamp(UChar_t bits)
Override from TEveElement.
Description of TEveGeoPolyShape.
void Save(const char *file, const char *name="Extract", Bool_t leafs_only=kFALSE)
Save TEveGeoShapeExtract tree starting at this node.
Bool_t IsVisDaughters() const
Definition: TGeoAtt.h:97
Float_t GetBlue() const
Definition: TColor.h:87
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:255
virtual TGeoMatrix * GetMatrix() const =0
static Int_t fgCSGExportNSeg
Definition: TEveGeoNode.h:43
void SetMaxVisNodes(Int_t maxnodes=10000)
set the maximum number of visible nodes.
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Populates parent with elements.
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:254
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:499
static void SetTransform(TGeoMatrix *matrix)
Set current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:543
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:59
short Color_t
Definition: RtypesCore.h:79
void SetFrom(Double_t *carr)
Definition: TEveTrans.cxx:981
virtual void Draw(Option_t *option="")
Draw the top-node.
A doubly linked list.
Definition: TList.h:47
void SetElements(TList *e)
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement...
Definition: TEveGeoNode.h:92
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
TThread * t[5]
Definition: threadsh1.C:13
Double_t * Array()
Definition: TEveTrans.h:94
Exception safe wrapper for setting gGeoManager.
Definition: TEveUtil.h:142
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
void SetFromFaceSet(TGLFaceSet *fs)
Set data-members from a face-set.
void SetTransparency(Char_t transparency=0)
Definition: TGeoVolume.h:233
void VolumeVisChanged(TGeoVolume *volume)
Callback for propagating volume visibility changes.
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:187
Implements VirtualViewer3D interface and fills the base-class visualization structures from pad conte...
Definition: TGLScenePad.h:31
TLine * l
Definition: textangle.C:4
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
virtual void SetViewer3D(TVirtualViewer3D *viewer3d)
Definition: TPad.h:355
virtual Char_t GetMainTransparency() const
Get transparency – it is taken from the geo node.
virtual void AddElement(TEveElement *el)
Add el to the list of children.
ClassImp(TEveGeoNode)
tuple pad
Definition: first.py:38
virtual void BeginScene()
Start building of the scene.
virtual Color_t GetLineColor() const
Definition: TAttLine.h:47
virtual void Draw(Option_t *option="")
Draw the object.
virtual void SetMainColor(Color_t color)
Set main color of the element.
void StampColorSelection()
Definition: TEveElement.h:395
void SetRGBALine(const Float_t arr[4])
Set RGBA color for line.
TEveGeoShapeExtract * DumpShapeTree(TEveGeoNode *geon, TEveGeoShapeExtract *parent=0, Bool_t leafs_only=kFALSE)
Export the node hierarchy into tree of TEveGeoShapeExtract objects.
virtual void SetMainTransparency(Char_t t)
Set main-transparency.
void SetRnrFrame(Bool_t r)
virtual void SetVisOption(Int_t option=0)=0
TGeoShape * GetShape() const
Definition: TGeoVolume.h:204
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:556
tuple file
Definition: fildir.py:20
double Double_t
Definition: RtypesCore.h:55
virtual Bool_t IsComposite() const
Definition: TGeoShape.h:140
void SetPaintVolume(TGeoVolume *vol)
Definition: TGeoManager.h:216
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void NodeVisChanged(TGeoNode *node)
Callback for propagating node visibility changes.
TEveGeoNode(const TEveGeoNode &)
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
The color creation and management class.
Definition: TColor.h:47
Float_t GetRed() const
Definition: TColor.h:85
static void SetCSGExportNSeg(Int_t nseg)
Sets number of segments used for CSG export.
Definition: TEveGeoNode.cxx:59
TGeoNode * fNode
Definition: TEveGeoNode.h:40
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TEveGeoTopNode(const TEveGeoTopNode &)
#define name(a, b)
Definition: linkTestLib0.cpp:5
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:535
Mother of all ROOT objects.
Definition: TObject.h:58
virtual Bool_t CanEditMainColor() const
Can edit main-color – not available for assemblies.
This was intended as a TPad wrapper to allow smart updates of groups of pads.
Definition: TEvePad.h:17
char Char_t
Definition: RtypesCore.h:29
TList * GetListOfPrimitives() const
Definition: TPad.h:240
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
virtual void EndScene()
End building of the scene.
Bool_t HasChildren() const
Definition: TEveElement.h:169
virtual void Add(TObject *obj)
Definition: TList.h:81
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:169
List_i BeginChildren()
Definition: TEveElement.h:164
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
TGeoNode * GetNode() const
Definition: TEveGeoNode.h:57
virtual const char * GetTitle() const
Return title, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:91
void SetGeoHMatrix(TGeoHMatrix &mat)
Set TGeoHMatrix mat.
Definition: TEveTrans.cxx:1020
static Int_t GetCSGExportNSeg()
Returns number of segments used for CSG export.
Definition: TEveGeoNode.cxx:51
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children)
Set state for rendering of this element and its children.
virtual const char * GetElementTitle() const
Return title, taken from geo-node. Used via TEveElement.
#define gPad
Definition: TVirtualPad.h:288
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
virtual const char * GetName() const
Return name, taken from geo-node. Used via TObject.
Definition: TEveGeoNode.cxx:83
void SetVisibility(Bool_t vis=kTRUE)
Set visibility of the node (obsolete).
Definition: TGeoNode.cxx:686
unsigned char UChar_t
Definition: RtypesCore.h:34
Char_t GetTransparency() const
Definition: TGeoVolume.h:203
Int_t fVisOption
Definition: TEveGeoNode.h:99
Bool_t IsVisible() const
Definition: TGeoNode.h:116
void SetFromArray(const Double_t arr[16])
Set matrix from Double_t array.
Definition: TEveTrans.cxx:178
const Bool_t kTRUE
Definition: Rtypes.h:91
void SetRnrElements(Bool_t r)
virtual void ExpandIntoListTreesRecursively()
Expand children into all list-trees recursively.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
virtual const Double_t * GetTranslation() const =0
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
void UpdateVolume(TGeoVolume *volume)
Updates all reve-browsers having the volume in their contents.
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
void transp()
Definition: transp.C:17
virtual void Close(Option_t *option="")
Close a file.
Definition: TFile.cxx:898
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:904