Logo ROOT  
Reference Guide
REveProjectionBases.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
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 #ifndef ROOT7_REveProjectionBases
13 #define ROOT7_REveProjectionBases
14 
15 #include "Rtypes.h"
16 #include <list>
17 #include <set>
18 
19 class TClass;
20 
21 namespace ROOT {
22 namespace Experimental {
23 
24 class REveElement;
25 class REveProjection;
26 class REveProjected;
27 class REveProjectionManager;
28 
29 ////////////////////////////////////////////////////////////////
30 // //
31 // REveProjectable //
32 // //
33 // Abstract base class for non-linear projectable objects. //
34 // //
35 ////////////////////////////////////////////////////////////////
36 
38 {
39 private:
40  REveProjectable &operator=(const REveProjectable &) = delete;
41 
42 public:
43  typedef std::list<REveProjected *> ProjList_t;
44 
45 protected:
46  ProjList_t fProjectedList; // references to projected instances.
47 
48 public:
51  virtual ~REveProjectable();
52 
53  virtual TClass *ProjectedClass(const REveProjection *p) const = 0;
54 
55  virtual Bool_t HasProjecteds() const { return !fProjectedList.empty(); }
56 
58 
59  virtual void AddProjected(REveProjected *p) { fProjectedList.emplace_back(p); }
60  virtual void RemoveProjected(REveProjected *p) { fProjectedList.remove(p); }
61 
62  virtual void AnnihilateProjecteds();
63  virtual void ClearProjectedList();
64 
65  virtual void AddProjectedsToSet(std::set<REveElement *> &set);
66 
67  virtual void PropagateVizParams(REveElement *el = nullptr);
68  virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children);
69  virtual void PropagateMainColor(Color_t color, Color_t old_color);
70  virtual void PropagateMainTransparency(Char_t t, Char_t old_t);
71 };
72 
73 ////////////////////////////////////////////////////////////////
74 // //
75 // REveProjected //
76 // //
77 // Abstract base class for non-linear projected objects. //
78 // //
79 ////////////////////////////////////////////////////////////////
80 
82 private:
83  REveProjected(const REveProjected &) = delete;
84  REveProjected &operator=(const REveProjected &) = delete;
85 
86 protected:
87  REveProjectionManager *fManager{nullptr}; // manager
88  REveProjectable *fProjectable{nullptr}; // link to original object
89  Float_t fDepth{0.}; // z coordinate
90 
91  void SetDepthCommon(Float_t d, REveElement *el, Float_t *bbox);
92  virtual void SetDepthLocal(Float_t d);
93 
94 public:
95  REveProjected() = default;
96  virtual ~REveProjected();
97 
100  Float_t GetDepth() const { return fDepth; }
101 
103  virtual void UnRefProjectable(REveProjectable *assumed_parent, bool notifyParent = true);
104 
105  virtual void UpdateProjection() = 0;
107 
108  virtual void SetDepth(Float_t d);
109 };
110 
111 } // namespace Experimental
112 } // namespace ROOT
113 
114 #endif
ROOT::Experimental::REveProjectable::ProjectedClass
virtual TClass * ProjectedClass(const REveProjection *p) const =0
ROOT::Experimental::REveProjected
Definition: REveProjectionBases.hxx:81
ROOT::Experimental::REveProjected::SetDepthCommon
void SetDepthCommon(Float_t d, REveElement *el, Float_t *bbox)
Utility function to update the z-values of the bounding-box.
Definition: REveProjectionBases.cxx:231
ROOT::Experimental::REveProjectable::~REveProjectable
virtual ~REveProjectable()
Destructor.
Definition: REveProjectionBases.cxx:53
ROOT::Experimental::REveProjectable::REveProjectable
REveProjectable()
Constructor.
Definition: REveProjectionBases.cxx:38
ROOT::Experimental::REveProjected::fDepth
Float_t fDepth
Definition: REveProjectionBases.hxx:89
ROOT::Experimental::REveProjectable::AddProjected
virtual void AddProjected(REveProjected *p)
Definition: REveProjectionBases.hxx:59
ROOT::Experimental::REveProjected::UpdateProjection
virtual void UpdateProjection()=0
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::REveProjectable::PropagateRenderState
virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children)
Set render state of projecteds.
Definition: REveProjectionBases.cxx:120
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
Float_t
float Float_t
Definition: RtypesCore.h:57
ROOT::Experimental::REveProjected::SetProjection
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model)
Sets projection manager and reference in the projectable object.
Definition: REveProjectionBases.cxx:191
ROOT::Experimental::REveProjected::SetDepthLocal
virtual void SetDepthLocal(Float_t d)
Base-class implementation – just sets fDepth.
Definition: REveProjectionBases.cxx:245
ROOT::Experimental::REveProjected::GetProjectedAsElement
virtual REveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to REveElement.
Definition: REveProjectionBases.cxx:181
ROOT::Experimental::REveProjectable::PropagateVizParams
virtual void PropagateVizParams(REveElement *el=nullptr)
Set visualization parameters of projecteds.
Definition: REveProjectionBases.cxx:108
ROOT::Experimental::REveProjected::SetDepth
virtual void SetDepth(Float_t d)
Set depth coordinate for the element.
Definition: REveProjectionBases.cxx:217
ROOT::Experimental::REveProjected::GetManager
REveProjectionManager * GetManager() const
Definition: REveProjectionBases.hxx:98
ROOT::Experimental::REveElement
Definition: REveElement.hxx:79
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
Color_t
short Color_t
Definition: RtypesCore.h:83
ROOT::Experimental::REveProjected::operator=
REveProjected & operator=(const REveProjected &)=delete
bool
ROOT::Experimental::REveProjected::UnRefProjectable
virtual void UnRefProjectable(REveProjectable *assumed_parent, bool notifyParent=true)
Remove reference to projectable.
Definition: REveProjectionBases.cxx:202
ROOT::Experimental::REveProjection
REveProjection Base for specific classes that implement non-linear projections.
Definition: REveProjections.hxx:42
ROOT::Experimental::REveProjected::~REveProjected
virtual ~REveProjected()
Destructor.
Definition: REveProjectionBases.cxx:171
ROOT::Experimental::REveProjectable::fProjectedList
ProjList_t fProjectedList
Definition: REveProjectionBases.hxx:46
ROOT::Experimental::REveProjectable::operator=
REveProjectable & operator=(const REveProjectable &)=delete
ROOT::Experimental::REveProjectable
Definition: REveProjectionBases.hxx:37
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::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::REveProjectable::ProjList_t
std::list< REveProjected * > ProjList_t
Definition: REveProjectionBases.hxx:43
ROOT::Experimental::REveProjected::GetProjectable
REveProjectable * GetProjectable() const
Definition: REveProjectionBases.hxx:99
ROOT::Experimental::REveProjectable::ClearProjectedList
virtual void ClearProjectedList()
Definition: REveProjectionBases.cxx:88
TClass
Definition: TClass.h:80
ROOT::Experimental::REveProjectable::RemoveProjected
virtual void RemoveProjected(REveProjected *p)
Definition: REveProjectionBases.hxx:60
ROOT::Experimental::REveProjectable::RefProjecteds
ProjList_t & RefProjecteds()
Definition: REveProjectionBases.hxx:57
ROOT::Experimental::REveProjected::GetDepth
Float_t GetDepth() const
Definition: REveProjectionBases.hxx:100
ROOT::Experimental::REveProjected::fManager
REveProjectionManager * fManager
Definition: REveProjectionBases.hxx:87
d
#define d(i)
Definition: RSha256.hxx:120
ROOT::Experimental::REveProjectable::HasProjecteds
virtual Bool_t HasProjecteds() const
Definition: REveProjectionBases.hxx:55
ROOT::Experimental::REveProjected::REveProjected
REveProjected()=default
make_cnn_model.model
model
Definition: make_cnn_model.py:6
ROOT::Experimental::REveProjectionManager
REveProjectionManager Manager class for steering of projections and managing projected objects.
Definition: REveProjectionManager.hxx:39
Char_t
char Char_t
Definition: RtypesCore.h:33
Rtypes.h
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::REveProjected::fProjectable
REveProjectable * fProjectable
Definition: REveProjectionBases.hxx:88