Logo ROOT   6.19/01
Reference Guide
REveProjectionManager.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_REveProjectionManager
13 #define ROOT7_REveProjectionManager
14 
15 #include <ROOT/REveElement.hxx>
16 #include <ROOT/REveProjections.hxx>
17 #include <TAttBBox.h>
18 
19 namespace ROOT {
20 namespace Experimental {
21 
22 ////////////////////////////////////////////////////////////////////////////////
23 /// REveProjectionManager
24 /// Manager class for steering of projections and managing projected objects.
25 ////////////////////////////////////////////////////////////////////////////////
26 
28  public REveAuntAsList,
29  public TAttBBox
30 {
31 private:
32  REveProjectionManager(const REveProjectionManager &); // Not implemented
33  REveProjectionManager &operator=(const REveProjectionManager &); // Not implemented
34 
35 protected:
37 
38  REveProjection *fProjection{nullptr}; // current projection
39  REveVector fCenter; // center of distortion
40  Float_t fCurrentDepth{0.}; // z depth of object being projected
41 
42  List_t fDependentEls; // elements that depend on manager and need to be destroyed with it
43 
44  Bool_t fImportEmpty{kFALSE}; // import sub-trees with no projectable elements
45 
46  virtual Bool_t ShouldImport(REveElement *el);
47  virtual void UpdateDependentElsAndScenes(REveElement *root);
48 
49 public:
51  virtual ~REveProjectionManager();
52 
53  void AddDependent(REveElement *el);
54  void RemoveDependent(REveElement *el);
55 
58 
59  virtual void UpdateName();
60 
62  REveVector &GetCenter() { return fCenter; }
63 
66 
67  void SetImportEmpty(Bool_t ie) { fImportEmpty = ie; }
68  Bool_t GetImportEmpty() const { return fImportEmpty; }
69 
71  virtual REveElement *ImportElements(REveElement *el, REveElement *ext_list = nullptr);
72 
73  virtual REveElement *SubImportElements(REveElement *el, REveElement *proj_parent);
74  virtual Int_t SubImportChildren(REveElement *el, REveElement *proj_parent);
75 
76  virtual void ProjectChildren();
77  virtual void ProjectChildrenRecurse(REveElement *el);
78 
79  void ComputeBBox() override;
80 };
81 
82 } // namespace Experimental
83 } // namespace ROOT
84 
85 #endif
virtual void UpdateDependentElsAndScenes(REveElement *root)
Update dependent elements&#39; bounding box and mark scenes containing element root or its children as re...
virtual Int_t SubImportChildren(REveElement *el, REveElement *proj_parent)
Recursively import children elements of el and apply projection to the newly imported objects...
VSD Structures.
Definition: StringConv.hxx:21
float Float_t
Definition: RtypesCore.h:53
virtual void UpdateName()
Updates name to have consistent information with projection.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void ComputeBBox() override
Virtual from TAttBBox; fill bounding-box information.
void SetProjection(REveProjection::EPType_e type)
Set projection type and distortion.
void AddDependent(REveElement *el)
Add el as dependent element.
virtual void ProjectChildrenRecurse(REveElement *el)
Project el (via REveProjected::UpdateProjection()) and recurse through el&#39;s children.
virtual REveElement * SubImportElements(REveElement *el, REveElement *proj_parent)
Recursively import elements and apply projection to the newly imported objects.
Double_t x[n]
Definition: legend1.C:17
virtual Bool_t ShouldImport(REveElement *el)
Returns true if element el should be imported.
REveProjection Base for specific classes that implement non-linear projections.
std::list< REveElement * > List_t
Definition: REveElement.hxx:77
REveProjectionManager Manager class for steering of projections and managing projected objects...
const Bool_t kFALSE
Definition: RtypesCore.h:88
#define d(i)
Definition: RSha256.hxx:102
REveProjectionManager & operator=(const REveProjectionManager &)
void SetCenter(Float_t x, Float_t y, Float_t z)
Set projection center and rebuild projected scene.
int type
Definition: TGX11.cxx:120
Double_t y[n]
Definition: legend1.C:17
REveProjectionManager(const REveProjectionManager &)
void RemoveDependent(REveElement *el)
Remove el as dependent element.
virtual REveElement * ImportElements(REveElement *el, REveElement *ext_list=nullptr)
Recursively import elements and apply projection to the newly imported objects.
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
virtual void ProjectChildren()
Project all children recursively, update bounding-box and notify EveManger about the scenes that have...
REveProjection * fProjections[REveProjection::kPT_End]
Helper for management of bounding-box information.
Definition: TAttBBox.h:17
virtual REveElement * ImportElementsRecurse(REveElement *el, REveElement *parent)
If el is REveProjectable add projected instance else add plain REveElementList to parent...