Logo ROOT  
Reference Guide
TEveElement.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 "TEveElement.h"
13 #include "TEveCompound.h"
14 #include "TEveTrans.h"
15 #include "TEveManager.h"
16 #include "TEveSelection.h"
17 #include "TEveProjectionBases.h"
18 #include "TEveProjectionManager.h"
19 
20 #include "TBuffer3D.h"
21 #include "TBuffer3DTypes.h"
22 #include "TVirtualPad.h"
23 #include "TVirtualViewer3D.h"
24 
25 #include "TGeoMatrix.h"
26 
27 #include "TClass.h"
28 #include "TPRegexp.h"
29 #include "TROOT.h"
30 #include "TColor.h"
31 #include "TEveBrowser.h"
32 #include "TGListTree.h"
33 #include "TGPicture.h"
34 
35 #include <algorithm>
36 
37 /** \class TEveElement::TEveListTreeInfo
38 \ingroup TEve
39 Structure holding information about TGListTree and TGListTreeItem
40 that represents given TEveElement. This needed because each element
41 can appear in several list-trees as well as several times in the
42 same list-tree.
43 */
44 
46 
47 /** \class TEveElement
48 \ingroup TEve
49 Base class for TEveUtil visualization elements, providing hierarchy
50 management, rendering control and list-tree item management.
51 */
52 
54 
55 const TGPicture* TEveElement::fgRnrIcons[4] = { 0 };
56 const TGPicture* TEveElement::fgListTreeIcons[9] = { 0 };
57 
58 ////////////////////////////////////////////////////////////////////////////////
59 /// Default constructor.
60 
62  fParents (),
63  fChildren (),
64  fCompound (0),
65  fVizModel (0),
66  fVizTag (),
67  fNumChildren (0),
68  fParentIgnoreCnt (0),
69  fTopItemCnt (0),
70  fDenyDestroy (0),
71  fDestroyOnZeroRefCnt (kTRUE),
72  fRnrSelf (kTRUE),
73  fRnrChildren (kTRUE),
74  fCanEditMainColor (kFALSE),
75  fCanEditMainTransparency(kFALSE),
76  fCanEditMainTrans (kFALSE),
77  fMainTransparency (0),
78  fMainColorPtr (0),
79  fMainTrans (0),
80  fItems (),
81  fSource (),
82  fUserData (0),
83  fPickable (kFALSE),
84  fSelected (kFALSE),
85  fHighlighted (kFALSE),
86  fImpliedSelected (0),
87  fImpliedHighlighted (0),
88  fCSCBits (0),
89  fChangeBits (0),
90  fDestructing (kNone)
91 {
92 }
93 
94 ////////////////////////////////////////////////////////////////////////////////
95 /// Constructor.
96 
98  fParents (),
99  fChildren (),
100  fCompound (0),
101  fVizModel (0),
102  fVizTag (),
103  fNumChildren (0),
104  fParentIgnoreCnt (0),
105  fTopItemCnt (0),
106  fDenyDestroy (0),
107  fDestroyOnZeroRefCnt (kTRUE),
108  fRnrSelf (kTRUE),
109  fRnrChildren (kTRUE),
110  fCanEditMainColor (kFALSE),
111  fCanEditMainTransparency(kFALSE),
112  fCanEditMainTrans (kFALSE),
113  fMainTransparency (0),
114  fMainColorPtr (&main_color),
115  fMainTrans (0),
116  fItems (),
117  fSource (),
118  fUserData (0),
119  fPickable (kFALSE),
120  fSelected (kFALSE),
121  fHighlighted (kFALSE),
122  fImpliedSelected (0),
123  fImpliedHighlighted (0),
124  fCSCBits (0),
125  fChangeBits (0),
126  fDestructing (kNone)
127 {
128 }
129 
130 ////////////////////////////////////////////////////////////////////////////////
131 /// Copy constructor. Does shallow copy.
132 /// For deep-cloning and children-cloning, see:
133 /// ~~~ {.cpp}
134 /// TEveElement* CloneElementRecurse(Int_t level)
135 /// void CloneChildrenRecurse(TEveElement* dest, Int_t level)
136 /// ~~~
137 /// 'TRef fSource' is copied but 'void* UserData' is NOT.
138 /// If the element is projectable, its projections are NOT copied.
139 ///
140 /// Not implemented for most sub-classes, let us know.
141 /// Note that sub-classes of TEveProjected are NOT and will NOT be copyable.
142 
144  fParents (),
145  fChildren (),
146  fCompound (0),
147  fVizModel (0),
148  fVizTag (e.fVizTag),
149  fNumChildren (0),
150  fParentIgnoreCnt (0),
151  fTopItemCnt (0),
152  fDenyDestroy (0),
153  fDestroyOnZeroRefCnt (e.fDestroyOnZeroRefCnt),
154  fRnrSelf (e.fRnrSelf),
155  fRnrChildren (e.fRnrChildren),
156  fCanEditMainColor (e.fCanEditMainColor),
157  fCanEditMainTransparency(e.fCanEditMainTransparency),
158  fCanEditMainTrans (e.fCanEditMainTrans),
159  fMainTransparency (e.fMainTransparency),
160  fMainColorPtr (0),
161  fMainTrans (0),
162  fItems (),
163  fSource (e.fSource),
164  fUserData (0),
165  fPickable (e.fPickable),
166  fSelected (kFALSE),
167  fHighlighted (kFALSE),
168  fImpliedSelected (0),
169  fImpliedHighlighted (0),
170  fCSCBits (e.fCSCBits),
171  fChangeBits (0),
172  fDestructing (kNone)
173 {
174  SetVizModel(e.fVizModel);
175  if (e.fMainColorPtr)
176  fMainColorPtr = (Color_t*)((const char*) this + ((const char*) e.fMainColorPtr - (const char*) &e));
177  if (e.fMainTrans)
178  fMainTrans = new TEveTrans(*e.fMainTrans);
179 }
180 
181 ////////////////////////////////////////////////////////////////////////////////
182 /// Destructor. Do not call this method directly, either call Destroy() or
183 /// Annihilate(). See also DestroyElements() and AnnihilateElements() if you
184 /// need to delete all children of an element.
185 
187 {
188  if (fDestructing != kAnnihilate)
189  {
192 
193  for (List_i p=fParents.begin(); p!=fParents.end(); ++p)
194  {
195  (*p)->RemoveElementLocal(this);
196  (*p)->fChildren.remove(this);
197  --((*p)->fNumChildren);
198  }
199  }
200 
201  fParents.clear();
202 
203  for (sLTI_i i=fItems.begin(); i!=fItems.end(); ++i)
204  i->fTree->DeleteItem(i->fItem);
205 
206  delete fMainTrans;
207 }
208 
209 ////////////////////////////////////////////////////////////////////////////////
210 /// Called before the element is deleted, thus offering the last chance
211 /// to detach from acquired resources and from the framework itself.
212 /// Here the request is just passed to TEveManager.
213 /// If you override it, make sure to call base-class version.
214 
216 {
217  gEve->PreDeleteElement(this);
218 }
219 
220 ////////////////////////////////////////////////////////////////////////////////
221 /// Clone the element via copy constructor.
222 /// Should be implemented for all classes that require cloning support.
223 
225 {
226  return new TEveElement(*this);
227 }
228 
229 ////////////////////////////////////////////////////////////////////////////////
230 /// Clone elements and recurse 'level' deep over children.
231 /// - If level == 0, only the element itself is cloned (default).
232 /// - If level == -1, all the hierarchy is cloned.
233 
235 {
236  TEveElement* el = CloneElement();
237  if (level--)
238  {
239  CloneChildrenRecurse(el, level);
240  }
241  return el;
242 }
243 
244 ////////////////////////////////////////////////////////////////////////////////
245 /// Clone children and attach them to the dest element.
246 /// If level == 0, only the direct descendants are cloned (default).
247 /// If level == -1, all the hierarchy is cloned.
248 
250 {
251  for (List_ci i=fChildren.begin(); i!=fChildren.end(); ++i)
252  {
253  dest->AddElement((*i)->CloneElementRecurse(level));
254  }
255 }
256 
257 
258 //==============================================================================
259 
260 ////////////////////////////////////////////////////////////////////////////////
261 /// Virtual function for retrieving name of the element.
262 /// Here we attempt to cast the assigned object into TNamed and call
263 /// GetName() there.
264 
265 const char* TEveElement::GetElementName() const
266 {
267  static const TEveException eh("TEveElement::GetElementName ");
268 
269  TNamed* named = dynamic_cast<TNamed*>(GetObject(eh));
270  return named ? named->GetName() : "<no-name>";
271 }
272 
273 ////////////////////////////////////////////////////////////////////////////////
274 /// Virtual function for retrieving title of the render-element.
275 /// Here we attempt to cast the assigned object into TNamed and call
276 /// GetTitle() there.
277 
278 const char* TEveElement::GetElementTitle() const
279 {
280  static const TEveException eh("TEveElement::GetElementTitle ");
281 
282  TNamed* named = dynamic_cast<TNamed*>(GetObject(eh));
283  return named ? named->GetTitle() : "<no-title>";
284 }
285 
286 ////////////////////////////////////////////////////////////////////////////////
287 /// Virtual function for setting of name of an element.
288 /// Here we attempt to cast the assigned object into TNamed and call
289 /// SetName() there.
290 /// If you override this call NameTitleChanged() from there.
291 
293 {
294  static const TEveException eh("TEveElement::SetElementName ");
295 
296  TNamed* named = dynamic_cast<TNamed*>(GetObject(eh));
297  if (named) {
298  named->SetName(name);
300  }
301 }
302 
303 ////////////////////////////////////////////////////////////////////////////////
304 /// Virtual function for setting of title of an element.
305 /// Here we attempt to cast the assigned object into TNamed and call
306 /// SetTitle() there.
307 /// If you override this call NameTitleChanged() from there.
308 
309 void TEveElement::SetElementTitle(const char* title)
310 {
311  static const TEveException eh("TEveElement::SetElementTitle ");
312 
313  TNamed* named = dynamic_cast<TNamed*>(GetObject(eh));
314  if (named) {
315  named->SetTitle(title);
317  }
318 }
319 
320 ////////////////////////////////////////////////////////////////////////////////
321 /// Virtual function for setting of name and title of render element.
322 /// Here we attempt to cast the assigned object into TNamed and call
323 /// SetNameTitle() there.
324 /// If you override this call NameTitleChanged() from there.
325 
326 void TEveElement::SetElementNameTitle(const char* name, const char* title)
327 {
328  static const TEveException eh("TEveElement::SetElementNameTitle ");
329 
330  TNamed* named = dynamic_cast<TNamed*>(GetObject(eh));
331  if (named) {
332  named->SetNameTitle(name, title);
334  }
335 }
336 
337 ////////////////////////////////////////////////////////////////////////////////
338 /// Virtual function called when a name or title of the element has
339 /// been changed.
340 /// If you override this, call also the version of your direct base-class.
341 
343 {
344  // Nothing to do - list-tree-items take this info directly.
345 }
346 
347 //******************************************************************************
348 
349 ////////////////////////////////////////////////////////////////////////////////
350 /// Set visualization-parameter model element.
351 /// Calling of this function from outside of EVE should in principle
352 /// be avoided as it can lead to dis-synchronization of viz-tag and
353 /// viz-model.
354 
356 {
357  if (fVizModel) {
359  fVizModel->RemoveElement(this);
360  }
361  fVizModel = model;
362  if (fVizModel) {
363  fVizModel->AddElement(this);
365  }
366 }
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Find model element in VizDB that corresponds to previously
370 /// assigned fVizTag and set fVizModel accordingly.
371 /// If the tag is not found in VizDB, the old model-element is kept
372 /// and false is returned.
373 
375 {
377  if (model)
378  {
380  return kTRUE;
381  }
382  else
383  {
384  return kFALSE;
385  }
386 }
387 
388 ////////////////////////////////////////////////////////////////////////////////
389 /// Set the VizTag, find model-element from the VizDB and copy
390 /// visualization-parameters from it. If the model is not found and
391 /// fallback_tag is non-null, its search is attempted as well.
392 /// For example: ApplyVizTag("TPC Clusters", "Clusters");
393 ///
394 /// If the model-element can not be found a warning is printed and
395 /// false is returned.
396 
397 Bool_t TEveElement::ApplyVizTag(const TString& tag, const TString& fallback_tag)
398 {
399  SetVizTag(tag);
400  if (FindVizModel())
401  {
403  return kTRUE;
404  }
405  if ( ! fallback_tag.IsNull())
406  {
407  SetVizTag(fallback_tag);
408  if (FindVizModel())
409  {
411  return kTRUE;
412  }
413  }
414  Warning("TEveElement::ApplyVizTag", "entry for tag '%s' not found in VizDB.", tag.Data());
415  return kFALSE;
416 }
417 
418 ////////////////////////////////////////////////////////////////////////////////
419 /// Propagate visualization parameters to dependent elements.
420 ///
421 /// MainColor is propagated independently in SetMainColor().
422 /// In this case, as fMainColor is a pointer to Color_t, it should
423 /// be set in TProperClass::CopyVizParams().
424 ///
425 /// Render state is not propagated. Maybe it should be, at least optionally.
426 
428 {
429  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
430  if (pable && pable->HasProjecteds())
431  {
432  pable->PropagateVizParams();
433  }
434 }
435 
436 ////////////////////////////////////////////////////////////////////////////////
437 /// Propagate visualization parameters from element el (defaulting
438 /// to this) to all elements (children).
439 ///
440 /// The primary use of this is for model-elements from
441 /// visualization-parameter database.
442 
444 {
445  if (el == 0)
446  el = this;
447 
448  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
449  {
450  (*i)->CopyVizParams(el);
451  }
452 }
453 
454 ////////////////////////////////////////////////////////////////////////////////
455 /// Copy visualization parameters from element el.
456 /// This method needs to be overriden by any class that introduces
457 /// new parameters.
458 /// Color is copied in sub-classes which define it.
459 /// See, for example, TEvePointSet::CopyVizParams(),
460 /// TEveLine::CopyVizParams() and TEveTrack::CopyVizParams().
461 
463 {
467 
469 }
470 
471 ////////////////////////////////////////////////////////////////////////////////
472 /// Copy visualization parameters from the model-element fVizModel.
473 /// A warning is printed if the model-element fVizModel is not set.
474 
476 {
477  if (fVizModel)
478  {
480  }
481  else
482  {
483  Warning("TEveElement::CopyVizParamsFromDB", "VizModel has not been set.");
484  }
485 }
486 
487 ////////////////////////////////////////////////////////////////////////////////
488 /// Save visualization parameters for this element with given tag.
489 ///
490 /// This function creates the instantiation code, calls virtual
491 /// WriteVizParams() and, at the end, writes out the code for
492 /// registration of the model into the VizDB.
493 
494 void TEveElement::SaveVizParams(std::ostream& out, const TString& tag, const TString& var)
495 {
496  static const TEveException eh("TEveElement::GetObject ");
497 
498  TString t = " ";
499  TString cls(GetObject(eh)->ClassName());
500 
501  out << "\n";
502 
503  TString intro = " TAG='" + tag + "', CLASS='" + cls + "'";
504  out << " //" << intro << "\n";
505  out << " //" << TString('-', intro.Length()) << "\n";
506  out << t << cls << "* " << var <<" = new " << cls << ";\n";
507 
508  WriteVizParams(out, var);
509 
510  out << t << "gEve->InsertVizDBEntry(\"" << tag << "\", "<< var <<");\n";
511 }
512 
513 ////////////////////////////////////////////////////////////////////////////////
514 /// Write-out visual parameters for this object.
515 /// This is a virtual function and all sub-classes are required to
516 /// first call the base-element version.
517 /// The name of the element pointer is 'x%03d', due to cint limitations.
518 /// Three spaces should be used for indentation, same as in
519 /// SavePrimitive() methods.
520 
521 void TEveElement::WriteVizParams(std::ostream& out, const TString& var)
522 {
523  TString t = " " + var + "->";
524 
525  out << t << "SetElementName(\"" << GetElementName() << "\");\n";
526  out << t << "SetElementTitle(\"" << GetElementTitle() << "\");\n";
527  out << t << "SetEditMainColor(" << fCanEditMainColor << ");\n";
528  out << t << "SetEditMainTransparency(" << fCanEditMainTransparency << ");\n";
529  out << t << "SetMainTransparency(" << fMainTransparency << ");\n";
530 }
531 
532 ////////////////////////////////////////////////////////////////////////////////
533 /// Set visual parameters for this object for given tag.
534 
535 void TEveElement::VizDB_Apply(const char* tag)
536 {
537  if (ApplyVizTag(tag))
538  {
540  gEve->Redraw3D();
541  }
542 }
543 
544 ////////////////////////////////////////////////////////////////////////////////
545 /// Reset visual parameters for this object from VizDB.
546 /// The model object must be already set.
547 
549 {
550  if (fVizModel)
551  {
554  gEve->Redraw3D();
555  }
556 }
557 
558 ////////////////////////////////////////////////////////////////////////////////
559 /// Copy visual parameters from this element to viz-db model.
560 /// If update is set, all clients of the model will be updated to
561 /// the new value.
562 /// A warning is printed if the model-element fVizModel is not set.
563 
565 {
566  if (fVizModel)
567  {
568  fVizModel->CopyVizParams(this);
569  if (update)
570  {
572  gEve->Redraw3D();
573  }
574  }
575  else
576  {
577  Warning("VizDB_UpdateModel", "VizModel has not been set.");
578  }
579 }
580 
581 ////////////////////////////////////////////////////////////////////////////////
582 /// Create a replica of element and insert it into VizDB with given tag.
583 /// If replace is true an existing element with the same tag will be replaced.
584 /// If update is true, existing client of tag will be updated.
585 
586 void TEveElement::VizDB_Insert(const char* tag, Bool_t replace, Bool_t update)
587 {
588  static const TEveException eh("TEveElement::GetObject ");
589 
590  TClass* cls = GetObject(eh)->IsA();
591  TEveElement* el = reinterpret_cast<TEveElement*>(cls->New());
592  if (el == 0) {
593  Error("VizDB_Insert", "Creation of replica failed.");
594  return;
595  }
596  el->CopyVizParams(this);
597  Bool_t succ = gEve->InsertVizDBEntry(tag, el, replace, update);
598  if (succ && update)
599  gEve->Redraw3D();
600 }
601 
602 ////////////////////////////////////////////////////////////////////////////////
603 /// Returns the master element - that is:
604 /// - master of projectable, if this is a projected;
605 /// - master of compound, if fCompound is set;
606 /// - master of first compound parent, if kSCBTakeAnyParentAsMaster bit is set;
607 /// If non of the above is true, *this* is returned.
608 
610 {
611  TEveProjected* proj = dynamic_cast<TEveProjected*>(this);
612  if (proj)
613  {
614  return dynamic_cast<TEveElement*>(proj->GetProjectable())->GetMaster();
615  }
616  if (fCompound)
617  {
618  return fCompound->GetMaster();
619  }
621  {
622  for (List_i i = fParents.begin(); i != fParents.end(); ++i)
623  if (dynamic_cast<TEveCompound*>(*i))
624  return (*i)->GetMaster();
625  }
626  return this;
627 }
628 
629 ////////////////////////////////////////////////////////////////////////////////
630 /// Add re into the list parents.
631 ///
632 /// Adding parent is subordinate to adding an element.
633 /// This is an internal function.
634 
636 {
637  fParents.push_back(re);
638 }
639 
640 ////////////////////////////////////////////////////////////////////////////////
641 /// Remove re from the list of parents.
642 /// Removing parent is subordinate to removing an element.
643 /// This is an internal function.
644 
646 {
647  static const TEveException eh("TEveElement::RemoveParent ");
648 
649  fParents.remove(re);
651 }
652 
653 /******************************************************************************/
654 
655 ////////////////////////////////////////////////////////////////////////////////
656 /// Check external references to this and eventually auto-destruct
657 /// the render-element.
658 
660 {
661  if (fDestructing != kNone)
662  return;
663 
664  if (NumParents() <= fParentIgnoreCnt && fTopItemCnt <= 0 &&
666  {
667  if (gEve->GetUseOrphanage())
668  {
669  if (gDebug > 0)
670  Info(eh, "moving to orphanage '%s' on zero reference count.", GetElementName());
671 
673  gEve->GetOrphanage()->AddElement(this);
674  }
675  else
676  {
677  if (gDebug > 0)
678  Info(eh, "auto-destructing '%s' on zero reference count.", GetElementName());
679 
681  delete this;
682  }
683  }
684 }
685 
686 ////////////////////////////////////////////////////////////////////////////////
687 /// Collect all parents of class TEveScene. This is needed to
688 /// automatically detect which scenes need to be updated.
689 ///
690 /// Overriden in TEveScene to include itself and return.
691 
693 {
694  for (List_i p=fParents.begin(); p!=fParents.end(); ++p)
695  (*p)->CollectSceneParents(scenes);
696 }
697 
698 ////////////////////////////////////////////////////////////////////////////////
699 /// Collect scene-parents from all children. This is needed to
700 /// automatically detect which scenes need to be updated during/after
701 /// a full sub-tree update.
702 /// Argument parent specifies parent in traversed hierarchy for which we can
703 /// skip the upwards search.
704 
706  TEveElement* parent)
707 {
708  for (List_i p=fParents.begin(); p!=fParents.end(); ++p)
709  {
710  if (*p != parent) (*p)->CollectSceneParents(scenes);
711  }
712 
713  for (List_i c=fChildren.begin(); c!=fChildren.end(); ++c)
714  {
715  (*c)->CollectSceneParentsFromChildren(scenes, this);
716  }
717 }
718 
719 ////////////////////////////////////////////////////////////////////////////////
720 /// Populates parent with elements.
721 /// parent must be an already existing representation of *this*.
722 /// Returns number of inserted elements.
723 /// If parent already has children, it does nothing.
724 ///
725 /// Element can be inserted in a list-tree several times, thus we can not
726 /// search through fItems to get parent here.
727 /// Anyhow, it is probably known as it must have been selected by the user.
728 
730  TGListTreeItem* parent)
731 {
732  if (parent->GetFirstChild() != 0)
733  return;
734  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
735  (*i)->AddIntoListTree(ltree, parent);
736  }
737 }
738 
739 ////////////////////////////////////////////////////////////////////////////////
740 /// Destroy sub-tree under item 'parent' in list-tree 'ltree'.
741 
743  TGListTreeItem* parent)
744 {
745  TGListTreeItem* i = parent->GetFirstChild();
746  while (i != 0)
747  {
748  TEveElement* re = (TEveElement*) i->GetUserData();
749  i = i->GetNextSibling();
750  re->RemoveFromListTree(ltree, parent);
751  }
752 }
753 
754 ////////////////////////////////////////////////////////////////////////////////
755 /// Add this element into ltree to an already existing item
756 /// parent_lti. Children, if any, are added as below the newly created item.
757 /// Returns the newly created list-tree-item.
758 
760  TGListTreeItem* parent_lti)
761 {
762  static const TEveException eh("TEveElement::AddIntoListTree ");
763 
764  TGListTreeItem* item = new TEveListTreeItem(this);
765  ltree->AddItem(parent_lti, item);
766  fItems.insert(TEveListTreeInfo(ltree, item));
767 
768  if (parent_lti == 0)
769  ++fTopItemCnt;
770 
771  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
772  {
773  (*i)->AddIntoListTree(ltree, item);
774  }
775 
776  ltree->ClearViewPort();
777 
778  return item;
779 }
780 
781 ////////////////////////////////////////////////////////////////////////////////
782 /// Add this render element into ltree to all items belonging to
783 /// parent. Returns list-tree-item from the first register entry (but
784 /// we use a set for that so it can be anything).
785 
787  TEveElement* parent)
788 {
789  TGListTreeItem* lti = 0;
790  if (parent == 0) {
791  lti = AddIntoListTree(ltree, (TGListTreeItem*) 0);
792  } else {
793  for (sLTI_ri i = parent->fItems.rbegin(); i != parent->fItems.rend(); ++i)
794  {
795  if (i->fTree == ltree)
796  lti = AddIntoListTree(ltree, i->fItem);
797  }
798  }
799  return lti;
800 }
801 
802 ////////////////////////////////////////////////////////////////////////////////
803 /// Add this render element into all list-trees and all items
804 /// belonging to parent. Returns list-tree-item from the first
805 /// register entry (but we use a set for that so it can be anything).
806 
808 {
809  TGListTreeItem* lti = 0;
810  for (sLTI_ri i = parent->fItems.rbegin(); i != parent->fItems.rend(); ++i)
811  {
812  lti = AddIntoListTree(i->fTree, i->fItem);
813  }
814  return lti;
815 }
816 
817 ////////////////////////////////////////////////////////////////////////////////
818 /// Remove element from list-tree 'ltree' where its parent item is
819 /// 'parent_lti'.
820 /// Returns kTRUE if the item was found and removed, kFALSE
821 /// otherwise.
822 
824  TGListTreeItem* parent_lti)
825 {
826  static const TEveException eh("TEveElement::RemoveFromListTree ");
827 
828  sLTI_i i = FindItem(ltree, parent_lti);
829  if (i != fItems.end()) {
830  DestroyListSubTree(ltree, i->fItem);
831  ltree->DeleteItem(i->fItem);
832  ltree->ClearViewPort();
833  fItems.erase(i);
834  if (parent_lti == 0) {
835  --fTopItemCnt;
837  }
838  return kTRUE;
839  } else {
840  return kFALSE;
841  }
842 }
843 
844 ////////////////////////////////////////////////////////////////////////////////
845 /// Remove element from all list-trees where 'parent' is the
846 /// user-data of the parent list-tree-item.
847 
849 {
850  static const TEveException eh("TEveElement::RemoveFromListTrees ");
851 
852  Int_t count = 0;
853 
854  sLTI_i i = fItems.begin();
855  while (i != fItems.end())
856  {
857  sLTI_i j = i++;
858  TGListTreeItem *plti = j->fItem->GetParent();
859  if ((plti != 0 && (TEveElement*) plti->GetUserData() == parent) ||
860  (plti == 0 && parent == 0))
861  {
862  DestroyListSubTree(j->fTree, j->fItem);
863  j->fTree->DeleteItem(j->fItem);
864  j->fTree->ClearViewPort();
865  fItems.erase(j);
866  if (parent == 0)
867  --fTopItemCnt;
868  ++count;
869  }
870  }
871 
872  if (parent == 0 && count > 0)
874 
875  return count;
876 }
877 
878 ////////////////////////////////////////////////////////////////////////////////
879 /// Find any list-tree-item of this element in list-tree 'ltree'.
880 /// Note that each element can be placed into the same list-tree on
881 /// several postions.
882 
884 {
885  for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
886  if (i->fTree == ltree)
887  return i;
888  return fItems.end();
889 }
890 
891 ////////////////////////////////////////////////////////////////////////////////
892 /// Find list-tree-item of this element with given parent
893 /// list-tree-item.
894 
896  TGListTreeItem* parent_lti)
897 {
898  for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
899  if (i->fTree == ltree && i->fItem->GetParent() == parent_lti)
900  return i;
901  return fItems.end();
902 }
903 
904 ////////////////////////////////////////////////////////////////////////////////
905 /// Find any list-tree-item of this element in list-tree 'ltree'.
906 /// Note that each element can be placed into the same list-tree on
907 /// several postions.
908 
910 {
911  for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
912  if (i->fTree == ltree)
913  return i->fItem;
914  return 0;
915 }
916 
917 ////////////////////////////////////////////////////////////////////////////////
918 /// Find list-tree-item of this element with given parent
919 /// list-tree-item.
920 
922  TGListTreeItem* parent_lti)
923 {
924  for (sLTI_i i = fItems.begin(); i != fItems.end(); ++i)
925  if (i->fTree == ltree && i->fItem->GetParent() == parent_lti)
926  return i->fItem;
927  return 0;
928 }
929 
930 ////////////////////////////////////////////////////////////////////////////////
931 /// Get a TObject associated with this render-element.
932 /// Most cases uses double-inheritance from TEveElement and TObject
933 /// so we just do a dynamic cast here.
934 /// If some TEveElement descendant implements a different scheme,
935 /// this virtual method should be overriden accordingly.
936 
938 {
939  const TObject* obj = dynamic_cast<const TObject*>(this);
940  if (obj == 0)
941  throw(eh + "not a TObject.");
942  return const_cast<TObject*>(obj);
943 }
944 
945 ////////////////////////////////////////////////////////////////////////////////
946 /// Show GUI editor for this object.
947 /// This is forwarded to TEveManager::EditElement().
948 
950 {
951  gEve->EditElement(this);
952 }
953 
954 ////////////////////////////////////////////////////////////////////////////////
955 /// Export render-element to CINT with variable name var_name.
956 
957 void TEveElement::ExportToCINT(char* var_name)
958 {
959  const char* cname = IsA()->GetName();
960  gROOT->ProcessLine(TString::Format("%s* %s = (%s*)0x%lx;", cname, var_name, cname, (ULong_t)this));
961 }
962 
963 ////////////////////////////////////////////////////////////////////////////////
964 /// Call Dump() on source object.
965 /// Throws an exception if it is not set.
966 
968 {
969  static const TEveException eh("TEveElement::DumpSourceObject ");
970 
971  TObject *so = GetSourceObject();
972  if (!so)
973  throw eh + "source-object not set.";
974 
975  so->Dump();
976 }
977 
978 ////////////////////////////////////////////////////////////////////////////////
979 /// Call Print() on source object.
980 /// Throws an exception if it is not set.
981 
983 {
984  static const TEveException eh("TEveElement::PrintSourceObject ");
985 
986  TObject *so = GetSourceObject();
987  if (!so)
988  throw eh + "source-object not set.";
989 
990  so->Print();
991 }
992 
993 ////////////////////////////////////////////////////////////////////////////////
994 /// Export source object to CINT with given name for the variable.
995 /// Throws an exception if it is not set.
996 
997 void TEveElement::ExportSourceObjectToCINT(char* var_name) const
998 {
999  static const TEveException eh("TEveElement::ExportSourceObjectToCINT ");
1000 
1001  TObject *so = GetSourceObject();
1002  if (!so)
1003  throw eh + "source-object not set.";
1004 
1005  const char* cname = so->IsA()->GetName();
1006  gROOT->ProcessLine(TString::Format("%s* %s = (%s*)0x%lx;", cname, var_name, cname, (ULong_t)so));
1007 }
1008 
1009 ////////////////////////////////////////////////////////////////////////////////
1010 /// Paint self and/or children into currently active pad.
1011 
1013 {
1014  static const TEveException eh("TEveElement::PadPaint ");
1015 
1016  TObject* obj = 0;
1017  if (GetRnrSelf() && (obj = GetRenderObject(eh)))
1018  obj->Paint(option);
1019 
1020 
1021  if (GetRnrChildren()) {
1022  for (List_i i=BeginChildren(); i!=EndChildren(); ++i) {
1023  (*i)->PadPaint(option);
1024  }
1025  }
1026 }
1027 
1028 ////////////////////////////////////////////////////////////////////////////////
1029 /// Paint object -- a generic implementation for EVE elements.
1030 /// This supports direct rendering using a dedicated GL class.
1031 /// Override TObject::Paint() in sub-classes if different behaviour
1032 /// is required.
1033 
1035 {
1036  static const TEveException eh("TEveElement::PaintStandard ");
1037 
1039 
1040  // Section kCore
1041  buff.fID = id;
1042  buff.fColor = GetMainColor();
1044  if (HasMainTrans()) RefMainTrans().SetBuffer3D(buff);
1045 
1047 
1048  Int_t reqSections = gPad->GetViewer3D()->AddObject(buff);
1049  if (reqSections != TBuffer3D::kNone)
1050  {
1051  Warning(eh, "IsA='%s'. Viewer3D requires more sections (%d). Only direct-rendering supported.",
1052  id->ClassName(), reqSections);
1053  }
1054 }
1055 
1056 ////////////////////////////////////////////////////////////////////////////////
1057 /// Set render state of this element, i.e. if it will be published
1058 /// on next scene update pass.
1059 /// Returns true if the state has changed.
1060 
1062 {
1063  if (SingleRnrState())
1064  {
1065  return SetRnrState(rnr);
1066  }
1067 
1068  if (rnr != fRnrSelf)
1069  {
1070  fRnrSelf = rnr;
1071  StampVisibility();
1073  return kTRUE;
1074  }
1075  return kFALSE;
1076 }
1077 
1078 ////////////////////////////////////////////////////////////////////////////////
1079 /// Set render state of this element's children, i.e. if they will
1080 /// be published on next scene update pass.
1081 /// Returns true if the state has changed.
1082 
1084 {
1085  if (SingleRnrState())
1086  {
1087  return SetRnrState(rnr);
1088  }
1089 
1090  if (rnr != fRnrChildren)
1091  {
1092  fRnrChildren = rnr;
1093  StampVisibility();
1095  return kTRUE;
1096  }
1097  return kFALSE;
1098 }
1099 
1100 ////////////////////////////////////////////////////////////////////////////////
1101 /// Set state for rendering of this element and its children.
1102 /// Returns true if the state has changed.
1103 
1105 {
1106  if (SingleRnrState())
1107  {
1108  return SetRnrState(rnr_self);
1109  }
1110 
1111  if (fRnrSelf != rnr_self || fRnrChildren != rnr_children)
1112  {
1113  fRnrSelf = rnr_self;
1114  fRnrChildren = rnr_children;
1115  StampVisibility();
1117  return kTRUE;
1118  }
1119  return kFALSE;
1120 }
1121 
1122 ////////////////////////////////////////////////////////////////////////////////
1123 /// Set render state of this element and of its children to the same
1124 /// value.
1125 /// Returns true if the state has changed.
1126 
1128 {
1129  if (fRnrSelf != rnr || fRnrChildren != rnr)
1130  {
1131  fRnrSelf = fRnrChildren = rnr;
1132  StampVisibility();
1134  return kTRUE;
1135  }
1136  return kFALSE;
1137 }
1138 
1139 ////////////////////////////////////////////////////////////////////////////////
1140 /// Propagate render state to the projected replicas of this element.
1141 /// Maybe this should be optional on gEve/element level.
1142 
1144 {
1145  TEveProjectable *pable = dynamic_cast<TEveProjectable*>(this);
1146  if (pable && pable->HasProjecteds())
1147  {
1149  }
1150 }
1151 
1152 ////////////////////////////////////////////////////////////////////////////////
1153 /// Set main color of the element.
1154 ///
1155 ///
1156 /// List-tree-items are updated.
1157 
1159 {
1160  Color_t old_color = GetMainColor();
1161 
1162  if (fMainColorPtr)
1163  {
1164  *fMainColorPtr = color;
1166  }
1167 
1168  PropagateMainColorToProjecteds(color, old_color);
1169 }
1170 
1171 ////////////////////////////////////////////////////////////////////////////////
1172 /// Convert pixel to Color_t and call SetMainColor().
1173 
1175 {
1177 }
1178 
1179 ////////////////////////////////////////////////////////////////////////////////
1180 /// Convert RGB values to Color_t and call SetMainColor.
1181 
1183 {
1185 }
1186 
1187 ////////////////////////////////////////////////////////////////////////////////
1188 /// Convert RGB values to Color_t and call SetMainColor.
1189 
1191 {
1193 }
1194 
1195 ////////////////////////////////////////////////////////////////////////////////
1196 /// Propagate color to projected elements.
1197 
1199 {
1200  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
1201  if (pable && pable->HasProjecteds())
1202  {
1203  pable->PropagateMainColor(color, old_color);
1204  }
1205 }
1206 
1207 ////////////////////////////////////////////////////////////////////////////////
1208 /// Set main-transparency.
1209 /// Transparency is clamped to [0, 100].
1210 
1212 {
1213  Char_t old_t = GetMainTransparency();
1214 
1215  if (t > 100) t = 100;
1216  fMainTransparency = t;
1218 
1220 }
1221 
1222 ////////////////////////////////////////////////////////////////////////////////
1223 /// Set main-transparency via float alpha variable.
1224 /// Value of alpha is clamped t0 [0, 1].
1225 
1227 {
1228  if (alpha < 0) alpha = 0;
1229  if (alpha > 1) alpha = 1;
1230  SetMainTransparency((Char_t) (100.0f*(1.0f - alpha)));
1231 }
1232 
1233 ////////////////////////////////////////////////////////////////////////////////
1234 /// Propagate transparency to projected elements.
1235 
1237 {
1238  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
1239  if (pable && pable->HasProjecteds())
1240  {
1241  pable->PropagateMainTransparency(t, old_t);
1242  }
1243 }
1244 
1245 ////////////////////////////////////////////////////////////////////////////////
1246 /// Return pointer to main transformation. If 'create' flag is set (default)
1247 /// it is created if not yet existing.
1248 
1250 {
1251  if (!fMainTrans && create)
1252  InitMainTrans();
1253 
1254  return fMainTrans;
1255 }
1256 
1257 ////////////////////////////////////////////////////////////////////////////////
1258 /// Return reference to main transformation. It is created if not yet
1259 /// existing.
1260 
1262 {
1263  if (!fMainTrans)
1264  InitMainTrans();
1265 
1266  return *fMainTrans;
1267 }
1268 
1269 ////////////////////////////////////////////////////////////////////////////////
1270 /// Initialize the main transformation to identity matrix.
1271 /// If can_edit is true (default), the user will be able to edit the
1272 /// transformation parameters via TEveElementEditor.
1273 
1275 {
1276  if (fMainTrans)
1277  fMainTrans->UnitTrans();
1278  else
1279  fMainTrans = new TEveTrans;
1280  fCanEditMainTrans = can_edit;
1281 }
1282 
1283 ////////////////////////////////////////////////////////////////////////////////
1284 /// Destroy the main transformation matrix, it will always be taken
1285 /// as identity. Editing of transformation parameters is disabled.
1286 
1288 {
1289  delete fMainTrans;
1290  fMainTrans = 0;
1292 }
1293 
1294 ////////////////////////////////////////////////////////////////////////////////
1295 /// Set transformation matrix from column-major array.
1296 
1298 {
1299  RefMainTrans().SetFrom(carr);
1300 }
1301 
1302 ////////////////////////////////////////////////////////////////////////////////
1303 /// Set transformation matrix from TGeo's matrix.
1304 
1306 {
1307  RefMainTrans().SetFrom(mat);
1308 }
1309 
1310 ////////////////////////////////////////////////////////////////////////////////
1311 /// Check if el can be added to this element.
1312 ///
1313 /// In the base-class version we only make sure the new child is not
1314 /// equal to this.
1315 
1317 {
1318  return el != this;
1319 }
1320 
1321 ////////////////////////////////////////////////////////////////////////////////
1322 /// Add el to the list of children.
1323 
1325 {
1326  static const TEveException eh("TEveElement::AddElement ");
1327 
1328  if ( ! AcceptElement(el))
1329  throw(eh + Form("parent '%s' rejects '%s'.",
1330  GetElementName(), el->GetElementName()));
1331 
1332  el->AddParent(this);
1333  fChildren.push_back(el); ++fNumChildren;
1334  el->AddIntoListTrees(this);
1335  ElementChanged();
1336 }
1337 
1338 ////////////////////////////////////////////////////////////////////////////////
1339 /// Remove el from the list of children.
1340 
1342 {
1343  el->RemoveFromListTrees(this);
1344  RemoveElementLocal(el);
1345  el->RemoveParent(this);
1346  fChildren.remove(el); --fNumChildren;
1347  ElementChanged();
1348 }
1349 
1350 ////////////////////////////////////////////////////////////////////////////////
1351 /// Perform additional local removal of el.
1352 /// Called from RemoveElement() which does whole untangling.
1353 /// Put into special function as framework-related handling of
1354 /// element removal should really be common to all classes and
1355 /// clearing of local structures happens in between removal
1356 /// of list-tree-items and final removal.
1357 /// If you override this, you should also override
1358 /// RemoveElementsLocal().
1359 
1361 {
1362 }
1363 
1364 ////////////////////////////////////////////////////////////////////////////////
1365 /// Remove all elements. This assumes removing of all elements can
1366 /// be done more efficiently then looping over them and removing one
1367 /// by one. This protected function performs the removal on the
1368 /// level of TEveElement.
1369 
1371 {
1372  for (sLTI_i i=fItems.begin(); i!=fItems.end(); ++i)
1373  {
1374  DestroyListSubTree(i->fTree, i->fItem);
1375  }
1377  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1378  {
1379  (*i)->RemoveParent(this);
1380  }
1381  fChildren.clear(); fNumChildren = 0;
1382 }
1383 
1384 ////////////////////////////////////////////////////////////////////////////////
1385 /// Remove all elements. This assumes removing of all elements can
1386 /// be done more efficiently then looping over them and removing
1387 /// them one by one.
1388 
1390 {
1391  if (HasChildren())
1392  {
1394  ElementChanged();
1395  }
1396 }
1397 
1398 ////////////////////////////////////////////////////////////////////////////////
1399 /// Perform additional local removal of all elements.
1400 /// See comment to RemoveElementlocal(TEveElement*).
1401 
1403 {
1404 }
1405 
1406 ////////////////////////////////////////////////////////////////////////////////
1407 /// If this is a projectable, loop over all projected replicas and
1408 /// add the projected image of child 'el' there. This is supposed to
1409 /// be called after you add a child to a projectable after it has
1410 /// already been projected.
1411 /// You might also want to call RecheckImpliedSelections() on this
1412 /// element or 'el'.
1413 ///
1414 /// If 'same_depth' flag is true, the same depth as for parent object
1415 /// is used in every projection. Otherwise current depth of each
1416 /// relevant projection-manager is used.
1417 
1419 {
1420  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
1421  if (pable && HasChild(el))
1422  {
1423  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
1424  {
1425  TEveProjectionManager *pmgr = (*i)->GetManager();
1426  Float_t cd = pmgr->GetCurrentDepth();
1427  if (same_depth) pmgr->SetCurrentDepth((*i)->GetDepth());
1428 
1429  pmgr->SubImportElements(el, (*i)->GetProjectedAsElement());
1430 
1431  if (same_depth) pmgr->SetCurrentDepth(cd);
1432  }
1433  }
1434 }
1435 
1436 ////////////////////////////////////////////////////////////////////////////////
1437 /// If this is a projectable, loop over all projected replicas and
1438 /// add the projected image of all children there. This is supposed
1439 /// to be called after you destroy all children and then add new
1440 /// ones after this element has already been projected.
1441 /// You might also want to call RecheckImpliedSelections() on this
1442 /// element.
1443 ///
1444 /// If 'same_depth' flag is true, the same depth as for the
1445 /// projected element is used in every projection. Otherwise current
1446 /// depth of each relevant projection-manager is used.
1447 
1449 {
1450  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
1451  if (pable)
1452  {
1453  for (TEveProjectable::ProjList_i i = pable->BeginProjecteds(); i != pable->EndProjecteds(); ++i)
1454  {
1455  TEveProjectionManager *pmgr = (*i)->GetManager();
1456  Float_t cd = pmgr->GetCurrentDepth();
1457  if (same_depth) pmgr->SetCurrentDepth((*i)->GetDepth());
1458 
1459  pmgr->SubImportChildren(this, (*i)->GetProjectedAsElement());
1460 
1461  if (same_depth) pmgr->SetCurrentDepth(cd);
1462  }
1463  }
1464 }
1465 
1466 ////////////////////////////////////////////////////////////////////////////////
1467 /// Check if element el is a child of this element.
1468 
1470 {
1471  return (std::find(fChildren.begin(), fChildren.end(), el) != fChildren.end());
1472 }
1473 
1474 ////////////////////////////////////////////////////////////////////////////////
1475 /// Find the first child with given name. If cls is specified (non
1476 /// 0), it is also checked.
1477 ///
1478 /// Returns 0 if not found.
1479 
1481 {
1482  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1483  {
1484  if (name.CompareTo((*i)->GetElementName()) == 0)
1485  {
1486  if (!cls || (cls && (*i)->IsA()->InheritsFrom(cls)))
1487  return *i;
1488  }
1489  }
1490  return 0;
1491 }
1492 
1493 ////////////////////////////////////////////////////////////////////////////////
1494 /// Find the first child whose name matches regexp. If cls is
1495 /// specified (non 0), it is also checked.
1496 ///
1497 /// Returns 0 if not found.
1498 
1500 {
1501  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1502  {
1503  if (regexp.MatchB((*i)->GetElementName()))
1504  {
1505  if (!cls || (cls && (*i)->IsA()->InheritsFrom(cls)))
1506  return *i;
1507  }
1508  }
1509  return 0;
1510 }
1511 
1512 ////////////////////////////////////////////////////////////////////////////////
1513 /// Find all children with given name and append them to matches
1514 /// list. If class is specified (non 0), it is also checked.
1515 ///
1516 /// Returns number of elements added to the list.
1517 
1519  const TString& name, const TClass* cls)
1520 {
1521  Int_t count = 0;
1522  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1523  {
1524  if (name.CompareTo((*i)->GetElementName()) == 0)
1525  {
1526  if (!cls || (cls && (*i)->IsA()->InheritsFrom(cls)))
1527  {
1528  matches.push_back(*i);
1529  ++count;
1530  }
1531  }
1532  }
1533  return count;
1534 }
1535 
1536 ////////////////////////////////////////////////////////////////////////////////
1537 /// Find all children whose name matches regexp and append them to
1538 /// matches list.
1539 ///
1540 /// Returns number of elements added to the list.
1541 
1543  TPRegexp& regexp, const TClass* cls)
1544 {
1545  Int_t count = 0;
1546  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1547  {
1548  if (regexp.MatchB((*i)->GetElementName()))
1549  {
1550  if (!cls || (cls && (*i)->IsA()->InheritsFrom(cls)))
1551  {
1552  matches.push_back(*i);
1553  ++count;
1554  }
1555  }
1556  }
1557  return count;
1558 }
1559 
1560 ////////////////////////////////////////////////////////////////////////////////
1561 /// Returns the first child element or 0 if the list is empty.
1562 
1564 {
1565  return HasChildren() ? fChildren.front() : 0;
1566 }
1567 
1568 ////////////////////////////////////////////////////////////////////////////////
1569 /// Returns the last child element or 0 if the list is empty.
1570 
1572 {
1573  return HasChildren() ? fChildren.back() : 0;
1574 }
1575 
1576 ////////////////////////////////////////////////////////////////////////////////
1577 /// Enable rendering of children and their list contents.
1578 /// Arguments control how to set self/child rendering.
1579 
1580 void TEveElement::EnableListElements(Bool_t rnr_self, Bool_t rnr_children)
1581 {
1582  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1583  {
1584  (*i)->SetRnrSelf(rnr_self);
1585  (*i)->SetRnrChildren(rnr_children);
1586  }
1587 
1589 }
1590 
1591 ////////////////////////////////////////////////////////////////////////////////
1592 /// Disable rendering of children and their list contents.
1593 /// Arguments control how to set self/child rendering.
1594 ///
1595 /// Same as above function, but default arguments are different. This
1596 /// is convenient for calls via context menu.
1597 
1598 void TEveElement::DisableListElements(Bool_t rnr_self, Bool_t rnr_children)
1599 {
1600  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1601  {
1602  (*i)->SetRnrSelf(rnr_self);
1603  (*i)->SetRnrChildren(rnr_children);
1604  }
1605 
1607 }
1608 
1609 ////////////////////////////////////////////////////////////////////////////////
1610 /// Protected member function called from TEveElement::Annihilate().
1611 
1613 {
1614  static const TEveException eh("TEveElement::AnnihilateRecursively ");
1615 
1616  // projected were already destroyed in TEveElement::Anihilate(), now only clear its list
1617  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
1618  if (pable && pable->HasProjecteds())
1619  {
1620  pable->ClearProjectedList();
1621  }
1622 
1623  // same as TEveElements::RemoveElementsInternal(), except parents are ignored
1624  for (sLTI_i i=fItems.begin(); i!=fItems.end(); ++i)
1625  {
1626  DestroyListSubTree(i->fTree, i->fItem);
1627  }
1629  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1630  {
1631  (*i)->AnnihilateRecursively();
1632  }
1633 
1634  fChildren.clear();
1635  fNumChildren = 0;
1636 
1638  PreDeleteElement();
1639 
1640  delete this;
1641 }
1642 
1643 ////////////////////////////////////////////////////////////////////////////////
1644 /// Optimized destruction without check of reference-count.
1645 /// Parents are not notified about child destruction.
1646 /// The method should only be used when an element does not have
1647 /// more than one parent -- otherwise an exception is thrown.
1648 
1650 {
1651  static const TEveException eh("TEveElement::Annihilate ");
1652 
1653  if (fParents.size() > 1)
1654  {
1655  Warning(eh, "More than one parent for '%s': %d. Refusing to delete.",
1656  GetElementName(), (Int_t) fParents.size());
1657  return;
1658  }
1659 
1661 
1662  // recursive annihilation of projecteds
1663  TEveProjectable* pable = dynamic_cast<TEveProjectable*>(this);
1664  if (pable && pable->HasProjecteds())
1665  {
1666  pable->AnnihilateProjecteds();
1667  }
1668 
1669  // detach from the parent
1670  while (!fParents.empty())
1671  {
1672  fParents.front()->RemoveElement(this);
1673  }
1674 
1676 
1677  gEve->Redraw3D();
1678 }
1679 
1680 ////////////////////////////////////////////////////////////////////////////////
1681 /// Annihilate elements.
1682 
1684 {
1685  while (!fChildren.empty())
1686  {
1687  TEveElement* c = fChildren.front();
1688  c->Annihilate();
1689  }
1690 
1691  fNumChildren = 0;
1692 }
1693 
1694 ////////////////////////////////////////////////////////////////////////////////
1695 /// Destroy this element. Throws an exception if deny-destroy is in force.
1696 /// This method should be called instead of a destructor.
1697 /// Note that an exception will be thrown if the element has been
1698 /// protected against destruction with IncDenyDestroy().
1699 
1701 {
1702  static const TEveException eh("TEveElement::Destroy ");
1703 
1704  if (fDenyDestroy > 0)
1705  throw eh + TString::Format("element '%s' (%s*) 0x%lx is protected against destruction.",
1706  GetElementName(), IsA()->GetName(), (ULong_t)this);
1707 
1708  PreDeleteElement();
1709  delete this;
1710  gEve->Redraw3D();
1711 }
1712 
1713 ////////////////////////////////////////////////////////////////////////////////
1714 /// Destroy this element. Prints a warning if deny-destroy is in force.
1715 
1717 {
1718  static const TEveException eh("TEveElement::DestroyOrWarn ");
1719 
1720  try
1721  {
1722  Destroy();
1723  }
1724  catch (TEveException& exc)
1725  {
1726  Warning(eh, "%s", exc.Data());
1727  }
1728 }
1729 
1730 ////////////////////////////////////////////////////////////////////////////////
1731 /// Destroy all children of this element.
1732 
1734 {
1735  static const TEveException eh("TEveElement::DestroyElements ");
1736 
1737  while (HasChildren())
1738  {
1739  TEveElement* c = fChildren.front();
1740  if (c->fDenyDestroy <= 0)
1741  {
1742  try {
1743  c->Destroy();
1744  }
1745  catch (const TEveException &exc) {
1746  Warning(eh, "element destruction failed: '%s'.", exc.Data());
1747  RemoveElement(c);
1748  }
1749  }
1750  else
1751  {
1752  if (gDebug > 0)
1753  Info(eh, "element '%s' is protected agains destruction, removing locally.", c->GetElementName());
1754  RemoveElement(c);
1755  }
1756  }
1757 
1758  gEve->Redraw3D();
1759 }
1760 
1761 ////////////////////////////////////////////////////////////////////////////////
1762 /// Returns state of flag determining if the element will be
1763 /// destroyed when reference count reaches zero.
1764 /// This is true by default.
1765 
1767 {
1768  return fDestroyOnZeroRefCnt;
1769 }
1770 
1771 ////////////////////////////////////////////////////////////////////////////////
1772 /// Sets the state of flag determining if the element will be
1773 /// destroyed when reference count reaches zero.
1774 /// This is true by default.
1775 
1777 {
1779 }
1780 
1781 ////////////////////////////////////////////////////////////////////////////////
1782 /// Returns the number of times deny-destroy has been requested on
1783 /// the element.
1784 
1786 {
1787  return fDenyDestroy;
1788 }
1789 
1790 ////////////////////////////////////////////////////////////////////////////////
1791 /// Increases the deny-destroy count of the element.
1792 /// Call this if you store an external pointer to the element.
1793 
1795 {
1796  ++fDenyDestroy;
1797 }
1798 
1799 ////////////////////////////////////////////////////////////////////////////////
1800 /// Decreases the deny-destroy count of the element.
1801 /// Call this after releasing an external pointer to the element.
1802 
1804 {
1805  if (--fDenyDestroy <= 0)
1806  CheckReferenceCount("TEveElement::DecDenyDestroy ");
1807 }
1808 
1809 ////////////////////////////////////////////////////////////////////////////////
1810 /// Get number of parents that should be ignored in doing
1811 /// reference-counting.
1812 ///
1813 /// For example, this is used when subscribing an element to a
1814 /// visualization-database model object.
1815 
1817 {
1818  return fParentIgnoreCnt;
1819 }
1820 
1821 ////////////////////////////////////////////////////////////////////////////////
1822 /// Increase number of parents ignored in reference-counting.
1823 
1825 {
1826  ++fParentIgnoreCnt;
1827 }
1828 
1829 ////////////////////////////////////////////////////////////////////////////////
1830 /// Decrease number of parents ignored in reference-counting.
1831 
1833 {
1834  if (--fParentIgnoreCnt <= 0)
1835  CheckReferenceCount("TEveElement::DecParentIgnoreCnt ");
1836 }
1837 
1838 ////////////////////////////////////////////////////////////////////////////////
1839 /// React to element being pasted or dnd-ed.
1840 /// Return true if redraw is needed.
1841 
1843 {
1844  gEve->AddElement(el, this);
1845  return kTRUE;
1846 }
1847 
1848 ////////////////////////////////////////////////////////////////////////////////
1849 /// Call this after an element has been changed so that the state
1850 /// can be propagated around the framework.
1851 
1852 void TEveElement::ElementChanged(Bool_t update_scenes, Bool_t redraw)
1853 {
1854  gEve->ElementChanged(this, update_scenes, redraw);
1855 }
1856 
1857 ////////////////////////////////////////////////////////////////////////////////
1858 /// Set pickable state on the element and all its children.
1859 
1861 {
1862  fPickable = p;
1863  for (List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
1864  {
1865  (*i)->SetPickableRecursively(p);
1866  }
1867 }
1868 
1869 ////////////////////////////////////////////////////////////////////////////////
1870 /// Returns element to be selected on click.
1871 /// If value is zero the selected object will follow rules in
1872 /// TEveSelection.
1873 
1875 {
1876  return 0;
1877 }
1878 
1879 ////////////////////////////////////////////////////////////////////////////////
1880 /// Returns element to be displayed in GUI editor on click.
1881 /// If value is zero the displayed object will follow rules in
1882 /// TEveSelection.
1883 
1885 {
1886  return 0;
1887 }
1888 
1889 ////////////////////////////////////////////////////////////////////////////////
1890 /// Set element's selection state. Stamp appropriately.
1891 
1893 {
1894  if (fSelected != state) {
1895  fSelected = state;
1896  if (!fSelected && fImpliedSelected == 0)
1897  UnSelected();
1898  fParentIgnoreCnt += (fSelected) ? 1 : -1;
1900  }
1901 }
1902 
1903 ////////////////////////////////////////////////////////////////////////////////
1904 /// Increase element's implied-selection count. Stamp appropriately.
1905 
1907 {
1908  if (fImpliedSelected++ == 0)
1910 }
1911 
1912 ////////////////////////////////////////////////////////////////////////////////
1913 /// Decrease element's implied-selection count. Stamp appropriately.
1914 
1916 {
1917  if (--fImpliedSelected == 0)
1918  {
1919  if (!fSelected)
1920  UnSelected();
1922  }
1923 }
1924 
1925 ////////////////////////////////////////////////////////////////////////////////
1926 /// Virtual function called when both fSelected is false and
1927 /// fImpliedSelected is 0.
1928 /// Nothing is done in this base-class version
1929 
1931 {
1932 }
1933 
1934 ////////////////////////////////////////////////////////////////////////////////
1935 /// Set element's highlight state. Stamp appropriately.
1936 
1938 {
1939  if (fHighlighted != state) {
1940  fHighlighted = state;
1941  if (!fHighlighted && fImpliedHighlighted == 0)
1942  UnHighlighted();
1943  fParentIgnoreCnt += (fHighlighted) ? 1 : -1;
1945  }
1946 }
1947 
1948 ////////////////////////////////////////////////////////////////////////////////
1949 /// Increase element's implied-highlight count. Stamp appropriately.
1950 
1952 {
1953  if (fImpliedHighlighted++ == 0)
1955 }
1956 
1957 ////////////////////////////////////////////////////////////////////////////////
1958 /// Decrease element's implied-highlight count. Stamp appropriately.
1959 
1961 {
1962  if (--fImpliedHighlighted == 0)
1963  {
1964  if (!fHighlighted)
1965  UnHighlighted();
1967  }
1968 }
1969 
1970 ////////////////////////////////////////////////////////////////////////////////
1971 /// Virtual function called when both fHighlighted is false and
1972 /// fImpliedHighlighted is 0.
1973 /// Nothing is done in this base-class version
1974 
1976 {
1977 }
1978 
1979 ////////////////////////////////////////////////////////////////////////////////
1980 /// Populate set impSelSet with derived / dependant elements.
1981 ///
1982 /// If this is a TEveProjectable, the projected replicas are added
1983 /// to the set. Thus it does not have to be reimplemented for each
1984 /// sub-class of TEveProjected.
1985 ///
1986 /// Note that this also takes care of projections of TEveCompound
1987 /// class, which is also a projectable.
1988 
1990 {
1991  TEveProjectable* p = dynamic_cast<TEveProjectable*>(this);
1992  if (p)
1993  {
1994  p->AddProjectedsToSet(impSelSet);
1995  }
1996 }
1997 
1998 ////////////////////////////////////////////////////////////////////////////////
1999 /// Get selection level, needed for rendering selection and
2000 /// highlight feedback.
2001 /// This should go to TAtt3D.
2002 
2004 {
2005  if (fSelected) return 1;
2006  if (fImpliedSelected > 0) return 2;
2007  if (fHighlighted) return 3;
2008  if (fImpliedHighlighted > 0) return 4;
2009  return 0;
2010 }
2011 
2012 ////////////////////////////////////////////////////////////////////////////////
2013 /// Call this if it is possible that implied-selection or highlight
2014 /// has changed for this element or for implied-selection this
2015 /// element is member of and you want to maintain consistent
2016 /// selection state.
2017 /// This can happen if you add elements into compounds in response
2018 /// to user-interaction.
2019 
2021 {
2022  if (fSelected || fImpliedSelected)
2024 
2027 }
2028 
2029 ////////////////////////////////////////////////////////////////////////////////
2030 /// Add (bitwise or) given stamps to fChangeBits.
2031 /// Register this element to gEve as stamped.
2032 /// This method is virtual so that sub-classes can add additional
2033 /// actions. The base-class method should still be called (or replicated).
2034 
2036 {
2037  fChangeBits |= bits;
2038  if (fDestructing == kNone) gEve->ElementStamped(this);
2039 }
2040 
2041 ////////////////////////////////////////////////////////////////////////////////
2042 /// Returns pointer to first listtreeicon
2043 
2045 {
2046  // Need better solution for icon-loading/ids !!!!
2047  return fgListTreeIcons[open ? 7 : 0];
2048 }
2049 
2050 ////////////////////////////////////////////////////////////////////////////////
2051 /// Returns list-tree-item check-box picture appropriate for given
2052 /// rendering state.
2053 
2055 {
2056  Int_t idx = 0;
2057  if (fRnrSelf) idx = 2;
2058  if (fRnrChildren ) idx++;
2059 
2060  return fgRnrIcons[idx];
2061 }
2062 
2063 ////////////////////////////////////////////////////////////////////////////////
2064 /// Convert Bool_t to string - kTRUE or kFALSE.
2065 /// Needed in WriteVizParams().
2066 
2068 {
2069  return b ? "kTRUE" : "kFALSE";
2070 }
2071 
2072 
2073 /** \class TEveElementList
2074 \ingroup TEve
2075 A list of TEveElements.
2076 
2077 Class of acceptable children can be limited by setting the
2078 fChildClass member.
2079 
2080 !!! should have two ctors (like in TEveElement), one with Color_t&
2081 and set fDoColor automatically, based on which ctor is called.
2082 */
2083 
2085 
2086 ////////////////////////////////////////////////////////////////////////////////
2087 /// Constructor.
2088 
2089 TEveElementList::TEveElementList(const char* n, const char* t, Bool_t doColor, Bool_t doTransparency) :
2090  TEveElement(),
2091  TNamed(n, t),
2092  TEveProjectable(),
2093  fColor(0),
2094  fChildClass(0)
2095 {
2096  if (doColor) {
2099  }
2100  if (doTransparency)
2101  {
2103  }
2104 }
2105 
2106 ////////////////////////////////////////////////////////////////////////////////
2107 /// Copy constructor.
2108 
2110  TEveElement (e),
2111  TNamed (e),
2112  TEveProjectable(),
2113  fColor (e.fColor),
2114  fChildClass (e.fChildClass)
2115 {
2116 }
2117 
2118 ////////////////////////////////////////////////////////////////////////////////
2119 /// Clone the element via copy constructor.
2120 /// Virtual from TEveElement.
2121 
2123 {
2124  return new TEveElementList(*this);
2125 }
2126 
2127 ////////////////////////////////////////////////////////////////////////////////
2128 /// Check if TEveElement el is inherited from fChildClass.
2129 /// Virtual from TEveElement.
2130 
2132 {
2133  if (fChildClass && ! el->IsA()->InheritsFrom(fChildClass))
2134  return kFALSE;
2135  return kTRUE;
2136 }
2137 
2138 ////////////////////////////////////////////////////////////////////////////////
2139 /// Virtual from TEveProjectable, returns TEveCompoundProjected class.
2140 
2142 {
2144 }
2145 
2146 /** \class TEveElementListProjected
2147 \ingroup TEve
2148 A projected element list -- required for proper propagation
2149 of render state to projected views.
2150 */
2151 
2153 
2154 ////////////////////////////////////////////////////////////////////////////////
2155 /// Constructor.
2156 
2158  TEveElementList("TEveElementListProjected")
2159 {
2160 }
2161 
2162 ////////////////////////////////////////////////////////////////////////////////
2163 /// This is abstract method from base-class TEveProjected.
2164 /// No implementation.
2165 
2167 {
2168 }
TEveElement::ApplyVizTag
Bool_t ApplyVizTag(const TString &tag, const TString &fallback_tag="")
Set the VizTag, find model-element from the VizDB and copy visualization-parameters from it.
Definition: TEveElement.cxx:397
TEveElement::HasChildren
Bool_t HasChildren() const
Definition: TEveElement.h:171
c
#define c(i)
Definition: RSha256.hxx:119
TEveElement::SetMainColorPixel
void SetMainColorPixel(Pixel_t pixel)
Convert pixel to Color_t and call SetMainColor().
Definition: TEveElement.cxx:1174
TEveElement::fDenyDestroy
Int_t fDenyDestroy
Counter for top-level list-tree items that prevent automatic destruction.
Definition: TEveElement.h:89
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
TEveManager::GetUseOrphanage
Bool_t GetUseOrphanage() const
Definition: TEveManager.h:133
n
const Int_t n
Definition: legend1.C:16
TEveElement::fCanEditMainTrans
Bool_t fCanEditMainTrans
Definition: TEveElement.h:96
TEveElement::FindItem
virtual sLTI_i FindItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
Definition: TEveElement.cxx:883
TEveElement::fRnrSelf
Bool_t fRnrSelf
Definition: TEveElement.h:92
TEveElement::FirstChild
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Definition: TEveElement.cxx:1563
TEveElement::fgRnrIcons
static const TGPicture * fgRnrIcons[4]
Definition: TEveElement.h:64
TEveElement::GetMainTransparency
virtual Char_t GetMainTransparency() const
Definition: TEveElement.h:281
TEveElement::PaintStandard
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Definition: TEveElement.cxx:1034
TEveElement::fMainTransparency
Char_t fMainTransparency
Definition: TEveElement.h:98
TEveProjectionManager::SetCurrentDepth
void SetCurrentDepth(Float_t d)
Definition: TEveProjectionManager.h:62
TEveElement
Definition: TEveElement.h:35
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TEveTrans
Definition: TEveTrans.h:26
e
#define e(i)
Definition: RSha256.hxx:121
TEveElement::GetDenyDestroy
Int_t GetDenyDestroy() const
Returns the number of times deny-destroy has been requested on the element.
Definition: TEveElement.cxx:1785
TEveElement::Destroy
virtual void Destroy()
Destroy this element.
Definition: TEveElement.cxx:1700
TBuffer3D::kNone
@ kNone
Definition: TBuffer3D.h:55
TEveElement::SetElementName
virtual void SetElementName(const char *name)
Virtual function for setting of name of an element.
Definition: TEveElement.cxx:292
TEveElement::DecDenyDestroy
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
Definition: TEveElement.cxx:1803
TEveElement::ForwardSelection
virtual TEveElement * ForwardSelection()
Returns element to be selected on click.
Definition: TEveElement.cxx:1874
TEveElement::GetSelectedLevel
virtual UChar_t GetSelectedLevel() const
Get selection level, needed for rendering selection and highlight feedback.
Definition: TEveElement.cxx:2003
TEveElement::PadPaint
virtual void PadPaint(Option_t *option)
Paint self and/or children into currently active pad.
Definition: TEveElement.cxx:1012
TEveElement::SetVizModel
void SetVizModel(TEveElement *model)
Set visualization-parameter model element.
Definition: TEveElement.cxx:355
TEveElement::sLTI_i
sLTI_t::iterator sLTI_i
Definition: TEveElement.h:68
TEveElement::fPickable
Bool_t fPickable
Definition: TEveElement.h:312
TEveProjected::GetProjectable
TEveProjectable * GetProjectable() const
Definition: TEveProjectionBases.h:102
Warning
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition: TError.cxx:231
TGPicture
Definition: TGPicture.h:36
f
#define f(i)
Definition: RSha256.hxx:122
TNamed::SetNameTitle
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: TNamed.cxx:154
TEveElement::RemoveParent
virtual void RemoveParent(TEveElement *re)
Remove re from the list of parents.
Definition: TEveElement.cxx:645
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
TEveManager::GetHighlight
TEveSelection * GetHighlight() const
Definition: TEveManager.h:130
TBuffer3D::SetSectionsValid
void SetSectionsValid(UInt_t mask)
Definition: TBuffer3D.h:71
dest
#define dest(otri, vertexptr)
Definition: triangle.c:1040
TEveElement::ExportSourceObjectToCINT
void ExportSourceObjectToCINT(char *var_name) const
Export source object to CINT with given name for the variable.
Definition: TEveElement.cxx:997
TEveElement::GetDestroyOnZeroRefCnt
Bool_t GetDestroyOnZeroRefCnt() const
Returns state of flag determining if the element will be destroyed when reference count reaches zero.
Definition: TEveElement.cxx:1766
TObject::Print
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
Definition: TObject.cxx:552
TEveProjectable::PropagateMainColor
virtual void PropagateMainColor(Color_t color, Color_t old_color)
Set main color of projecteds if their color is the same as old_color.
Definition: TEveProjectionBases.cxx:125
TEveElement::RemoveElementLocal
virtual void RemoveElementLocal(TEveElement *el)
Perform additional local removal of el.
Definition: TEveElement.cxx:1360
TEveElement::fVizModel
TEveElement * fVizModel
Definition: TEveElement.h:83
TEveElement::fRnrChildren
Bool_t fRnrChildren
Definition: TEveElement.h:93
TEveElement::PropagateVizParamsToProjecteds
virtual void PropagateVizParamsToProjecteds()
Propagate visualization parameters to dependent elements.
Definition: TEveElement.cxx:427
TEveElement::fTopItemCnt
Int_t fTopItemCnt
Counter for parents that are ignored in ref-counting.
Definition: TEveElement.h:88
TEveElement::kCBObjProps
@ kCBObjProps
Definition: TEveElement.h:384
TEveProjectionManager::SubImportChildren
virtual Int_t SubImportChildren(TEveElement *el, TEveElement *proj_parent)
Recursively import children elements of el and apply projection to the newly imported objects.
Definition: TEveProjectionManager.cxx:320
TString::Data
const char * Data() const
Definition: TString.h:369
TEveElement::HandleElementPaste
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
Definition: TEveElement.cxx:1842
Pixel_t
ULong_t Pixel_t
Definition: GuiTypes.h:39
TEveElement::ProjectAllChildren
virtual void ProjectAllChildren(Bool_t same_depth=kTRUE)
If this is a projectable, loop over all projected replicas and add the projected image of all childre...
Definition: TEveElement.cxx:1448
TEveProjectable::AnnihilateProjecteds
virtual void AnnihilateProjecteds()
Optimized destroy of projected elements with condition there is only one parent for projected element...
Definition: TEveProjectionBases.cxx:65
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
TNamed::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:54
TEveElement::CopyVizParams
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveElement.cxx:462
TEveElementList::TEveElementList
TEveElementList(const char *n="TEveElementList", const char *t="", Bool_t doColor=kFALSE, Bool_t doTransparency=kFALSE)
Constructor.
Definition: TEveElement.cxx:2089
TEveElement::HasMainTrans
virtual Bool_t HasMainTrans() const
Definition: TEveElement.h:287
TEveElement::NumParents
Int_t NumParents() const
Definition: TEveElement.h:162
TGPicture.h
TEveElement::TestCSCBits
Bool_t TestCSCBits(UChar_t f) const
Definition: TEveElement.h:366
TEveManager::GetOrphanage
TEveElementList * GetOrphanage() const
Definition: TEveManager.h:132
TEveProjection
Definition: TEveProjections.h:26
TEveElement::IncParentIgnoreCnt
void IncParentIgnoreCnt()
Increase number of parents ignored in reference-counting.
Definition: TEveElement.cxx:1824
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TEveElement::fMainColorPtr
Color_t * fMainColorPtr
Definition: TEveElement.h:99
TEveElement::SingleRnrState
virtual Bool_t SingleRnrState() const
Definition: TEveElement.h:255
TEveElement::kAnnihilate
@ kAnnihilate
Definition: TEveElement.h:332
TEveProjectable::PropagateVizParams
virtual void PropagateVizParams(TEveElement *el=0)
Set visualization parameters of projecteds.
Definition: TEveProjectionBases.cxx:99
TEveElement::CloneElementRecurse
virtual TEveElement * CloneElementRecurse(Int_t level=0) const
Clone elements and recurse 'level' deep over children.
Definition: TEveElement.cxx:234
TEveElement::GetRnrSelf
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:256
TEveCompound
Definition: TEveCompound.h:23
TEveElement::fItems
sLTI_t fItems
Definition: TEveElement.h:102
TEveElement::DecParentIgnoreCnt
void DecParentIgnoreCnt()
Decrease number of parents ignored in reference-counting.
Definition: TEveElement.cxx:1832
TEveElement::SetVizTag
void SetVizTag(const TString &tag)
Definition: TEveElement.h:132
TEveElement::ToString
static const char * ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
Definition: TEveElement.cxx:2067
Float_t
float Float_t
Definition: RtypesCore.h:57
TEveElement::fgListTreeIcons
static const TGPicture * fgListTreeIcons[9]
Definition: TEveElement.h:65
TEveElement::FindChildren
Int_t FindChildren(List_t &matches, const TString &name, const TClass *cls=0)
Find all children with given name and append them to matches list.
Definition: TEveElement.cxx:1518
TEveElement::IncDenyDestroy
void IncDenyDestroy()
Increases the deny-destroy count of the element.
Definition: TEveElement.cxx:1794
TEveElement::RemoveElementsLocal
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
Definition: TEveElement.cxx:1402
TEveElement::PropagateMainColorToProjecteds
virtual void PropagateMainColorToProjecteds(Color_t color, Color_t old_color)
Propagate color to projected elements.
Definition: TEveElement.cxx:1198
TEveElement::TEveElement
TEveElement()
Default constructor.
Definition: TEveElement.cxx:61
TEveElement::SetMainColorPtr
void SetMainColorPtr(Color_t *color)
Definition: TEveElement.h:269
TEveElementList::AcceptElement
virtual Bool_t AcceptElement(TEveElement *el)
Check if TEveElement el is inherited from fChildClass.
Definition: TEveElement.cxx:2131
TGListTree
Definition: TGListTree.h:210
TEveProjectable::PropagateRenderState
virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children)
Set render state of projecteds.
Definition: TEveProjectionBases.cxx:113
TEveElement::GetParentIgnoreCnt
Int_t GetParentIgnoreCnt() const
Get number of parents that should be ignored in doing reference-counting.
Definition: TEveElement.cxx:1816
TEveElement::AddStamp
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
Definition: TEveElement.cxx:2035
TEveElement::CollectSceneParents
virtual void CollectSceneParents(List_t &scenes)
Collect all parents of class TEveScene.
Definition: TEveElement.cxx:692
TEveElement::kStandard
@ kStandard
Definition: TEveElement.h:331
TEveElement::SetElementTitle
virtual void SetElementTitle(const char *title)
Virtual function for setting of title of an element.
Definition: TEveElement.cxx:309
TEveElement::DestroyMainTrans
virtual void DestroyMainTrans()
Destroy the main transformation matrix, it will always be taken as identity.
Definition: TEveElement.cxx:1287
TEveElement::GetRenderObject
virtual TObject * GetRenderObject(const TEveException &eh) const
Definition: TEveElement.h:200
TClass.h
TEveElement::VizDB_Apply
void VizDB_Apply(const char *tag)
Set visual parameters for this object for given tag.
Definition: TEveElement.cxx:535
TColor.h
TEveElement.h
TEveElement::fChildren
List_t fChildren
Definition: TEveElement.h:81
TEveElement::HasChild
Bool_t HasChild(TEveElement *el)
Check if element el is a child of this element.
Definition: TEveElement.cxx:1469
TEveElement::fCanEditMainTransparency
Bool_t fCanEditMainTransparency
Definition: TEveElement.h:95
TEveElement::sLTI_ri
sLTI_t::reverse_iterator sLTI_ri
Definition: TEveElement.h:69
TEveManager::GetSelection
TEveSelection * GetSelection() const
Definition: TEveManager.h:129
TGListTree::AddItem
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
Definition: TGListTree.cxx:1965
TString::Format
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition: TString.cxx:2311
TEveElement::fCompound
TEveCompound * fCompound
Definition: TEveElement.h:82
TGListTree::DeleteItem
Int_t DeleteItem(TGListTreeItem *item)
Delete item from list tree.
Definition: TGListTree.cxx:2023
TEveElement::fCanEditMainColor
Bool_t fCanEditMainColor
Definition: TEveElement.h:94
TString
Definition: TString.h:136
ROOT::Math::detail::open
@ open
Definition: GenVectorIO.h:55
TEveElement::List_i
List_t::iterator List_i
Definition: TEveElement.h:72
Color_t
short Color_t
Definition: RtypesCore.h:83
TEveElement::SetRnrState
virtual Bool_t SetRnrState(Bool_t rnr)
Set render state of this element and of its children to the same value.
Definition: TEveElement.cxx:1127
TEveElementList
Definition: TEveElement.h:430
TEveProjectionBases.h
gEve
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
b
#define b(i)
Definition: RSha256.hxx:118
TEveElement::SetPickableRecursively
void SetPickableRecursively(Bool_t p)
Set pickable state on the element and all its children.
Definition: TEveElement.cxx:1860
TEveElement::GetMainColor
virtual Color_t GetMainColor() const
Definition: TEveElement.h:272
TEveElement::AddIntoListTrees
virtual TGListTreeItem * AddIntoListTrees(TEveElement *parent)
Add this render element into all list-trees and all items belonging to parent.
Definition: TEveElement.cxx:807
bool
TEveElement::CheckReferenceCount
virtual void CheckReferenceCount(const TEveException &eh="TEveElement::CheckReferenceCount ")
Check external references to this and eventually auto-destruct the render-element.
Definition: TEveElement.cxx:659
id
XFontStruct * id
Definition: TGX11.cxx:109
TEveElement::GetMaster
TEveElement * GetMaster()
Returns the master element - that is:
Definition: TEveElement.cxx:609
TEveElement::LastChild
TEveElement * LastChild() const
Returns the last child element or 0 if the list is empty.
Definition: TEveElement.cxx:1571
TEveElement::fMainTrans
TEveTrans * fMainTrans
Definition: TEveElement.h:100
TROOT.h
TEveElement::DestroyElements
virtual void DestroyElements()
Destroy all children of this element.
Definition: TEveElement.cxx:1733
TEveListTreeItem
Definition: TEveBrowser.h:29
TEveElement::GetListTreeCheckBoxIcon
virtual const TGPicture * GetListTreeCheckBoxIcon()
Returns list-tree-item check-box picture appropriate for given rendering state.
Definition: TEveElement.cxx:2054
TEveElement::FindVizModel
Bool_t FindVizModel()
Find model element in VizDB that corresponds to previously assigned fVizTag and set fVizModel accordi...
Definition: TEveElement.cxx:374
TObject::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
TEveElement::fChangeBits
UChar_t fChangeBits
Definition: TEveElement.h:393
TEveProjectable::PropagateMainTransparency
virtual void PropagateMainTransparency(Char_t t, Char_t old_t)
Set main transparency of projecteds if their transparency is the same as the old one.
Definition: TEveProjectionBases.cxx:138
TEveElement::GetRnrChildren
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:257
update
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
Definition: RooAdaptiveGaussKronrodIntegrator1D.cxx:652
TEveElement::~TEveElement
virtual ~TEveElement()
Destructor.
Definition: TEveElement.cxx:186
TEveElement::IncImpliedSelected
virtual void IncImpliedSelected()
Increase element's implied-selection count. Stamp appropriately.
Definition: TEveElement.cxx:1906
TEveElement::DestroyListSubTree
virtual void DestroyListSubTree(TGListTree *ltree, TGListTreeItem *parent)
Destroy sub-tree under item 'parent' in list-tree 'ltree'.
Definition: TEveElement.cxx:742
kNone
const Handle_t kNone
Definition: GuiTypes.h:87
TEveElement::ExportToCINT
virtual void ExportToCINT(char *var_name)
Export render-element to CINT with variable name var_name.
Definition: TEveElement.cxx:957
TPRegexp::MatchB
Bool_t MatchB(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Definition: TPRegexp.h:78
TEveProjectable
Definition: TEveProjectionBases.h:34
TEveElement::SetRnrSelf
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
Definition: TEveElement.cxx:1061
TEveManager::InsertVizDBEntry
Bool_t InsertVizDBEntry(const TString &tag, TEveElement *model, Bool_t replace, Bool_t update)
Insert a new visualization-parameter database entry.
Definition: TEveManager.cxx:620
TEveElement::InitMainTrans
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
Definition: TEveElement.cxx:1274
TBuffer3D
Definition: TBuffer3D.h:17
TEveProjectable::ProjList_i
std::list< TEveProjected * >::iterator ProjList_i
Definition: TEveProjectionBases.h:42
TObject::Paint
virtual void Paint(Option_t *option="")
This method must be overridden if a class wants to paint itself.
Definition: TObject.cxx:521
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TEveElement::fParents
List_t fParents
Definition: TEveElement.h:80
TEveTrans::SetBuffer3D
void SetBuffer3D(TBuffer3D &buff)
Fill transformation part TBuffer3D core section.
Definition: TEveTrans.cxx:1048
TEveProjectionManager.h
TEveElement::RecheckImpliedSelections
void RecheckImpliedSelections()
Call this if it is possible that implied-selection or highlight has changed for this element or for i...
Definition: TEveElement.cxx:2020
TClass::InheritsFrom
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
Definition: TClass.cxx:4777
TPRegexp.h
TEveTrans::UnitTrans
void UnitTrans()
Reset matrix to unity.
Definition: TEveTrans.cxx:129
TEveElement::VizDB_Insert
void VizDB_Insert(const char *tag, Bool_t replace=kTRUE, Bool_t update=kTRUE)
Create a replica of element and insert it into VizDB with given tag.
Definition: TEveElement.cxx:586
TEveElement::RemoveElement
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
Definition: TEveElement.cxx:1341
TBuffer3D::fColor
Int_t fColor
Definition: TBuffer3D.h:94
TEveElement::fImpliedSelected
Short_t fImpliedSelected
Definition: TEveElement.h:315
TEveElement::GetElementName
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
Definition: TEveElement.cxx:265
TEveElement::SaveVizParams
void SaveVizParams(std::ostream &out, const TString &tag, const TString &var)
Save visualization parameters for this element with given tag.
Definition: TEveElement.cxx:494
TEveElement::ElementChanged
virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE)
Call this after an element has been changed so that the state can be propagated around the framework.
Definition: TEveElement.cxx:1852
TEveElementListProjected::UpdateProjection
virtual void UpdateProjection()
This is abstract method from base-class TEveProjected.
Definition: TEveElement.cxx:2166
TEveElementListProjected
Definition: TEveElement.h:479
TEveElement::fDestroyOnZeroRefCnt
Bool_t fDestroyOnZeroRefCnt
Deny-destroy count.
Definition: TEveElement.h:90
TBuffer3DTypes::kGeneric
@ kGeneric
Definition: TBuffer3DTypes.h:36
TEveProjectionManager
Definition: TEveProjectionManager.h:20
TEveElement::Annihilate
virtual void Annihilate()
Optimized destruction without check of reference-count.
Definition: TEveElement.cxx:1649
TEveElement::DecImpliedHighlighted
virtual void DecImpliedHighlighted()
Decrease element's implied-highlight count. Stamp appropriately.
Definition: TEveElement.cxx:1960
TClass::New
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Definition: TClass.cxx:4881
TEveElementList::CloneElement
virtual TEveElementList * CloneElement() const
Clone the element via copy constructor.
Definition: TEveElement.cxx:2122
TEveCompound.h
TEveElement::fDestructing
Char_t fDestructing
Definition: TEveElement.h:394
TEveElement::SetMainTransparency
virtual void SetMainTransparency(Char_t t)
Set main-transparency.
Definition: TEveElement.cxx:1211
TEveElement::VizDB_Reapply
void VizDB_Reapply()
Reset visual parameters for this object from VizDB.
Definition: TEveElement.cxx:548
TEveElement::StampVisibility
void StampVisibility()
Definition: TEveElement.h:400
TEveElement::fNumChildren
Int_t fNumChildren
Definition: TEveElement.h:86
TEveElement::ForwardEdit
virtual TEveElement * ForwardEdit()
Returns element to be displayed in GUI editor on click.
Definition: TEveElement.cxx:1884
TEveElement::SetMainColorRGB
void SetMainColorRGB(UChar_t r, UChar_t g, UChar_t b)
Convert RGB values to Color_t and call SetMainColor.
Definition: TEveElement.cxx:1182
TEveElement::kCSCBTakeAnyParentAsMaster
@ kCSCBTakeAnyParentAsMaster
Definition: TEveElement.h:321
TEveElement::DumpSourceObject
void DumpSourceObject() const
Call Dump() on source object.
Definition: TEveElement.cxx:967
TVirtualViewer3D.h
TEveManager::EditElement
void EditElement(TEveElement *element)
Show element in default editor.
Definition: TEveManager.cxx:354
TEveElement::kCBColorSelection
@ kCBColorSelection
Definition: TEveElement.h:382
TEveElement::TEveListTreeInfo
Definition: TEveElement.h:42
TEveElement::FillImpliedSelectedSet
virtual void FillImpliedSelectedSet(Set_t &impSelSet)
Populate set impSelSet with derived / dependant elements.
Definition: TEveElement.cxx:1989
TNamed
Definition: TNamed.h:29
TBuffer3D.h
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TEveElementList::fChildClass
TClass * fChildClass
Definition: TEveElement.h:439
gDebug
R__EXTERN Int_t gDebug
Definition: RtypesCore.h:119
TEveManager::ElementStamped
void ElementStamped(TEveElement *element)
Mark element as changed – it will be processed on next redraw.
Definition: TEveManager.cxx:467
TEveElement::PreDeleteElement
virtual void PreDeleteElement()
Externally assigned and controlled user data.
Definition: TEveElement.cxx:215
TEveElement::List_ci
List_t::const_iterator List_ci
Definition: TEveElement.h:73
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
TBuffer3DTypes.h
TEveProjectionManager::SubImportElements
virtual TEveElement * SubImportElements(TEveElement *el, TEveElement *proj_parent)
Recursively import elements and apply projection to the newly imported objects.
Definition: TEveProjectionManager.cxx:291
TVirtualPad.h
TGContainer::ClearViewPort
virtual void ClearViewPort()
Clear view port and redraw full content.
Definition: TGCanvas.cxx:887
TEveElement::RemoveFromListTrees
virtual Int_t RemoveFromListTrees(TEveElement *parent)
Remove element from all list-trees where 'parent' is the user-data of the parent list-tree-item.
Definition: TEveElement.cxx:848
TEveElement::PropagateMainTransparencyToProjecteds
virtual void PropagateMainTransparencyToProjecteds(Char_t t, Char_t old_t)
Propagate transparency to projected elements.
Definition: TEveElement.cxx:1236
TEveProjectable::BeginProjecteds
ProjList_i BeginProjecteds()
Definition: TEveProjectionBases.h:55
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TEveTrans.h
TEveElement::fImpliedHighlighted
Short_t fImpliedHighlighted
Definition: TEveElement.h:316
TColor::GetColor
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:1766
TEveElement::CloneChildrenRecurse
virtual void CloneChildrenRecurse(TEveElement *dest, Int_t level=0) const
Clone children and attach them to the dest element.
Definition: TEveElement.cxx:249
TBuffer3D::fTransparency
Short_t fTransparency
Definition: TBuffer3D.h:95
TEveElement::fHighlighted
Bool_t fHighlighted
Definition: TEveElement.h:314
TEveElement::AnnihilateRecursively
virtual void AnnihilateRecursively()
Protected member function called from TEveElement::Annihilate().
Definition: TEveElement.cxx:1612
TNamed::SetTitle
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
TGListTreeItem::GetFirstChild
TGListTreeItem * GetFirstChild() const
Definition: TGListTree.h:74
TEveElement::DestroyOrWarn
virtual void DestroyOrWarn()
Destroy this element. Prints a warning if deny-destroy is in force.
Definition: TEveElement.cxx:1716
TEveElement::PrintSourceObject
void PrintSourceObject() const
Call Print() on source object.
Definition: TEveElement.cxx:982
TEveSelection::RecheckImpliedSetForElement
void RecheckImpliedSetForElement(TEveElement *el)
If given element is selected or implied-selected with this selection and recheck implied-set for give...
Definition: TEveSelection.cxx:207
TEveProjectable::ClearProjectedList
virtual void ClearProjectedList()
Definition: TEveProjectionBases.cxx:77
TEveManager::PreDeleteElement
void PreDeleteElement(TEveElement *element)
Called from TEveElement prior to its destruction so the framework components (like object editor) can...
Definition: TEveManager.cxx:564
TEveProjectable::EndProjecteds
ProjList_i EndProjecteds()
Definition: TEveProjectionBases.h:56
TGeoMatrix.h
TEveElement::RemoveElements
virtual void RemoveElements()
Remove all elements.
Definition: TEveElement.cxx:1389
TPRegexp
Definition: TPRegexp.h:36
TObject::Dump
virtual void Dump() const
Dump contents of object on stdout.
Definition: TObject.cxx:268
TEveElement::StampColorSelection
void StampColorSelection()
Definition: TEveElement.h:397
TEveElement::AddIntoListTree
virtual TGListTreeItem * AddIntoListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Add this element into ltree to an already existing item parent_lti.
Definition: TEveElement.cxx:759
TEveElement::SetElementNameTitle
virtual void SetElementNameTitle(const char *name, const char *title)
Virtual function for setting of name and title of render element.
Definition: TEveElement.cxx:326
TGWindow::GetParent
const TGWindow * GetParent() const
Definition: TGWindow.h:84
TEveElement::RemoveFromListTree
virtual Bool_t RemoveFromListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Remove element from list-tree 'ltree' where its parent item is 'parent_lti'.
Definition: TEveElement.cxx:823
TEveElement::DecImpliedSelected
virtual void DecImpliedSelected()
Decrease element's implied-selection count. Stamp appropriately.
Definition: TEveElement.cxx:1915
TEveElement::fSelected
Bool_t fSelected
Definition: TEveElement.h:313
TEveElement::GetListTreeIcon
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns pointer to first listtreeicon.
Definition: TEveElement.cxx:2044
TEveManager.h
TEveProjectionManager::GetCurrentDepth
Float_t GetCurrentDepth() const
Definition: TEveProjectionManager.h:63
TEveElement::SetMainAlpha
void SetMainAlpha(Float_t alpha)
Set main-transparency via float alpha variable.
Definition: TEveElement.cxx:1226
TString::IsNull
Bool_t IsNull() const
Definition: TString.h:407
Double_t
double Double_t
Definition: RtypesCore.h:59
TGeoMatrix
Definition: TGeoMatrix.h:40
TEveElement::IncImpliedHighlighted
virtual void IncImpliedHighlighted()
Increase element's implied-highlight count. Stamp appropriately.
Definition: TEveElement.cxx:1951
TEveManager::AddElement
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
Definition: TEveManager.cxx:527
TEveElement::AnnihilateElements
virtual void AnnihilateElements()
Annihilate elements.
Definition: TEveElement.cxx:1683
TBuffer3D::fID
TObject * fID
Definition: TBuffer3D.h:93
TEveException
Definition: TEveUtil.h:101
TEveProjected
Definition: TEveProjectionBases.h:83
RooFit::ClassName
RooCmdArg ClassName(const char *name)
Definition: RooGlobalFunc.cxx:300
TEveElement::EnableListElements
void EnableListElements(Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTRUE)
Enable rendering of children and their list contents.
Definition: TEveElement.cxx:1580
TEveElement::UnSelected
virtual void UnSelected()
Virtual function called when both fSelected is false and fImpliedSelected is 0.
Definition: TEveElement.cxx:1930
TEveElement::GetElementTitle
virtual const char * GetElementTitle() const
Virtual function for retrieving title of the render-element.
Definition: TEveElement.cxx:278
Info
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
Definition: TError.cxx:220
TEveBrowser.h
TClass
Definition: TClass.h:80
TGListTreeItem::GetUserData
virtual void * GetUserData() const =0
TEveTrans::SetFrom
void SetFrom(Double_t *carr)
Definition: TEveTrans.cxx:980
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
TEveManager::FindVizDBEntry
TEveElement * FindVizDBEntry(const TString &tag)
Find a visualization-parameter database entry corresponding to tag.
Definition: TEveManager.cxx:678
TEveElement::AcceptElement
virtual Bool_t AcceptElement(TEveElement *el)
Check if el can be added to this element.
Definition: TEveElement.cxx:1316
TEveElement::SetMainColor
virtual void SetMainColor(Color_t color)
Set main color of the element.
Definition: TEveElement.cxx:1158
TObject
Definition: TObject.h:37
TEveElement::GetSourceObject
TObject * GetSourceObject() const
Definition: TEveElement.h:297
TEveElement::SetRnrChildren
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element's children, i.e.
Definition: TEveElement.cxx:1083
TEveManager::Redraw3D
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Definition: TEveManager.h:168
TGListTree.h
TEveElement::WriteVizParams
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
Definition: TEveElement.cxx:521
TEveElement::HighlightElement
virtual void HighlightElement(Bool_t state)
Set element's highlight state. Stamp appropriately.
Definition: TEveElement.cxx:1937
TEveElement::BeginChildren
List_i BeginChildren()
Definition: TEveElement.h:166
TEveElement::fVizTag
TString fVizTag
Element used as model from VizDB.
Definition: TEveElement.h:84
TEveElementListProjected::TEveElementListProjected
TEveElementListProjected()
Constructor.
Definition: TEveElement.cxx:2157
name
char name[80]
Definition: TGX11.cxx:110
TEveSelection.h
TGListTreeItem::GetNextSibling
TGListTreeItem * GetNextSibling() const
Definition: TGListTree.h:77
TEveElement::UnHighlighted
virtual void UnHighlighted()
Virtual function called when both fHighlighted is false and fImpliedHighlighted is 0.
Definition: TEveElement.cxx:1975
TEveElement::GetObject
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
Definition: TEveElement.cxx:937
d
#define d(i)
Definition: RSha256.hxx:120
TEveElement::FindListTreeItem
virtual TGListTreeItem * FindListTreeItem(TGListTree *ltree)
Find any list-tree-item of this element in list-tree 'ltree'.
Definition: TEveElement.cxx:909
TEveElement::SetDestroyOnZeroRefCnt
void SetDestroyOnZeroRefCnt(Bool_t d)
Sets the state of flag determining if the element will be destroyed when reference count reaches zero...
Definition: TEveElement.cxx:1776
gPad
#define gPad
Definition: TVirtualPad.h:287
TEveElement::PropagateRnrStateToProjecteds
virtual void PropagateRnrStateToProjecteds()
Propagate render state to the projected replicas of this element.
Definition: TEveElement.cxx:1143
TEveElement::List_t
std::list< TEveElement * > List_t
Definition: TEveElement.h:71
TEveElement::PtrMainTrans
virtual TEveTrans * PtrMainTrans(Bool_t create=kTRUE)
Return pointer to main transformation.
Definition: TEveElement.cxx:1249
TEveElement::kNone
@ kNone
Definition: TEveElement.h:330
make_cnn_model.model
model
Definition: make_cnn_model.py:6
TEveElement::RemoveElementsInternal
virtual void RemoveElementsInternal()
Remove all elements.
Definition: TEveElement.cxx:1370
TEveElement::EndChildren
List_i EndChildren()
Definition: TEveElement.h:167
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
TEveElement::ProjectChild
virtual void ProjectChild(TEveElement *el, Bool_t same_depth=kTRUE)
If this is a projectable, loop over all projected replicas and add the projected image of child 'el' ...
Definition: TEveElement.cxx:1418
TEveElement::CloneElement
virtual TEveElement * CloneElement() const
Clone the element via copy constructor.
Definition: TEveElement.cxx:224
TEveElement::SelectElement
virtual void SelectElement(Bool_t state)
Set element's selection state. Stamp appropriately.
Definition: TEveElement.cxx:1892
TEveElement::PropagateVizParamsToElements
virtual void PropagateVizParamsToElements(TEveElement *el=0)
Propagate visualization parameters from element el (defaulting to this) to all elements (children).
Definition: TEveElement.cxx:443
Class
void Class()
Definition: Class.C:29
TEveElement::RefMainTrans
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
Definition: TEveElement.cxx:1261
TEveProjectable::AddProjectedsToSet
virtual void AddProjectedsToSet(std::set< TEveElement * > &set)
Add the projected elements to the set, dyn-casting them to TEveElement.
Definition: TEveProjectionBases.cxx:86
TEveElement::AddParent
virtual void AddParent(TEveElement *re)
Add re into the list parents.
Definition: TEveElement.cxx:635
TGListTreeItem
Definition: TGListTree.h:43
Char_t
char Char_t
Definition: RtypesCore.h:33
TEveElementList::fColor
Color_t fColor
Definition: TEveElement.h:438
TEveElement::SetTransMatrix
virtual void SetTransMatrix(Double_t *carr)
Set transformation matrix from column-major array.
Definition: TEveElement.cxx:1297
TEveProjectable::HasProjecteds
virtual Bool_t HasProjecteds() const
Definition: TEveProjectionBases.h:53
TEveManager::ElementChanged
void ElementChanged(TEveElement *element, Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE)
Element was changed, perform framework side action.
Definition: TEveManager.cxx:437
TEveElement::SpawnEditor
void SpawnEditor()
Show GUI editor for this object.
Definition: TEveElement.cxx:949
TEveElement::CopyVizParamsFromDB
virtual void CopyVizParamsFromDB()
Copy visualization parameters from the model-element fVizModel.
Definition: TEveElement.cxx:475
TEveElement::VizDB_UpdateModel
void VizDB_UpdateModel(Bool_t update=kTRUE)
Copy visual parameters from this element to viz-db model.
Definition: TEveElement.cxx:564
TEveElement::CollectSceneParentsFromChildren
virtual void CollectSceneParentsFromChildren(List_t &scenes, TEveElement *parent)
Collect scene-parents from all children.
Definition: TEveElement.cxx:705
TGListTreeItem::GetParent
TGListTreeItem * GetParent() const
Definition: TGListTree.h:73
TEveElement::Set_t
std::set< TEveElement * > Set_t
Definition: TEveElement.h:75
TEveElement::FindChild
TEveElement * FindChild(const TString &name, const TClass *cls=0)
Find the first child with given name.
Definition: TEveElement.cxx:1480
TEveElement::fParentIgnoreCnt
Int_t fParentIgnoreCnt
Definition: TEveElement.h:87
gROOT
#define gROOT
Definition: TROOT.h:406
TEveElementList::ProjectedClass
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEveCompoundProjected class.
Definition: TEveElement.cxx:2141
int
TBuffer3D::kCore
@ kCore
Definition: TBuffer3D.h:56
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:187
TEveElement::DisableListElements
void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFALSE)
Disable rendering of children and their list contents.
Definition: TEveElement.cxx:1598
TEveElement::NameTitleChanged
virtual void NameTitleChanged()
Virtual function called when a name or title of the element has been changed.
Definition: TEveElement.cxx:342
g
#define g(i)
Definition: RSha256.hxx:123