Logo ROOT  
Reference Guide
REveElement.cxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007, 2018
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, 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 <ROOT/REveElement.hxx>
13 #include <ROOT/REveUtil.hxx>
14 #include <ROOT/REveScene.hxx>
15 #include <ROOT/REveCompound.hxx>
16 #include <ROOT/REveTrans.hxx>
17 #include <ROOT/REveManager.hxx>
18 #include <ROOT/REveSelection.hxx>
21 #include <ROOT/REveRenderData.hxx>
22 
23 #include "TGeoMatrix.h"
24 
25 #include "TClass.h"
26 #include "TPRegexp.h"
27 #include "TROOT.h"
28 #include "TColor.h"
29 
30 #include <cassert>
31 
32 
33 #include <algorithm>
34 
35 using namespace ROOT::Experimental;
36 namespace REX = ROOT::Experimental;
37 
38 /** \class REveElement
39 \ingroup REve
40 Base class for REveUtil visualization elements, providing hierarchy
41 management, rendering control and list-tree item management.
42 
43 Class of acceptable children can be limited by setting the
44 fChildClass member.
45 */
46 
47 ////////////////////////////////////////////////////////////////////////////////
48 /// Default constructor.
49 
50 REveElement::REveElement(const std::string& name, const std::string& title) :
51  fName (name),
52  fTitle (title)
53 {
54 }
55 
56 ////////////////////////////////////////////////////////////////////////////////
57 /// Copy constructor. Does shallow copy.
58 /// For deep-cloning and children-cloning, see:
59 /// ~~~ {.cpp}
60 /// REveElement* CloneElementRecurse(Int_t level)
61 /// void CloneChildrenRecurse(REveElement* dest, Int_t level)
62 /// ~~~
63 /// 'void* UserData' is NOT copied.
64 /// If the element is projectable, its projections are NOT copied.
65 ///
66 /// Not implemented for most sub-classes, let us know.
67 /// Note that sub-classes of REveProjected are NOT and will NOT be copyable.
68 
70  fName (e.fName),
71  fTitle (e.fTitle),
72  fChildClass (e.fChildClass),
73  fVizTag (e.fVizTag),
74  fDestroyOnZeroRefCnt (e.fDestroyOnZeroRefCnt),
75  fRnrSelf (e.fRnrSelf),
76  fRnrChildren (e.fRnrChildren),
77  fCanEditMainColor (e.fCanEditMainColor),
78  fCanEditMainTransparency(e.fCanEditMainTransparency),
79  fCanEditMainTrans (e.fCanEditMainTrans),
80  fMainTransparency (e.fMainTransparency),
81  fPickable (e.fPickable),
82  fCSCBits (e.fCSCBits)
83 {
84  SetVizModel(e.fVizModel);
85  // FIXME: from Sergey: one have to use other way to referencing main color
86  if (e.fMainColorPtr)
87  fMainColorPtr = (Color_t*)((const char*) this + ((const char*) e.fMainColorPtr - (const char*) &e));
88  if (e.fMainTrans)
89  fMainTrans = std::make_unique<REveTrans>(*e.fMainTrans.get());
90 }
91 
92 ////////////////////////////////////////////////////////////////////////////////
93 /// Destructor. Do not call this method directly, either call Destroy() or
94 /// Annihilate(). See also DestroyElements() and AnnihilateElements() if you
95 /// need to delete all children of an element.
96 
98 {
100  {
103 
104  if (fMother) {
106  fMother->fChildren.remove(this);
107  }
108 
109  if (fScene) {
111  }
112 
113  for (auto &au : fAunts)
114  {
115  au->RemoveNieceInternal(this);
116  }
117  }
118 }
119 
121 {
122  return fMother ? fMother->GetElementId() : 0;
123 }
124 
126 {
127  return fScene ? fScene->GetElementId() : 0;
128 }
129 
131 {
132  assert(fElementId == 0);
133 
134  REX::gEve->AssignElementId(this);
135  for (auto &c : fChildren)
136  c->assign_element_id_recurisvely();
137 }
138 
139 std::string REveElement::GetHighlightTooltip(const std::set<int>& iSet) const
140 {
141  std::string res = fTitle;
142  if (res.empty())
143  res = fName;
144 
145  if (!iSet.empty())
146  res = TString::Format("%s idx=%d", res.c_str(), *iSet.begin());
147 
148  return res;
149 }
150 
152 {
153  assert(fScene == nullptr);
154 
155  fScene = s;
156 
157  // XXX MT -- Why do we have fDestructing here? Can this really happen?
158  // If yes, shouldn't we block it in AddElement() already?
160  {
162  }
163  for (auto &c : fChildren)
164  c->assign_scene_recursively(s);
165 }
166 
167 ////////////////////////////////////////////////////////////////////////////////
168 /// Called before the element is deleted, thus offering the last chance
169 /// to detach from acquired resources and from the framework itself.
170 /// Here the request is just passed to REveManager.
171 /// If you override it, make sure to call base-class version.
172 
174 {
175  if (fElementId != 0)
176  {
178  }
179 }
180 
181 ////////////////////////////////////////////////////////////////////////////////
182 /// Clone the element via copy constructor.
183 /// Should be implemented for all classes that require cloning support.
184 
186 {
187  return new REveElement(*this);
188 }
189 
190 ////////////////////////////////////////////////////////////////////////////////
191 /// Clone elements and recurse 'level' deep over children.
192 /// - If level == 0, only the element itself is cloned (default).
193 /// - If level == -1, all the hierarchy is cloned.
194 
196 {
197  REveElement* el = CloneElement();
198  if (level--)
199  {
200  CloneChildrenRecurse(el, level);
201  }
202  return el;
203 }
204 
205 ////////////////////////////////////////////////////////////////////////////////
206 /// Clone children and attach them to the dest element.
207 /// If level == 0, only the direct descendants are cloned (default).
208 /// If level == -1, all the hierarchy is cloned.
209 
211 {
212  for (auto &c: fChildren)
213  dest->AddElement(c->CloneElementRecurse(level));
214 }
215 
216 
217 //==============================================================================
218 
219 ////////////////////////////////////////////////////////////////////////////////
220 /// Set name of an element.
221 
222 void REveElement::SetName(const std::string& name)
223 {
224  fName = name;
226 }
227 
228 ////////////////////////////////////////////////////////////////////////////////
229 /// Set title of an element.
230 
231 void REveElement::SetTitle(const std::string& title)
232 {
233  fTitle = title;
235 }
236 
237 ////////////////////////////////////////////////////////////////////////////////
238 /// Set name and title of an element.
239 /// Here we attempt to cast the assigned object into TNamed and call
240 /// SetNameTitle() there.
241 /// If you override this call NameTitleChanged() from there.
242 
243 void REveElement::SetNameTitle(const std::string& name, const std::string& title)
244 {
245  fName = name;
246  fTitle = title;
248 }
249 
250 ////////////////////////////////////////////////////////////////////////////////
251 /// Virtual function called when a name or title of the element has
252 /// been changed.
253 /// If you override this, call also the version of your direct base-class.
254 
256 {
257  // Should send out some message. Need a new stamp type?
258 }
259 
260 ////////////////////////////////////////////////////////////////////////////////
261 /// Set visualization-parameter model element.
262 /// Calling of this function from outside of EVE should in principle
263 /// be avoided as it can lead to dis-synchronization of viz-tag and
264 /// viz-model.
265 
267 {
268  fVizModel = model;
269 }
270 
271 ////////////////////////////////////////////////////////////////////////////////
272 /// Find model element in VizDB that corresponds to previously
273 /// assigned fVizTag and set fVizModel accordingly.
274 /// If the tag is not found in VizDB, the old model-element is kept
275 /// and false is returned.
276 
278 {
280  if (model)
281  {
283  return kTRUE;
284  }
285  else
286  {
287  return kFALSE;
288  }
289 }
290 
291 ////////////////////////////////////////////////////////////////////////////////
292 /// Set the VizTag, find model-element from the VizDB and copy
293 /// visualization-parameters from it. If the model is not found and
294 /// fallback_tag is non-null, search for it is attempted as well.
295 /// For example: ApplyVizTag("TPC Clusters", "Clusters");
296 ///
297 /// If the model-element can not be found a warning is printed and
298 /// false is returned.
299 
300 Bool_t REveElement::ApplyVizTag(const TString& tag, const TString& fallback_tag)
301 {
303 
304  if ((model = REX::gEve->FindVizDBEntry(tag)) != nullptr)
305  {
306  SetVizTag(tag);
307  }
308  else if ( ! fallback_tag.IsNull() && (model = REX::gEve->FindVizDBEntry(fallback_tag)) != nullptr)
309  {
310  SetVizTag(fallback_tag);
311  }
312 
313  if (model)
314  {
317  return true;
318  }
319  Warning("REveElement::ApplyVizTag", "entry for tag '%s' not found in VizDB.", tag.Data());
320  return false;
321 }
322 
323 ////////////////////////////////////////////////////////////////////////////////
324 /// Propagate visualization parameters to dependent elements.
325 ///
326 /// MainColor is propagated independently in SetMainColor().
327 /// In this case, as fMainColor is a pointer to Color_t, it should
328 /// be set in TProperClass::CopyVizParams().
329 ///
330 /// Render state is not propagated. Maybe it should be, at least optionally.
331 
333 {
334  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
335  if (pable && pable->HasProjecteds())
336  {
337  pable->PropagateVizParams();
338  }
339 }
340 
341 ////////////////////////////////////////////////////////////////////////////////
342 /// Propagate visualization parameters from element el (defaulting
343 /// to this) to all children.
344 ///
345 /// The primary use of this is for model-elements from
346 /// visualization-parameter database.
347 
349 {
350  if (!el) el = this;
351 
352  for (auto &c : fChildren)
353  {
354  c->CopyVizParams(el);
355  }
356 }
357 
358 ////////////////////////////////////////////////////////////////////////////////
359 /// Copy visualization parameters from element el.
360 /// This method needs to be overriden by any class that introduces
361 /// new parameters.
362 
364 {
369 
371 }
372 
373 ////////////////////////////////////////////////////////////////////////////////
374 /// Copy visualization parameters from the model-element fVizModel.
375 /// A warning is printed if the model-element fVizModel is not set.
376 
378 {
379  if (fVizModel)
380  {
382  }
383  else
384  {
385  Warning("REveElement::CopyVizParamsFromDB", "VizModel has not been set.");
386  }
387 }
388 
389 ////////////////////////////////////////////////////////////////////////////////
390 /// Save visualization parameters for this element with given tag.
391 ///
392 /// This function creates the instantiation code, calls virtual
393 /// WriteVizParams() and, at the end, writes out the code for
394 /// registration of the model into the VizDB.
395 
396 void REveElement::SaveVizParams(std::ostream& out, const TString& tag, const TString& var)
397 {
398  static const REveException eh("REveElement::GetObject ");
399 
400  TString t = " ";
401  TString cls(IsA()->GetName());
402 
403  out << "\n";
404 
405  TString intro = " TAG='" + tag + "', CLASS='" + cls + "'";
406  out << " //" << intro << "\n";
407  out << " //" << TString('-', intro.Length()) << "\n";
408  out << t << cls << "* " << var <<" = new " << cls << ";\n";
409 
410  WriteVizParams(out, var);
411 
412  out << t << "REX::gEve->InsertVizDBEntry(\"" << tag << "\", "<< var <<");\n";
413 }
414 
415 ////////////////////////////////////////////////////////////////////////////////
416 /// Write-out visual parameters for this object.
417 /// This is a virtual function and all sub-classes are required to
418 /// first call the base-element version.
419 /// The name of the element pointer is 'x%03d', due to cint limitations.
420 /// Three spaces should be used for indentation, same as in
421 /// SavePrimitive() methods.
422 
423 void REveElement::WriteVizParams(std::ostream& out, const TString& var)
424 {
425  TString t = " " + var + "->";
426 
427  out << t << "SetElementName(\"" << fName << "\");\n";
428  out << t << "SetElementTitle(\"" << fTitle << "\");\n";
429  out << t << "SetEditMainColor(" << fCanEditMainColor << ");\n";
430  out << t << "SetEditMainTransparency(" << fCanEditMainTransparency << ");\n";
431  out << t << "SetMainTransparency(" << fMainTransparency << ");\n";
432 }
433 
434 ////////////////////////////////////////////////////////////////////////////////
435 /// Set visual parameters for this object for given tag.
436 
437 void REveElement::VizDB_Apply(const std::string& tag)
438 {
439  if (ApplyVizTag(tag))
440  {
442  REX::gEve->Redraw3D();
443  }
444 }
445 
446 ////////////////////////////////////////////////////////////////////////////////
447 /// Reset visual parameters for this object from VizDB.
448 /// The model object must be already set.
449 
451 {
452  if (fVizModel)
453  {
456  REX::gEve->Redraw3D();
457  }
458 }
459 
460 ////////////////////////////////////////////////////////////////////////////////
461 /// Copy visual parameters from this element to viz-db model.
462 /// If update is set, all clients of the model will be updated to
463 /// the new value.
464 /// A warning is printed if the model-element fVizModel is not set.
465 
467 {
468  if (fVizModel)
469  {
470  fVizModel->CopyVizParams(this);
471  if (update)
472  {
473  // XXX Back references from vizdb templates have been removed in Eve7.
474  // XXX We could traverse all scenes and elementes and reset those that
475  // XXX have a matching fVizModel. Or something.
476  Error("VizDB_UpdateModel", "update from vizdb -> elements not implemented.");
477  // fVizModel->PropagateVizParamsToElements(fVizModel);
478  // REX::gEve->Redraw3D();
479  }
480  }
481  else
482  {
483  Warning("VizDB_UpdateModel", "VizModel has not been set.");
484  }
485 }
486 
487 ////////////////////////////////////////////////////////////////////////////////
488 /// Create a replica of element and insert it into VizDB with given tag.
489 /// If replace is true an existing element with the same tag will be replaced.
490 /// If update is true, existing client of tag will be updated.
491 
492 void REveElement::VizDB_Insert(const std::string& tag, Bool_t replace, Bool_t update)
493 {
494  static const REveException eh("REveElement::GetObject ");
495 
496  TClass* cls = IsA();
497  REveElement* el = reinterpret_cast<REveElement*>(cls->New());
498  if (!el) {
499  Error("VizDB_Insert", "Creation of replica failed.");
500  return;
501  }
502  el->CopyVizParams(this);
503  Bool_t succ = REX::gEve->InsertVizDBEntry(tag, el, replace, update);
504  if (succ && update)
505  REX::gEve->Redraw3D();
506 }
507 
508 ////////////////////////////////////////////////////////////////////////////////
509 /// Add el into the list aunts.
510 ///
511 /// Adding aunt is subordinate to adding a niece.
512 /// This is an internal function.
513 
515 {
516  assert(au != nullptr);
517 
518  fAunts.emplace_back(au);
519 }
520 
521 ////////////////////////////////////////////////////////////////////////////////
522 /// Remove el from the list of aunts.
523 /// Removing aunt is subordinate to removing a niece.
524 /// This is an internal function.
525 
527 {
528  assert(au != nullptr);
529 
530  fAunts.remove(au);
531 }
532 
533 /******************************************************************************/
534 
535 ////////////////////////////////////////////////////////////////////////////////
536 /// Check external references to this and eventually auto-destruct
537 /// the render-element.
538 
539 void REveElement::CheckReferenceCount(const std::string& from)
540 {
541  if (fDestructing != kNone)
542  return;
543 
544  if (fMother == nullptr && fDestroyOnZeroRefCnt && fDenyDestroy <= 0)
545  {
546  if (gDebug > 0)
547  Info("REveElement::CheckReferenceCount", "(called from %s) auto-destructing '%s' on zero reference count.",
548  from.c_str(), GetCName());
549 
551  delete this;
552  }
553 }
554 
555 ////////////////////////////////////////////////////////////////////////////////
556 /// Return class for this element
557 
559 {
560  return TClass::GetClass(typeid(*this), kTRUE, kTRUE);
561 }
562 
563 ////////////////////////////////////////////////////////////////////////////////
564 /// Export render-element to CINT with variable name var_name.
565 
566 void REveElement::ExportToCINT(const char *var_name)
567 {
568  const char* cname = IsA()->GetName();
569  gROOT->ProcessLine(TString::Format("%s* %s = (%s*)0x%lx;", cname, var_name, cname, (ULong_t)this));
570 }
571 
572 ////////////////////////////////////////////////////////////////////////////////
573 /// Set render state of this element, i.e. if it will be published
574 /// on next scene update pass.
575 /// Returns true if the state has changed.
576 
578 {
579  if (SingleRnrState())
580  {
581  return SetRnrState(rnr);
582  }
583 
584  if (rnr != fRnrSelf)
585  {
586  fRnrSelf = rnr;
587  StampVisibility();
589 
590  return kTRUE;
591  }
592  return kFALSE;
593 }
594 
595 ////////////////////////////////////////////////////////////////////////////////
596 /// Set render state of this element's children, i.e. if they will
597 /// be published on next scene update pass.
598 /// Returns true if the state has changed.
599 
601 {
602  if (SingleRnrState())
603  {
604  return SetRnrState(rnr);
605  }
606 
607  if (rnr != fRnrChildren)
608  {
609  fRnrChildren = rnr;
610  StampVisibility();
612  return kTRUE;
613  }
614  return kFALSE;
615 }
616 
617 ////////////////////////////////////////////////////////////////////////////////
618 /// Set state for rendering of this element and its children.
619 /// Returns true if the state has changed.
620 
622 {
623  if (SingleRnrState())
624  {
625  return SetRnrState(rnr_self);
626  }
627 
628  if (fRnrSelf != rnr_self || fRnrChildren != rnr_children)
629  {
630  fRnrSelf = rnr_self;
631  fRnrChildren = rnr_children;
632  StampVisibility();
634  return kTRUE;
635  }
636  return kFALSE;
637 }
638 
639 ////////////////////////////////////////////////////////////////////////////////
640 /// Set render state of this element and of its children to the same
641 /// value.
642 /// Returns true if the state has changed.
643 
645 {
646  if (fRnrSelf != rnr || fRnrChildren != rnr)
647  {
648  fRnrSelf = fRnrChildren = rnr;
649  StampVisibility();
651  return kTRUE;
652  }
653  return kFALSE;
654 }
655 
656 ////////////////////////////////////////////////////////////////////////////////
657 /// Propagate render state to the projected replicas of this element.
658 /// Maybe this should be optional on REX::gEve/element level.
659 
661 {
662  REveProjectable *pable = dynamic_cast<REveProjectable*>(this);
663  if (pable && pable->HasProjecteds())
664  {
666  }
667 }
668 
669 ////////////////////////////////////////////////////////////////////////////////
670 /// Set up element to use built-in main color and set flags allowing editing
671 /// of main color and transparency.
672 
673 void REveElement::SetupDefaultColorAndTransparency(Color_t col, Bool_t can_edit_color, Bool_t can_edit_transparency)
674 {
676  fDefaultColor = col;
677  fCanEditMainColor = can_edit_color;
678  fCanEditMainTransparency = can_edit_transparency;
679 }
680 
681 ////////////////////////////////////////////////////////////////////////////////
682 /// Set main color of the element.
683 
685 {
686  Color_t old_color = GetMainColor();
687 
688  if (fMainColorPtr)
689  {
690  *fMainColorPtr = color;
692  }
693 
694  PropagateMainColorToProjecteds(color, old_color);
695 }
696 
697 ////////////////////////////////////////////////////////////////////////////////
698 /// Convert pixel to Color_t and call SetMainColor().
699 
701 {
703 }
704 
705 ////////////////////////////////////////////////////////////////////////////////
706 /// Convert RGB values to Color_t and call SetMainColor.
707 
709 {
711 }
712 
713 ////////////////////////////////////////////////////////////////////////////////
714 /// Convert RGB values to Color_t and call SetMainColor.
715 
717 {
719 }
720 
721 ////////////////////////////////////////////////////////////////////////////////
722 /// Propagate color to projected elements.
723 
725 {
726  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
727  if (pable && pable->HasProjecteds())
728  {
729  pable->PropagateMainColor(color, old_color);
730  }
731 }
732 
733 ////////////////////////////////////////////////////////////////////////////////
734 /// Set main-transparency.
735 /// Transparency is clamped to [0, 100].
736 
738 {
739  Char_t old_t = GetMainTransparency();
740 
741  if (t > 100) t = 100;
742  fMainTransparency = t;
744 
746 }
747 
748 ////////////////////////////////////////////////////////////////////////////////
749 /// Set main-transparency via float alpha variable.
750 /// Value of alpha is clamped t0 [0, 1].
751 
753 {
754  if (alpha < 0) alpha = 0;
755  if (alpha > 1) alpha = 1;
756  SetMainTransparency((Char_t) (100.0f*(1.0f - alpha)));
757 }
758 
759 ////////////////////////////////////////////////////////////////////////////////
760 /// Propagate transparency to projected elements.
761 
763 {
764  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
765  if (pable && pable->HasProjecteds())
766  {
767  pable->PropagateMainTransparency(t, old_t);
768  }
769 }
770 
771 ////////////////////////////////////////////////////////////////////////////////
772 /// Return pointer to main transformation. If 'create' flag is set (default)
773 /// it is created if not yet existing.
774 
776 {
777  if (!fMainTrans && create)
778  InitMainTrans();
779 
780  return fMainTrans.get();
781 }
782 
783 ////////////////////////////////////////////////////////////////////////////////
784 /// Return reference to main transformation. It is created if not yet
785 /// existing.
786 
788 {
789  if (!fMainTrans)
790  InitMainTrans();
791 
792  return *fMainTrans.get();
793 }
794 
795 ////////////////////////////////////////////////////////////////////////////////
796 /// Initialize the main transformation to identity matrix.
797 /// If can_edit is true (default), the user will be able to edit the
798 /// transformation parameters via GUI.
799 
801 {
802  if (fMainTrans)
803  fMainTrans->UnitTrans();
804  else
805  fMainTrans = std::make_unique<REveTrans>();
806  fCanEditMainTrans = can_edit;
807 }
808 
809 ////////////////////////////////////////////////////////////////////////////////
810 /// Destroy the main transformation matrix, it will always be taken
811 /// as identity. Editing of transformation parameters is disabled.
812 
814 {
815  fMainTrans.reset(nullptr);
817 }
818 
819 ////////////////////////////////////////////////////////////////////////////////
820 /// Set transformation matrix from column-major array.
821 
823 {
824  RefMainTrans().SetFrom(carr);
825 }
826 
827 ////////////////////////////////////////////////////////////////////////////////
828 /// Set transformation matrix from TGeo's matrix.
829 
831 {
832  RefMainTrans().SetFrom(mat);
833 }
834 
835 ////////////////////////////////////////////////////////////////////////////////
836 /// Check if el can be added to this element.
837 ///
838 /// Here we make sure the new child is not equal to this and, if fChildClass
839 /// is set, that it is inherited from it.
840 
842 {
843  if (el == this)
844  return kFALSE;
845  if (fChildClass && ! el->IsA()->InheritsFrom(fChildClass))
846  return kFALSE;
847  return kTRUE;
848 }
849 
850 ////////////////////////////////////////////////////////////////////////////////
851 /// Add el to the list of children.
852 
854 {
855  static const REveException eh("REveElement::AddElement ");
856 
857  if (!el) throw eh + "called with nullptr argument.";
858  if ( ! AcceptElement(el)) throw eh + Form("parent '%s' rejects '%s'.", GetCName(), el->GetCName());
859  if (el->fElementId) throw eh + "element already has an id.";
860  // if (el->fScene) throw eh + "element already has a Scene.";
861  if (el->fMother) throw eh + "element already has a Mother.";
862 
863  // XXX Implement reparent --> MoveElement() ????
864  // Actually, better to do new = old.Clone(), RemoveElement(old), AddElement(new);
865  // Or do magick with Inc/DecDenyDestroy().
866  // PITA with existing children !!!! Need to re-scene them.
867 
869  if (fScene && ! el->fScene) el->assign_scene_recursively(fScene);
870 
871  el->fMother = this;
872 
873  fChildren.emplace_back(el);
874 
875  // XXXX This should be element added. Also, should be different for
876  // "full (re)construction". Scenes should manage that and have
877  // state like: none - constructing - clearing - nominal - updating.
878  // I recon this means an element should have a ptr to its scene.
879  //
880  // ElementChanged();
881 }
882 
883 ////////////////////////////////////////////////////////////////////////////////
884 /// Remove el from the list of children.
885 
887 {
888  static const REveException eh("REveElement::RemoveElement ");
889 
890  if (!el) throw eh + "called with nullptr argument.";
891  if (el->fMother != this) throw eh + "this element is not mother of el.";
892 
893  RemoveElementLocal(el);
894 
896  el->fMother = nullptr;
897  el->fScene = nullptr;
898 
899  el->CheckReferenceCount();
900 
901  fChildren.remove(el);
902 
903  // XXXX This should be ElementRemoved(). Also, think about recursion, deletion etc.
904  // Also, this seems to be done above, in the call to fScene.
905  //
906  // ElementChanged();
907 }
908 
909 ////////////////////////////////////////////////////////////////////////////////
910 /// Perform additional local removal of el.
911 /// Called from RemoveElement() which does whole untangling.
912 /// Put into special function as framework-related handling of
913 /// element removal should really be common to all classes and
914 /// clearing of local structures happens in between removal
915 /// of list-tree-items and final removal.
916 /// If you override this, you should also override
917 /// RemoveElementsLocal().
918 
920 {
921 }
922 
923 ////////////////////////////////////////////////////////////////////////////////
924 /// Remove all elements. This assumes removing of all elements can
925 /// be done more efficiently then looping over them and removing one
926 /// by one. This protected function performs the removal on the
927 /// level of REveElement.
928 
930 {
932 
933  for (auto &c : fChildren)
934  {
935  c->fScene->SceneElementRemoved(c->fElementId);
936  c->fMother = nullptr;
937  c->fScene = nullptr;
938 
939  c->CheckReferenceCount();
940  }
941 
942  fChildren.clear();
943 }
944 
945 ////////////////////////////////////////////////////////////////////////////////
946 /// Remove all elements. This assumes removing of all elements can
947 /// be done more efficiently then looping over them and removing
948 /// them one by one.
949 
951 {
952  if (HasChildren())
953  {
955  // ElementChanged();
956  }
957 }
958 
959 ////////////////////////////////////////////////////////////////////////////////
960 /// Perform additional local removal of all elements.
961 /// See comment to RemoveElementLocal(REveElement*).
962 
964 {
965 }
966 
967 ////////////////////////////////////////////////////////////////////////////////
968 /// If this is a projectable, loop over all projected replicas and
969 /// add the projected image of child 'el' there. This is supposed to
970 /// be called after you add a child to a projectable after it has
971 /// already been projected.
972 /// You might also want to call RecheckImpliedSelections() on this
973 /// element or 'el'.
974 ///
975 /// If 'same_depth' flag is true, the same depth as for parent object
976 /// is used in every projection. Otherwise current depth of each
977 /// relevant projection-manager is used.
978 
980 {
981  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
982  if (pable && HasChild(el))
983  {
984  for (auto &pp: pable->RefProjecteds())
985  {
986  auto pmgr = pp->GetManager();
987  Float_t cd = pmgr->GetCurrentDepth();
988  if (same_depth) pmgr->SetCurrentDepth(pp->GetDepth());
989 
990  pmgr->SubImportElements(el, pp->GetProjectedAsElement());
991 
992  if (same_depth) pmgr->SetCurrentDepth(cd);
993  }
994  }
995 }
996 
997 ////////////////////////////////////////////////////////////////////////////////
998 /// If this is a projectable, loop over all projected replicas and
999 /// add the projected image of all children there. This is supposed
1000 /// to be called after you destroy all children and then add new
1001 /// ones after this element has already been projected.
1002 /// You might also want to call RecheckImpliedSelections() on this
1003 /// element.
1004 ///
1005 /// If 'same_depth' flag is true, the same depth as for the
1006 /// projected element is used in every projection. Otherwise current
1007 /// depth of each relevant projection-manager is used.
1008 
1010 {
1011  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
1012  if (pable)
1013  {
1014  for (auto &pp: pable->RefProjecteds())
1015  {
1016  REveProjectionManager *pmgr = pp->GetManager();
1017  Float_t cd = pmgr->GetCurrentDepth();
1018  if (same_depth) pmgr->SetCurrentDepth(pp->GetDepth());
1019 
1020  pmgr->SubImportChildren(this, pp->GetProjectedAsElement());
1021 
1022  if (same_depth) pmgr->SetCurrentDepth(cd);
1023  }
1024  }
1025 }
1026 
1027 ////////////////////////////////////////////////////////////////////////////////
1028 /// Check if element el is a child of this element.
1029 
1031 {
1032  return (std::find(fChildren.begin(), fChildren.end(), el) != fChildren.end());
1033 }
1034 
1035 ////////////////////////////////////////////////////////////////////////////////
1036 /// Find the first child with given name. If cls is specified (non
1037 /// 0), it is also checked.
1038 ///
1039 /// Returns nullptr if not found.
1040 
1042 {
1043  for (auto &c: fChildren)
1044  {
1045  if (name.CompareTo(c->GetCName()) == 0)
1046  {
1047  if (!cls || c->IsA()->InheritsFrom(cls))
1048  return c;
1049  }
1050  }
1051  return nullptr;
1052 }
1053 
1054 ////////////////////////////////////////////////////////////////////////////////
1055 /// Find the first child whose name matches regexp. If cls is
1056 /// specified (non 0), it is also checked.
1057 ///
1058 /// Returns nullptr if not found.
1059 
1061 {
1062  for (auto &c: fChildren)
1063  {
1064  if (regexp.MatchB(c->GetName()))
1065  {
1066  if (!cls || c->IsA()->InheritsFrom(cls))
1067  return c;
1068  }
1069  }
1070  return nullptr;
1071 }
1072 
1073 ////////////////////////////////////////////////////////////////////////////////
1074 /// Find all children with given name and append them to matches
1075 /// list. If class is specified (non 0), it is also checked.
1076 ///
1077 /// Returns number of elements added to the list.
1078 
1080  const TString& name, const TClass* cls)
1081 {
1082  Int_t count = 0;
1083  for (auto &c: fChildren)
1084  {
1085  if (name.CompareTo(c->GetCName()) == 0)
1086  {
1087  if (!cls || c->IsA()->InheritsFrom(cls))
1088  {
1089  matches.push_back(c);
1090  ++count;
1091  }
1092  }
1093  }
1094  return count;
1095 }
1096 
1097 ////////////////////////////////////////////////////////////////////////////////
1098 /// Find all children whose name matches regexp and append them to
1099 /// matches list.
1100 ///
1101 /// Returns number of elements added to the list.
1102 
1104  TPRegexp &regexp, const TClass *cls)
1105 {
1106  Int_t count = 0;
1107  for (auto &c : fChildren)
1108  {
1109  if (regexp.MatchB(c->GetCName()))
1110  {
1111  if (!cls || c->IsA()->InheritsFrom(cls))
1112  {
1113  matches.push_back(c);
1114  ++count;
1115  }
1116  }
1117  }
1118  return count;
1119 }
1120 
1121 ////////////////////////////////////////////////////////////////////////////////
1122 /// Returns the first child element or 0 if the list is empty.
1123 
1125 {
1126  return HasChildren() ? fChildren.front() : nullptr;
1127 }
1128 
1129 ////////////////////////////////////////////////////////////////////////////////
1130 /// Returns the last child element or 0 if the list is empty.
1131 
1133 {
1134  return HasChildren() ? fChildren.back() : nullptr;
1135 }
1136 
1137 ////////////////////////////////////////////////////////////////////////////////
1138 /// Enable rendering of children and their list contents.
1139 /// Arguments control how to set self/child rendering.
1140 
1141 void REveElement::EnableListElements(Bool_t rnr_self, Bool_t rnr_children)
1142 {
1143  for (auto &c: fChildren)
1144  c->SetRnrSelfChildren(rnr_self, rnr_children);
1145 }
1146 
1147 ////////////////////////////////////////////////////////////////////////////////
1148 /// Disable rendering of children and their list contents.
1149 /// Arguments control how to set self/child rendering.
1150 ///
1151 /// Same as above function, but default arguments are different. This
1152 /// is convenient for calls via context menu.
1153 
1154 void REveElement::DisableListElements(Bool_t rnr_self, Bool_t rnr_children)
1155 {
1156  for (auto &c: fChildren)
1157  c->SetRnrSelfChildren(rnr_self, rnr_children);
1158 }
1159 
1160 ////////////////////////////////////////////////////////////////////////////////
1161 /// Protected member function called from REveElement::Annihilate().
1162 
1164 {
1165  // projected were already destroyed in REveElement::Anihilate(), now only clear its list
1166  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
1167  if (pable && pable->HasProjecteds())
1168  pable->ClearProjectedList();
1169 
1170  // same as REveElement::RemoveElementsInternal(), except parents are ignored
1172  for (auto &c : fChildren)
1173  c->AnnihilateRecursively();
1174 
1175  fChildren.clear();
1176 
1178  PreDeleteElement();
1179 
1180  delete this;
1181 }
1182 
1183 ////////////////////////////////////////////////////////////////////////////////
1184 /// Optimized destruction without check of reference-count.
1185 /// Parents are not notified about child destruction.
1186 /// The method should only be used when an element does not have
1187 /// more than one parent -- otherwise an exception is thrown.
1188 
1190 {
1191  static const REveException eh("REveElement::Annihilate ");
1192 
1194 
1195  // recursive annihilation of projecteds
1196  REveProjectable* pable = dynamic_cast<REveProjectable*>(this);
1197  if (pable && pable->HasProjecteds())
1198  {
1199  pable->AnnihilateProjecteds();
1200  }
1201 
1202  // detach from the parent
1203  if (fMother)
1204  {
1205  fMother->RemoveElement(this);
1206  }
1207 
1208  // XXXX wont the above already start off the destruction cascade ?????
1209 
1211 
1212  // XXXX ????? Annihilate flag ???? Is it different than regular remove ????
1213  // REX::gEve->Redraw3D();
1214 }
1215 
1216 ////////////////////////////////////////////////////////////////////////////////
1217 /// Annihilate elements.
1218 
1220 {
1221  while (!fChildren.empty())
1222  {
1223  auto c = fChildren.front();
1224  c->Annihilate();
1225  }
1226 }
1227 
1228 ////////////////////////////////////////////////////////////////////////////////
1229 /// Destroy this element. Throws an exception if deny-destroy is in force.
1230 /// This method should be called instead of a destructor.
1231 /// Note that an exception will be thrown if the element has been
1232 /// protected against destruction with IncDenyDestroy().
1233 
1235 {
1236  static const REveException eh("REveElement::Destroy ");
1237 
1238  if (fDenyDestroy > 0)
1239  throw eh + TString::Format("element '%s' (%s*) %p is protected against destruction.",
1240  GetCName(), IsA()->GetName(), this);
1241 
1242  PreDeleteElement();
1243  delete this;
1244  REX::gEve->Redraw3D();
1245 }
1246 
1247 ////////////////////////////////////////////////////////////////////////////////
1248 /// Destroy this element. Prints a warning if deny-destroy is in force.
1249 
1251 {
1252  try
1253  {
1254  Destroy();
1255  }
1256  catch (REveException &exc)
1257  {
1258  ::Warning("REveElement::DestroyOrWarn", "Error while destroy element %p : %s", this, exc.what());
1259  }
1260 }
1261 
1262 ////////////////////////////////////////////////////////////////////////////////
1263 /// Destroy all children of this element.
1264 
1266 {
1267  while (HasChildren())
1268  {
1269  auto c = fChildren.front();
1270  if (c->fDenyDestroy <= 0)
1271  {
1272  try {
1273  c->Destroy();
1274  }
1275  catch (REveException &exc) {
1276  ::Warning("REveElement::DestroyElements", "element destruction failed: '%s'.", exc.what());
1277  RemoveElement(c);
1278  }
1279  }
1280  else
1281  {
1282  if (gDebug > 0)
1283  ::Info("REveElement::DestroyElements", "element '%s' is protected against destruction, removing locally.", c->GetCName());
1284  RemoveElement(c);
1285  }
1286  }
1287 
1288  REX::gEve->Redraw3D();
1289 }
1290 
1291 ////////////////////////////////////////////////////////////////////////////////
1292 /// Returns state of flag determining if the element will be
1293 /// destroyed when reference count reaches zero.
1294 /// This is true by default.
1295 
1297 {
1298  return fDestroyOnZeroRefCnt;
1299 }
1300 
1301 ////////////////////////////////////////////////////////////////////////////////
1302 /// Sets the state of flag determining if the element will be
1303 /// destroyed when reference count reaches zero.
1304 /// This is true by default.
1305 
1307 {
1309 }
1310 
1311 ////////////////////////////////////////////////////////////////////////////////
1312 /// Returns the number of times deny-destroy has been requested on
1313 /// the element.
1314 
1316 {
1317  return fDenyDestroy;
1318 }
1319 
1320 ////////////////////////////////////////////////////////////////////////////////
1321 /// Increases the deny-destroy count of the element.
1322 /// Call this if you store an external pointer to the element.
1323 
1325 {
1326  ++fDenyDestroy;
1327 }
1328 
1329 ////////////////////////////////////////////////////////////////////////////////
1330 /// Decreases the deny-destroy count of the element.
1331 /// Call this after releasing an external pointer to the element.
1332 
1334 {
1335  if (--fDenyDestroy <= 0)
1336  CheckReferenceCount("REveElement::DecDenyDestroy ");
1337 }
1338 
1339 ////////////////////////////////////////////////////////////////////////////////
1340 /// Set pickable state on the element and all its children.
1341 
1343 {
1344  fPickable = p;
1345  for (auto &c: fChildren)
1346  c->SetPickableRecursively(p);
1347 }
1348 
1349 ////////////////////////////////////////////////////////////////////////////////
1350 /// Returns the master element - that is:
1351 /// - master of projectable, if this is a projected;
1352 /// - master of compound, if fCompound is set;
1353 /// - master of mother, if kSCBTakeMotherAsMaster bit is set;
1354 /// If non of the above is true, *this* is returned.
1355 
1357 {
1358  if (fSelectionMaster) return fSelectionMaster;
1359 
1360  REveProjected* proj = dynamic_cast<REveProjected*>(this);
1361  if (proj)
1362  {
1363  return dynamic_cast<REveElement*>(proj->GetProjectable())->GetSelectionMaster();
1364  }
1365  if (fCompound)
1366  {
1367  return fCompound->GetSelectionMaster();
1368  }
1370  {
1371  return fMother->GetSelectionMaster();
1372  }
1373  return this;
1374 }
1375 
1376 ////////////////////////////////////////////////////////////////////////////////
1377 /// Populate set impSelSet with derived / dependant elements.
1378 ///
1379 /// If this is a REveProjectable, the projected replicas are added
1380 /// to the set. Thus it does not have to be reimplemented for each
1381 /// sub-class of REveProjected.
1382 ///
1383 /// Note that this also takes care of projections of REveCompound
1384 /// class, which is also a projectable.
1385 
1387 {
1388  REveProjectable* p = dynamic_cast<REveProjectable*>(this);
1389  if (p)
1390  p->AddProjectedsToSet(impSelSet);
1391 }
1392 
1393 ////////////////////////////////////////////////////////////////////////////////
1394 /// Call this if it is possible that implied-selection or highlight
1395 /// has changed for this element or for implied-selection this
1396 /// element is member of and you want to maintain consistent
1397 /// selection state.
1398 /// This can happen if you add elements into compounds in response
1399 /// to user-interaction.
1400 
1402 {
1403  // XXXX MT 2019-01 --- RecheckImpliedSelections
1404  //
1405  // With removal of selection state from this class there might be some
1406  // corner cases requiring checking of implied-selected state in
1407  // selection/highlight objects.
1408  //
1409  // This could be done as part of begin / end changes on the EveManager level.
1410  //
1411  // See also those functions in TEveSelection.
1412 
1413  // if (fSelected || fImpliedSelected)
1414  // REX::gEve->GetSelection()->RecheckImpliedSetForElement(this);
1415 
1416  // if (fHighlighted || fImpliedHighlighted)
1417  // REX::gEve->GetHighlight()->RecheckImpliedSetForElement(this);
1418 }
1419 
1420 ////////////////////////////////////////////////////////////////////////////////
1421 /// Add (bitwise or) given stamps to fChangeBits.
1422 /// Register this element to REX::gEve as stamped.
1423 /// This method is virtual so that sub-classes can add additional
1424 /// actions. The base-class method should still be called (or replicated).
1425 
1427 {
1429  {
1430  if (gDebug > 0)
1431  ::Info(Form("%s::AddStamp", GetCName()), "%d + (%d) -> %d", fChangeBits, bits, fChangeBits | bits);
1432 
1433  if (fChangeBits == 0)
1434  {
1435  fScene->SceneElementChanged(this);
1436  }
1437 
1438  fChangeBits |= bits;
1439  }
1440 }
1441 
1442 ////////////////////////////////////////////////////////////////////////////////
1443 /// Write transformation Matrix to render data
1444 ////////////////////////////////////////////////////////////////////////////////
1445 
1447 {
1448  if (fMainTrans.get())
1449  {
1450  fRenderData->SetMatrix(fMainTrans->Array());
1451  }
1452 }
1453 
1454 ////////////////////////////////////////////////////////////////////////////////
1455 /// Convert Bool_t to string - kTRUE or kFALSE.
1456 /// Needed in WriteVizParams().
1457 
1458 const std::string& REveElement::ToString(Bool_t b)
1459 {
1460  static const std::string true_str ("kTRUE");
1461  static const std::string false_str("kFALSE");
1462 
1463  return b ? true_str : false_str;
1464 }
1465 
1466 ////////////////////////////////////////////////////////////////////////////////
1467 /// Write core json. If rnr_offset is negative, render data shall not be
1468 /// written.
1469 /// Returns number of bytes written into binary render data.
1470 
1471 Int_t REveElement::WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
1472 {
1473  j["_typename"] = IsA()->GetName();
1474  j["fName"] = fName;
1475  j["fTitle"] = fTitle;
1476  j["fElementId"] = GetElementId();
1477  j["fMotherId"] = get_mother_id();
1478  j["fSceneId"] = get_scene_id();
1479  j["fMasterId"] = GetSelectionMaster()->GetElementId();
1480 
1481  j["fRnrSelf"] = GetRnrSelf();
1482  j["fRnrChildren"] = GetRnrChildren();
1483 
1484  j["fMainColor"] = GetMainColor();
1485  j["fMainTransparency"] = GetMainTransparency();
1486  j["fPickable"] = fPickable;
1487 
1488  Int_t ret = 0;
1489 
1490  if (rnr_offset >= 0) {
1491  BuildRenderData();
1492 
1493  if (fRenderData) {
1494  nlohmann::json rd = {};
1495 
1496  rd["rnr_offset"] = rnr_offset;
1497  rd["rnr_func"] = fRenderData->GetRnrFunc();
1498  rd["vert_size"] = fRenderData->SizeV();
1499  rd["norm_size"] = fRenderData->SizeN();
1500  rd["index_size"] = fRenderData->SizeI();
1501  rd["trans_size"] = fRenderData->SizeT();
1502 
1503  j["render_data"] = rd;
1504 
1505  ret = fRenderData->GetBinarySize();
1506  }
1507  }
1508 
1509  return ret;
1510 }
c
#define c(i)
Definition: RSha256.hxx:101
ROOT::Experimental::REveElement::SetVizTag
void SetVizTag(const TString &tag)
Definition: REveElement.hxx:126
ROOT::Experimental::REveProjected
Definition: REveProjectionBases.hxx:81
ROOT::Experimental::REveElement::fCanEditMainTrans
Bool_t fCanEditMainTrans
Definition: REveElement.hxx:85
ROOT::Experimental::REveElement::fRnrSelf
Bool_t fRnrSelf
Definition: REveElement.hxx:81
ROOT::Experimental::REveElement::SaveVizParams
void SaveVizParams(std::ostream &out, const TString &tag, const TString &var)
Save visualization parameters for this element with given tag.
Definition: REveElement.cxx:396
ROOT::Experimental::REveElement::CheckReferenceCount
virtual void CheckReferenceCount(const std::string &from="<unknown>")
Check external references to this and eventually auto-destruct the render-element.
Definition: REveElement.cxx:539
ROOT::Experimental::REveElement::ToString
static const std::string & ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
Definition: REveElement.cxx:1458
ROOT::Experimental::REveElement::VizDB_Insert
void VizDB_Insert(const std::string &tag, Bool_t replace=kTRUE, Bool_t update=kTRUE)
Create a replica of element and insert it into VizDB with given tag.
Definition: REveElement.cxx:492
ROOT::Experimental::REveElement::SetRnrChildren
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element's children, i.e.
Definition: REveElement.cxx:600
ROOT::Experimental::REveElement::RecheckImpliedSelections
void RecheckImpliedSelections()
Call this if it is possible that implied-selection or highlight has changed for this element or for i...
Definition: REveElement.cxx:1401
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
ROOT::Experimental::REveElement::SetDestroyOnZeroRefCnt
void SetDestroyOnZeroRefCnt(Bool_t d)
Sets the state of flag determining if the element will be destroyed when reference count reaches zero...
Definition: REveElement.cxx:1306
e
#define e(i)
Definition: RSha256.hxx:103
ROOT::Experimental::REveElement::DestroyMainTrans
virtual void DestroyMainTrans()
Destroy the main transformation matrix, it will always be taken as identity.
Definition: REveElement.cxx:813
Warning
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition: TError.cxx:231
ROOT::Experimental::REveElement::fChildren
List_t fChildren
Definition: REveElement.hxx:72
ROOT::Experimental::REveElement::ProjectChild
virtual void ProjectChild(REveElement *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: REveElement.cxx:979
ROOT::Experimental::REveElement::RemoveElements
virtual void RemoveElements()
Remove all elements.
Definition: REveElement.cxx:950
dest
#define dest(otri, vertexptr)
Definition: triangle.c:1040
ROOT::Experimental::REveElement::kAnnihilate
@ kAnnihilate
Definition: REveElement.hxx:281
ROOT::Experimental::REveElement::GetHighlightTooltip
virtual std::string GetHighlightTooltip(const std::set< int > &) const
Definition: REveElement.cxx:139
ROOT::Experimental::REveElement::DecDenyDestroy
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
Definition: REveElement.cxx:1333
ROOT::Experimental::REveElement::assign_element_id_recurisvely
void assign_element_id_recurisvely()
Definition: REveElement.cxx:130
ROOT::Experimental::REveElement::get_mother_id
ElementId_t get_mother_id() const
Definition: REveElement.cxx:120
ROOT::Experimental::REveElement::SetRnrSelf
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
Definition: REveElement.cxx:577
REveProjectionBases.hxx
TString::Data
const char * Data() const
Definition: TString.h:369
Pixel_t
ULong_t Pixel_t
Definition: GuiTypes.h:39
Form
char * Form(const char *fmt,...)
ROOT::Experimental::REveProjectable::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: REveProjectionBases.cxx:131
ROOT::Experimental::REveElement::VizDB_UpdateModel
void VizDB_UpdateModel(Bool_t update=kTRUE)
Copy visual parameters from this element to viz-db model.
Definition: REveElement.cxx:466
REveTrans.hxx
r
ROOT::R::TRInterface & r
Definition: Object.C:4
ROOT::Experimental::REveElement::StampElementAdded
void StampElementAdded()
Definition: REveElement.hxx:344
ROOT::Experimental::REveElement::CloneChildrenRecurse
virtual void CloneChildrenRecurse(REveElement *dest, Int_t level=0) const
Clone children and attach them to the dest element.
Definition: REveElement.cxx:210
ROOT::Experimental::REveProjectable::PropagateRenderState
virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children)
Set render state of projecteds.
Definition: REveProjectionBases.cxx:120
ROOT::Experimental::REveElement::VizDB_Apply
void VizDB_Apply(const std::string &tag)
Set visual parameters for this object for given tag.
Definition: REveElement.cxx:437
ROOT::Experimental::REveElement::TestCSCBits
Bool_t TestCSCBits(UChar_t f) const
Definition: REveElement.hxx:306
ROOT::Experimental::REveElement::RefMainTrans
virtual REveTrans & RefMainTrans()
Return reference to main transformation.
Definition: REveElement.cxx:787
ROOT::Experimental::REveElement::SetPickableRecursively
void SetPickableRecursively(Bool_t p)
Set pickable state on the element and all its children.
Definition: REveElement.cxx:1342
ROOT::Experimental::REveElement::PtrMainTrans
virtual REveTrans * PtrMainTrans(Bool_t create=kTRUE)
Return pointer to main transformation.
Definition: REveElement.cxx:775
ROOT::Experimental::REveElement::fName
std::string fName
Definition: REveElement.hxx:69
ROOT::Experimental::REveElement::GetRnrChildren
virtual Bool_t GetRnrChildren() const
Definition: REveElement.hxx:212
ROOT::Experimental::REveElement::StampVisibility
void StampVisibility()
Definition: REveElement.hxx:343
ROOT::Experimental::REveProjectable::AnnihilateProjecteds
virtual void AnnihilateProjecteds()
Optimized destroy of projected elements with condition there is only one parent for projected element...
Definition: REveProjectionBases.cxx:77
ROOT::Experimental::REveElement::NameTitleChanged
virtual void NameTitleChanged()
Virtual function called when a name or title of the element has been changed.
Definition: REveElement.cxx:255
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
ROOT::Experimental::REveElement::VizDB_Reapply
void VizDB_Reapply()
Reset visual parameters for this object from VizDB.
Definition: REveElement.cxx:450
ROOT::Experimental::REveElement::~REveElement
virtual ~REveElement()
Destructor.
Definition: REveElement.cxx:97
ROOT::Experimental::REveElement::fChangeBits
UChar_t fChangeBits
Definition: REveElement.hxx:335
ROOT::Experimental::REveElement::CloneElementRecurse
virtual REveElement * CloneElementRecurse(Int_t level=0) const
Clone elements and recurse 'level' deep over children.
Definition: REveElement.cxx:195
ROOT::Experimental::REveElement::fMother
REveElement * fMother
Definition: REveElement.hxx:58
ROOT::Experimental::REveElement::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: REveElement.cxx:1009
ROOT::Experimental::REveElement::PropagateVizParamsToChildren
virtual void PropagateVizParamsToChildren(REveElement *el=nullptr)
Propagate visualization parameters from element el (defaulting to this) to all children.
Definition: REveElement.cxx:348
TClass.h
ROOT::Experimental::REveElement::InitMainTrans
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
Definition: REveElement.cxx:800
ROOT::Experimental::REveElement::GetDestroyOnZeroRefCnt
Bool_t GetDestroyOnZeroRefCnt() const
Returns state of flag determining if the element will be destroyed when reference count reaches zero.
Definition: REveElement.cxx:1296
ROOT::Experimental::REveElement::fVizModel
REveElement * fVizModel
Definition: REveElement.hxx:75
ROOT::Experimental::REveElement::IsA
TClass * IsA() const
Return class for this element.
Definition: REveElement.cxx:558
TColor.h
ROOT::Experimental::REveTrans
Definition: REveTrans.hxx:30
ROOT::Experimental::REveProjectable::PropagateVizParams
virtual void PropagateVizParams(REveElement *el=nullptr)
Set visualization parameters of projecteds.
Definition: REveProjectionBases.cxx:108
ROOT::Experimental::REveElement::EnableListElements
void EnableListElements(Bool_t rnr_self=kTRUE, Bool_t rnr_children=kTRUE)
Enable rendering of children and their list contents.
Definition: REveElement.cxx:1141
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
ROOT::Experimental::REveElement::fDefaultColor
Color_t fDefaultColor
Definition: REveElement.hxx:88
ROOT::Experimental::REveElement::GetMainTransparency
virtual Char_t GetMainTransparency() const
Definition: REveElement.hxx:238
TString
Basic string class.
Definition: TString.h:136
ROOT::Experimental::REveElement
Definition: REveElement.hxx:41
Color_t
short Color_t
Definition: RtypesCore.h:83
ROOT::Experimental::REveElement::AcceptElement
virtual Bool_t AcceptElement(REveElement *el)
Check if el can be added to this element.
Definition: REveElement.cxx:841
ROOT::Experimental::REveElement::kStandard
@ kStandard
Definition: REveElement.hxx:280
ROOT::Experimental::REveElement::SetTitle
void SetTitle(const std::string &title)
Set title of an element.
Definition: REveElement.cxx:231
gEve
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
ROOT::Experimental::REveElement::FindChildren
Int_t FindChildren(List_t &matches, const TString &name, const TClass *cls=nullptr)
Find all children with given name and append them to matches list.
Definition: REveElement.cxx:1079
b
#define b(i)
Definition: RSha256.hxx:100
ROOT::Experimental::REveElement::SetTransMatrix
virtual void SetTransMatrix(Double_t *carr)
Set transformation matrix from column-major array.
Definition: REveElement.cxx:822
ROOT::Experimental::REveScene::SceneElementChanged
void SceneElementChanged(REveElement *element)
Definition: REveScene.cxx:88
ROOT::Experimental::REveElement::GetMainColor
virtual Color_t GetMainColor() const
Definition: REveElement.hxx:229
ROOT::Experimental::REveElement::fMainTrans
std::unique_ptr< REveTrans > fMainTrans
Definition: REveElement.hxx:90
bool
ROOT::Experimental::REveElement::AddAunt
virtual void AddAunt(REveAunt *au)
Add el into the list aunts.
Definition: REveElement.cxx:514
ROOT::Experimental::REveElement::SetRnrSelfChildren
virtual Bool_t SetRnrSelfChildren(Bool_t rnr_self, Bool_t rnr_children)
Set state for rendering of this element and its children.
Definition: REveElement.cxx:621
ROOT::Experimental::REveElement::kCBObjProps
@ kCBObjProps
Definition: REveElement.hxx:326
ROOT::Experimental::REveElement::FindChild
REveElement * FindChild(const TString &name, const TClass *cls=nullptr)
Find the first child with given name.
Definition: REveElement.cxx:1041
TROOT.h
REveRenderData.hxx
ROOT::Experimental::REveElement::FirstChild
REveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Definition: REveElement.cxx:1124
ROOT::Experimental::REveElement::LastChild
REveElement * LastChild() const
Returns the last child element or 0 if the list is empty.
Definition: REveElement.cxx:1132
ROOT::Experimental::REveElement::WriteCoreJson
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
Definition: REveElement.cxx:1471
ROOT::Experimental::REveElement::fCanEditMainTransparency
Bool_t fCanEditMainTransparency
Definition: REveElement.hxx:84
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
ROOT::Experimental::REveElement::HasChild
Bool_t HasChild(REveElement *el)
Check if element el is a child of this element.
Definition: REveElement.cxx:1030
ROOT::Experimental::REveElement::PropagateVizParamsToProjecteds
virtual void PropagateVizParamsToProjecteds()
Propagate visualization parameters to dependent elements.
Definition: REveElement.cxx:332
TPRegexp::MatchB
Bool_t MatchB(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Definition: TPRegexp.h:78
ROOT::Experimental::REveElement::ExportToCINT
virtual void ExportToCINT(const char *var_name)
Export render-element to CINT with variable name var_name.
Definition: REveElement.cxx:566
ROOT::Experimental::REveElement::Annihilate
virtual void Annihilate()
Optimized destruction without check of reference-count.
Definition: REveElement.cxx:1189
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
ROOT::Experimental::REveScene::SceneElementRemoved
void SceneElementRemoved(ElementId_t id)
Definition: REveScene.cxx:95
ROOT::Experimental::REveElement::SetRnrState
virtual Bool_t SetRnrState(Bool_t rnr)
Set render state of this element and of its children to the same value.
Definition: REveElement.cxx:644
ROOT::Experimental::REveElement::get_scene_id
ElementId_t get_scene_id() const
Definition: REveElement.cxx:125
TClass::InheritsFrom
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
Definition: TClass.cxx:4858
ROOT::Experimental::REveElement::fElementId
ElementId_t fElementId
Definition: REveElement.hxx:55
TPRegexp.h
ROOT::Experimental::REveElement::fCanEditMainColor
Bool_t fCanEditMainColor
Definition: REveElement.hxx:83
ROOT::Experimental::REveElement::FillImpliedSelectedSet
virtual void FillImpliedSelectedSet(Set_t &impSelSet)
Populate set impSelSet with derived / dependant elements.
Definition: REveElement.cxx:1386
ROOT::Experimental::REveElement::CloneElement
virtual REveElement * CloneElement() const
Clone the element via copy constructor.
Definition: REveElement.cxx:185
ROOT::Experimental::REveElement::SetMainColorPixel
void SetMainColorPixel(Pixel_t pixel)
Convert pixel to Color_t and call SetMainColor().
Definition: REveElement.cxx:700
ROOT::Experimental::REveElement::assign_scene_recursively
void assign_scene_recursively(REveScene *s)
Definition: REveElement.cxx:151
ROOT::Experimental::REveElement::fMainColorPtr
Color_t * fMainColorPtr
Definition: REveElement.hxx:89
ROOT::Experimental::REveElement::List_t
std::list< REveElement * > List_t
Definition: REveElement.hxx:48
ROOT::Experimental::REveElement::AnnihilateElements
virtual void AnnihilateElements()
Annihilate elements.
Definition: REveElement.cxx:1219
ROOT::Experimental::REveElement::GetCName
const char * GetCName() const
Definition: REveElement.hxx:114
ROOT::Experimental::REveElement::fRenderData
std::unique_ptr< REveRenderData > fRenderData
Externally assigned and controlled user data.
Definition: REveElement.hxx:94
ROOT::Experimental::REveScene
Definition: REveScene.hxx:34
ROOT::Experimental::REveElement::CopyVizParamsFromDB
virtual void CopyVizParamsFromDB()
Copy visualization parameters from the model-element fVizModel.
Definition: REveElement.cxx:377
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:4962
ROOT::Experimental::REveElement::AnnihilateRecursively
virtual void AnnihilateRecursively()
Protected member function called from REveElement::Annihilate().
Definition: REveElement.cxx:1163
REveElement.hxx
ROOT::Experimental::REveElement::CopyVizParams
virtual void CopyVizParams(const REveElement *el)
Copy visualization parameters from element el.
Definition: REveElement.cxx:363
ROOT::Experimental::REveElement::fChildClass
TClass * fChildClass
Definition: REveElement.hxx:73
ROOT::Experimental::REveElement::kNone
@ kNone
Definition: REveElement.hxx:279
REveScene.hxx
ROOT::Experimental::REveException
REveException Exception-type thrown by Eve classes.
Definition: REveTypes.hxx:40
ROOT::Experimental::REveElement::HasChildren
Bool_t HasChildren() const
Definition: REveElement.hxx:165
ROOT::Experimental::REveElement::kCBColorSelection
@ kCBColorSelection
Definition: REveElement.hxx:324
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
ROOT::Experimental::REveTrans::SetFrom
void SetFrom(Double_t *carr)
Definition: REveTrans.cxx:979
ROOT::Experimental::REveElement::DestroyOrWarn
virtual void DestroyOrWarn()
Destroy this element. Prints a warning if deny-destroy is in force.
Definition: REveElement.cxx:1250
ROOT::Experimental::REveElement::SetVizModelByTag
Bool_t SetVizModelByTag()
Find model element in VizDB that corresponds to previously assigned fVizTag and set fVizModel accordi...
Definition: REveElement.cxx:277
ROOT::Experimental::REveElement::StampColorSelection
void StampColorSelection()
Definition: REveElement.hxx:339
ROOT::Experimental::REveProjectable
Definition: REveProjectionBases.hxx:38
REveCompound.hxx
ROOT::Experimental::REveElement::fTitle
std::string fTitle
Definition: REveElement.hxx:70
ROOT::Experimental::REveElement::SetupDefaultColorAndTransparency
void SetupDefaultColorAndTransparency(Color_t col, Bool_t can_edit_color, Bool_t can_edit_transparency)
Set up element to use built-in main color and set flags allowing editing of main color and transparen...
Definition: REveElement.cxx:673
REveSelection.hxx
ROOT::Experimental::REveElement::SetMainColorRGB
void SetMainColorRGB(UChar_t r, UChar_t g, UChar_t b)
Convert RGB values to Color_t and call SetMainColor.
Definition: REveElement.cxx:708
ROOT::Experimental::REveElement::GetRnrSelf
virtual Bool_t GetRnrSelf() const
Definition: REveElement.hxx:211
gDebug
Int_t gDebug
Definition: TROOT.cxx:590
ROOT::Experimental::REveElement::DisableListElements
void DisableListElements(Bool_t rnr_self=kFALSE, Bool_t rnr_children=kFALSE)
Disable rendering of children and their list contents.
Definition: REveElement.cxx:1154
ROOT::Experimental::REveElement::SetMainAlpha
void SetMainAlpha(Float_t alpha)
Set main-transparency via float alpha variable.
Definition: REveElement.cxx:752
ROOT::Experimental::REveException::what
const char * what() const noexcept override
Definition: REveTypes.hxx:48
TClass::GetClass
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2946
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
ROOT::Experimental::REveProjectable::AddProjectedsToSet
virtual void AddProjectedsToSet(std::set< REveElement * > &set)
Add the projected elements to the set, dyn-casting them to REveElement.
Definition: REveProjectionBases.cxx:97
ROOT::Experimental::REveElement::SingleRnrState
virtual Bool_t SingleRnrState() const
Definition: REveElement.hxx:210
ROOT::Experimental::REveScene::IsAcceptingChanges
Bool_t IsAcceptingChanges() const
Definition: REveScene.hxx:97
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
ROOT::Experimental::REveElement::SetVizModel
void SetVizModel(REveElement *model)
Set visualization-parameter model element.
Definition: REveElement.cxx:266
ROOT::Experimental::REveElement::RemoveElementLocal
virtual void RemoveElementLocal(REveElement *el)
Perform additional local removal of el.
Definition: REveElement.cxx:919
ROOT::Experimental::REveElement::Set_t
std::set< REveElement * > Set_t
Definition: REveElement.hxx:50
ROOT::Experimental::REveProjectable::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: REveProjectionBases.cxx:146
ROOT::Experimental::REveElement::fAunts
AuntList_t fAunts
Definition: REveElement.hxx:71
ROOT::Experimental::REveAunt
Definition: REveElement.hxx:365
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
ROOT::Experimental::REveElement::GetElementId
ElementId_t GetElementId() const
Definition: REveElement.hxx:107
unsigned int
TGeoMatrix.h
TPRegexp
Definition: TPRegexp.h:36
REveProjectionManager.hxx
ROOT::Experimental::REveProjectionManager::GetCurrentDepth
Float_t GetCurrentDepth() const
Definition: REveProjectionManager.hxx:65
ROOT::Experimental::REveElement::REveElement
REveElement(const std::string &name="", const std::string &title="")
Default constructor.
Definition: REveElement.cxx:50
ROOT::Experimental::REveElement::kCSCBTakeMotherAsMaster
@ kCSCBTakeMotherAsMaster
Definition: REveElement.hxx:270
ROOT::Experimental::REveElement::fPickable
Bool_t fPickable
Definition: REveElement.hxx:285
ROOT::Experimental::REveElement::GetDenyDestroy
Int_t GetDenyDestroy() const
Returns the number of times deny-destroy has been requested on the element.
Definition: REveElement.cxx:1315
ROOT::Experimental::REveElement::PropagateRnrStateToProjecteds
virtual void PropagateRnrStateToProjecteds()
Propagate render state to the projected replicas of this element.
Definition: REveElement.cxx:660
ROOT::Experimental::REveElement::AddStamp
virtual void AddStamp(UChar_t bits)
Add (bitwise or) given stamps to fChangeBits.
Definition: REveElement.cxx:1426
ROOT::Experimental::REveProjected::GetProjectable
REveProjectable * GetProjectable() const
Definition: REveProjectionBases.hxx:99
REveManager.hxx
ROOT::Experimental::REveElement::SetNameTitle
void SetNameTitle(const std::string &name, const std::string &title)
Set name and title of an element.
Definition: REveElement.cxx:243
ROOT::Experimental::REveElement::fDenyDestroy
Int_t fDenyDestroy
Definition: REveElement.hxx:78
ROOT::Experimental::REveElement::fMainTransparency
Char_t fMainTransparency
Definition: REveElement.hxx:87
ROOT::Experimental::REveElement::RemoveElement
virtual void RemoveElement(REveElement *el)
Remove el from the list of children.
Definition: REveElement.cxx:886
ROOT::Experimental::REveElement::fCompound
REveCompound * fCompound
Definition: REveElement.hxx:74
ROOT::Experimental::REveElement::fDestroyOnZeroRefCnt
Bool_t fDestroyOnZeroRefCnt
Deny-destroy count.
Definition: REveElement.hxx:79
ROOT::Experimental::REveElement::SetName
void SetName(const std::string &name)
Set name of an element.
Definition: REveElement.cxx:222
TString::IsNull
Bool_t IsNull() const
Definition: TString.h:407
Double_t
double Double_t
Definition: RtypesCore.h:59
ROOT::Experimental::REveElement::AddElement
virtual void AddElement(REveElement *el)
Add el to the list of children.
Definition: REveElement.cxx:853
TGeoMatrix
Geometrical transformation package.
Definition: TGeoMatrix.h:41
ROOT::Experimental::REveElement::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: REveElement.cxx:300
REveUtil.hxx
ROOT::Experimental::REveProjectable::ClearProjectedList
virtual void ClearProjectedList()
Definition: REveProjectionBases.cxx:88
ROOT::Experimental::REveElement::GetSelectionMaster
virtual REveElement * GetSelectionMaster()
Returns the master element - that is:
Definition: REveElement.cxx:1356
Info
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
Definition: TError.cxx:220
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
ROOT::Experimental::REveElement::fScene
REveScene * fScene
Definition: REveElement.hxx:59
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
ROOT::Experimental::REveElement::GetName
const std::string & GetName() const
Definition: REveElement.hxx:113
TEveManager::FindVizDBEntry
TEveElement * FindVizDBEntry(const TString &tag)
Find a visualization-parameter database entry corresponding to tag.
Definition: TEveManager.cxx:678
TEveManager::Redraw3D
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Definition: TEveManager.h:168
ROOT::Experimental::REveProjectable::RefProjecteds
ProjList_t & RefProjecteds()
Definition: REveProjectionBases.hxx:57
ROOT::Experimental::REveElement::PreDeleteElement
virtual void PreDeleteElement()
Vertex / normal / triangle index information for rendering.
Definition: REveElement.cxx:173
name
char name[80]
Definition: TGX11.cxx:110
ROOT::Experimental::REveElement::Destroy
virtual void Destroy()
Destroy this element.
Definition: REveElement.cxx:1234
ROOT::Experimental::REveElement::RemoveElementsLocal
virtual void RemoveElementsLocal()
Perform additional local removal of all elements.
Definition: REveElement.cxx:963
ROOT::Experimental::REveElement::fSelectionMaster
REveElement * fSelectionMaster
Definition: REveElement.hxx:60
ROOT::Experimental::REveElement::IncDenyDestroy
void IncDenyDestroy()
Increases the deny-destroy count of the element.
Definition: REveElement.cxx:1324
d
#define d(i)
Definition: RSha256.hxx:102
ROOT::Experimental::REveProjectable::HasProjecteds
virtual Bool_t HasProjecteds() const
Definition: REveProjectionBases.hxx:55
ROOT::Experimental::REveProjectionManager::SetCurrentDepth
void SetCurrentDepth(Float_t d)
Definition: REveProjectionManager.hxx:64
ROOT::Experimental::REveElement::BuildRenderData
virtual void BuildRenderData()
Write transformation Matrix to render data.
Definition: REveElement.cxx:1446
ROOT::Experimental::REveProjectionManager::SubImportChildren
virtual Int_t SubImportChildren(REveElement *el, REveElement *proj_parent)
Recursively import children elements of el and apply projection to the newly imported objects.
Definition: REveProjectionManager.cxx:312
make_cnn_model.model
model
Definition: make_cnn_model.py:6
ROOT::Experimental::REveElement::PropagateMainColorToProjecteds
virtual void PropagateMainColorToProjecteds(Color_t color, Color_t old_color)
Propagate color to projected elements.
Definition: REveElement.cxx:724
ROOT::Experimental
Definition: RDirectory.hxx:30
ROOT::Experimental::REveElement::RemoveAunt
virtual void RemoveAunt(REveAunt *au)
Remove el from the list of aunts.
Definition: REveElement.cxx:526
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
ROOT::Experimental::REveElement::fVizTag
TString fVizTag
Element used as model from VizDB.
Definition: REveElement.hxx:76
Float_t
ROOT::Experimental::REveElement::fRnrChildren
Bool_t fRnrChildren
Definition: REveElement.hxx:82
ROOT::Experimental::REveProjectionManager
REveProjectionManager Manager class for steering of projections and managing projected objects.
Definition: REveProjectionManager.hxx:30
ROOT::Experimental::REveElement::WriteVizParams
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
Definition: REveElement.cxx:423
Char_t
char Char_t
Definition: RtypesCore.h:33
ROOT::Experimental::REveElement::PropagateMainTransparencyToProjecteds
virtual void PropagateMainTransparencyToProjecteds(Char_t t, Char_t old_t)
Propagate transparency to projected elements.
Definition: REveElement.cxx:762
ROOT::Experimental::REveElement::SetMainColor
virtual void SetMainColor(Color_t color)
Set main color of the element.
Definition: REveElement.cxx:684
ROOT::Experimental::REveElement::SetMainTransparency
virtual void SetMainTransparency(Char_t t)
Set main-transparency.
Definition: REveElement.cxx:737
ROOT::Experimental::REveElement::fDestructing
Char_t fDestructing
Definition: REveElement.hxx:336
gROOT
#define gROOT
Definition: TROOT.h:406
int
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:187
ROOT::Experimental::REveElement::RemoveElementsInternal
virtual void RemoveElementsInternal()
Remove all elements.
Definition: REveElement.cxx:929
ROOT::Experimental::REveElement::DestroyElements
virtual void DestroyElements()
Destroy all children of this element.
Definition: REveElement.cxx:1265
g
#define g(i)
Definition: RSha256.hxx:105