Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
19class TClass;
20
21namespace ROOT {
22namespace Experimental {
23
24class REveElement;
25class REveProjection;
26class REveProjected;
28
29////////////////////////////////////////////////////////////////
30// //
31// REveProjectable //
32// //
33// Abstract base class for non-linear projectable objects. //
34// //
35////////////////////////////////////////////////////////////////
36
38{
39private:
41
42public:
43 typedef std::list<REveProjected *> ProjList_t;
44
45protected:
46 ProjList_t fProjectedList; // references to projected instances.
47
48public:
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
82private:
83 REveProjected(const REveProjected &) = delete;
85
86protected:
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
94public:
95 REveProjected() = default;
96 virtual ~REveProjected();
97
100 Float_t GetDepth() const { return fDepth; }
101
102 virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model);
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
#define d(i)
Definition RSha256.hxx:102
bool Bool_t
Definition RtypesCore.h:63
short Color_t
Definition RtypesCore.h:85
char Char_t
Definition RtypesCore.h:37
float Float_t
Definition RtypesCore.h:57
winID h TVirtualViewer3D TVirtualGLPainter p
Base class for REveUtil visualization elements, providing hierarchy management, rendering control and...
Abstract base class for classes that hold results of a non-linear projection transformation.
Manager class for steering of projections and managing projected objects.
Base-class for non-linear projections.
virtual void AddProjectedsToSet(std::set< REveElement * > &set)
Add the projected elements to the set, dyn-casting them to REveElement.
virtual void PropagateVizParams(REveElement *el=nullptr)
Set visualization parameters of projecteds.
std::list< REveProjected * > ProjList_t
virtual void RemoveProjected(REveProjected *p)
virtual void PropagateMainColor(Color_t color, Color_t old_color)
Set main color of projecteds if their color is the same as old_color.
virtual void AnnihilateProjecteds()
Optimized destroy of projected elements with condition there is only one parent for projected element...
virtual void PropagateRenderState(Bool_t rnr_self, Bool_t rnr_children)
Set render state of projecteds.
virtual TClass * ProjectedClass(const REveProjection *p) const =0
virtual void AddProjected(REveProjected *p)
REveProjectable & operator=(const REveProjectable &)=delete
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.
REveProjectionManager * GetManager() const
virtual REveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to REveElement.
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model)
Sets projection manager and reference in the projectable object.
virtual void UnRefProjectable(REveProjectable *assumed_parent, bool notifyParent=true)
Remove reference to projectable.
void SetDepthCommon(Float_t d, REveElement *el, Float_t *bbox)
Utility function to update the z-values of the bounding-box.
REveProjected & operator=(const REveProjected &)=delete
REveProjected(const REveProjected &)=delete
virtual void SetDepth(Float_t d)
Set depth coordinate for the element.
REveProjectable * GetProjectable() const
virtual void SetDepthLocal(Float_t d)
Base-class implementation – just sets fDepth.
REveProjectionManager Manager class for steering of projections and managing projected objects.
REveProjection Base for specific classes that implement non-linear projections.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...