Logo ROOT  
Reference Guide
TEveProjectionBases.h
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 #ifndef ROOT_TEveProjectionBases
13 #define ROOT_TEveProjectionBases
14 
15 #include "Rtypes.h"
16 #include <list>
17 #include <set>
18 
19 class TEveElement;
20 class TEveProjection;
21 class TEveProjected;
23 
24 class TClass;
25 
26 ////////////////////////////////////////////////////////////////
27 // //
28 // TEveProjectable //
29 // //
30 // Abstract base class for non-linear projectable objects. //
31 // //
32 ////////////////////////////////////////////////////////////////
33 
35 {
36 private:
37  TEveProjectable(const TEveProjectable&); // Not implemented
38  TEveProjectable& operator=(const TEveProjectable&); // Not implemented
39 
40 public:
41  typedef std::list<TEveProjected*> ProjList_t;
42  typedef std::list<TEveProjected*>::iterator ProjList_i;
43 
44 protected:
45  ProjList_t fProjectedList; // references to projected instances.
46 
47 public:
49  virtual ~TEveProjectable();
50 
51  virtual TClass* ProjectedClass(const TEveProjection* p) const = 0;
52 
53  virtual Bool_t HasProjecteds() const { return ! fProjectedList.empty(); }
54 
57 
58  virtual void AddProjected(TEveProjected* p) { fProjectedList.push_back(p); }
59  virtual void RemoveProjected(TEveProjected* p) { fProjectedList.remove(p); }
60 
61  virtual void AnnihilateProjecteds();
62  virtual void ClearProjectedList();
63 
64  virtual void AddProjectedsToSet(std::set<TEveElement*>& set);
65 
66  virtual void PropagateVizParams(TEveElement* el=0);
67  virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children);
68  virtual void PropagateMainColor(Color_t color, Color_t old_color);
69  virtual void PropagateMainTransparency(Char_t t, Char_t old_t);
70 
71  ClassDef(TEveProjectable, 0); // Abstract base class for classes that can be transformed with non-linear projections.
72 };
73 
74 
75 ////////////////////////////////////////////////////////////////
76 // //
77 // TEveProjected //
78 // //
79 // Abstract base class for non-linear projected objects. //
80 // //
81 ////////////////////////////////////////////////////////////////
82 
84 {
85 private:
86  TEveProjected(const TEveProjected&); // Not implemented
87  TEveProjected& operator=(const TEveProjected&); // Not implemented
88 
89 protected:
91  TEveProjectable *fProjectable; // link to original object
92  Float_t fDepth; // z coordinate
93 
94  void SetDepthCommon(Float_t d, TEveElement* el, Float_t* bbox);
95  virtual void SetDepthLocal(Float_t d);
96 
97 public:
98  TEveProjected();
99  virtual ~TEveProjected();
100 
103  Float_t GetDepth() const { return fDepth; }
104 
106  virtual void UnRefProjectable(TEveProjectable* assumed_parent, bool notifyParent = true);
107 
108  virtual void UpdateProjection() = 0;
110 
111  virtual void SetDepth(Float_t d);
112 
113  ClassDef(TEveProjected, 0); // Abstract base class for classes that hold results of a non-linear projection transformation.
114 };
115 
116 #endif
TEveProjected::GetDepth
Float_t GetDepth() const
Definition: TEveProjectionBases.h:103
TEveElement
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
TEveProjected::UpdateProjection
virtual void UpdateProjection()=0
TEveProjectable::AddProjected
virtual void AddProjected(TEveProjected *p)
Definition: TEveProjectionBases.h:58
TEveProjected::GetProjectable
TEveProjectable * GetProjectable() const
Definition: TEveProjectionBases.h:102
TEveProjected::SetProjection
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Sets projection manager and reference in the projectable object.
Definition: TEveProjectionBases.cxx:193
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
TEveProjectable::AnnihilateProjecteds
virtual void AnnihilateProjecteds()
Optimized destroy of projected elements with condition there is only one parent for projected element...
Definition: TEveProjectionBases.cxx:65
TEveProjected::TEveProjected
TEveProjected()
Constructor.
Definition: TEveProjectionBases.cxx:161
TEveProjection
Base-class for non-linear projections.
Definition: TEveProjections.h:27
TEveProjectable::PropagateVizParams
virtual void PropagateVizParams(TEveElement *el=0)
Set visualization parameters of projecteds.
Definition: TEveProjectionBases.cxx:99
Float_t
float Float_t
Definition: RtypesCore.h:57
TEveProjected::fProjectable
TEveProjectable * fProjectable
Definition: TEveProjectionBases.h:91
TEveProjectable::PropagateRenderState
virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children)
Set render state of projecteds.
Definition: TEveProjectionBases.cxx:113
TEveProjected::GetManager
TEveProjectionManager * GetManager() const
Definition: TEveProjectionBases.h:101
TEveProjectable::fProjectedList
ProjList_t fProjectedList
Definition: TEveProjectionBases.h:45
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
Color_t
short Color_t
Definition: RtypesCore.h:83
bool
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
TEveProjected::UnRefProjectable
virtual void UnRefProjectable(TEveProjectable *assumed_parent, bool notifyParent=true)
Remove reference to projectable.
Definition: TEveProjectionBases.cxx:204
TEveProjectable
Abstract base-class for non-linear projectable objects.
Definition: TEveProjectionBases.h:35
TEveProjectable::ProjList_i
std::list< TEveProjected * >::iterator ProjList_i
Definition: TEveProjectionBases.h:42
TEveProjectable::ProjList_t
std::list< TEveProjected * > ProjList_t
Definition: TEveProjectionBases.h:41
TEveProjectable::ProjectedClass
virtual TClass * ProjectedClass(const TEveProjection *p) const =0
TEveProjectionManager
Manager class for steering of projections and managing projected objects.
Definition: TEveProjectionManager.h:22
TEveProjected::fManager
TEveProjectionManager * fManager
Definition: TEveProjectionBases.h:90
TEveProjectable::~TEveProjectable
virtual ~TEveProjectable()
Destructor.
Definition: TEveProjectionBases.cxx:45
TEveProjected::SetDepthLocal
virtual void SetDepthLocal(Float_t d)
Base-class implementation – just sets fDepth.
Definition: TEveProjectionBases.cxx:250
TEveProjectable::operator=
TEveProjectable & operator=(const TEveProjectable &)
TEveProjected::SetDepth
virtual void SetDepth(Float_t d)
Set depth coordinate for the element.
Definition: TEveProjectionBases.cxx:219
TEveProjectable::TEveProjectable
TEveProjectable()
Constructor.
Definition: TEveProjectionBases.cxx:37
TEveProjectable::BeginProjecteds
ProjList_i BeginProjecteds()
Definition: TEveProjectionBases.h:55
TEveProjectable::ClearProjectedList
virtual void ClearProjectedList()
Definition: TEveProjectionBases.cxx:77
TEveProjectable::EndProjecteds
ProjList_i EndProjecteds()
Definition: TEveProjectionBases.h:56
TEveProjected::operator=
TEveProjected & operator=(const TEveProjected &)
TEveProjected::TEveProjected
TEveProjected(const TEveProjected &)
TEveProjected
Abstract base class for classes that hold results of a non-linear projection transformation.
Definition: TEveProjectionBases.h:84
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TEveProjected::fDepth
Float_t fDepth
Definition: TEveProjectionBases.h:92
TEveProjected::~TEveProjected
virtual ~TEveProjected()
Destructor.
Definition: TEveProjectionBases.cxx:173
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
d
#define d(i)
Definition: RSha256.hxx:102
make_cnn_model.model
model
Definition: make_cnn_model.py:6
TEveProjected::GetProjectedAsElement
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveProjectionBases.cxx:183
TEveProjected::SetDepthCommon
void SetDepthCommon(Float_t d, TEveElement *el, Float_t *bbox)
Utility function to update the z-values of the bounding-box.
Definition: TEveProjectionBases.cxx:236
TEveProjectable::RemoveProjected
virtual void RemoveProjected(TEveProjected *p)
Definition: TEveProjectionBases.h:59
TEveProjectable::TEveProjectable
TEveProjectable(const TEveProjectable &)
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
Char_t
char Char_t
Definition: RtypesCore.h:33
TEveProjectable::HasProjecteds
virtual Bool_t HasProjecteds() const
Definition: TEveProjectionBases.h:53
Rtypes.h