Logo ROOT  
Reference Guide
TEveProjectionManager.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_TEveProjectionManager
13 #define ROOT_TEveProjectionManager
14 
15 #include "TEveElement.h"
16 #include "TAttBBox.h"
17 #include "TEveProjections.h"
18 
19 
21  public TAttBBox
22 {
23 private:
24  TEveProjectionManager(const TEveProjectionManager&); // Not implemented
26 
27 protected:
29 
30  TEveProjection* fProjection; // current projection
31  TEveVector fCenter; // center of distortion
32  Float_t fCurrentDepth; // z depth of object being projected
33 
34  List_t fDependentEls; // elements that depend on manager and need to be destroyed with it
35 
36  Bool_t fImportEmpty; // import sub-trees with no projectable elements
37 
38  virtual Bool_t ShouldImport(TEveElement* el);
39  virtual void UpdateDependentElsAndScenes(TEveElement* root);
40 
41 public:
43  virtual ~TEveProjectionManager();
44 
45  void AddDependent(TEveElement* el);
46  void RemoveDependent(TEveElement* el);
47 
50 
51  virtual void UpdateName();
52 
53  void SetCenter(Float_t x, Float_t y, Float_t z);
54  TEveVector& GetCenter() { return fCenter; }
55 
58 
59  void SetImportEmpty(Bool_t ie) { fImportEmpty = ie; }
60  Bool_t GetImportEmpty() const { return fImportEmpty; }
61 
63 
65  TEveElement* parent);
67  TEveElement* ext_list=0);
68 
69  virtual TEveElement* SubImportElements(TEveElement* el, TEveElement* proj_parent);
70  virtual Int_t SubImportChildren(TEveElement* el, TEveElement* proj_parent);
71 
72  virtual void ProjectChildren();
73  virtual void ProjectChildrenRecurse(TEveElement* el);
74 
75  virtual void ComputeBBox();
76 
77  ClassDef(TEveProjectionManager, 0); // Manager class for steering of projections and managing projected objects.
78 };
79 
80 #endif
TEveProjectionManager::fImportEmpty
Bool_t fImportEmpty
Definition: TEveProjectionManager.h:36
TEveProjectionManager::fDependentEls
List_t fDependentEls
Definition: TEveProjectionManager.h:34
TEveProjectionManager::SetCurrentDepth
void SetCurrentDepth(Float_t d)
Definition: TEveProjectionManager.h:56
TEveElement
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
TEveProjectionManager::HandleElementPaste
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
Definition: TEveProjectionManager.cxx:152
TEveProjectionManager::GetCenter
TEveVector & GetCenter()
Definition: TEveProjectionManager.h:54
TEveProjectionManager::SubImportChildren
virtual Int_t SubImportChildren(TEveElement *el, TEveElement *proj_parent)
Recursively import children elements of el and apply projection to the newly imported objects.
Definition: TEveProjectionManager.cxx:320
TEveProjectionManager::AddDependent
void AddDependent(TEveElement *el)
Add el as dependent element.
Definition: TEveProjectionManager.cxx:72
TEveProjectionManager::operator=
TEveProjectionManager & operator=(const TEveProjectionManager &)
TEveProjection
Base-class for non-linear projections.
Definition: TEveProjections.h:27
TEveProjectionManager::ProjectChildrenRecurse
virtual void ProjectChildrenRecurse(TEveElement *el)
Project el (via TEveProjected::UpdateProjection()) and recurse through el's children.
Definition: TEveProjectionManager.cxx:350
TEveProjections.h
Float_t
float Float_t
Definition: RtypesCore.h:57
Int_t
int Int_t
Definition: RtypesCore.h:45
x
Double_t x[n]
Definition: legend1.C:17
TEveProjectionManager::GetImportEmpty
Bool_t GetImportEmpty() const
Definition: TEveProjectionManager.h:60
TEveProjection::EPType_e
EPType_e
Definition: TEveProjections.h:29
TEveElement.h
TEveProjectionManager::TEveProjectionManager
TEveProjectionManager(const TEveProjectionManager &)
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TEveProjection::kPT_End
@ kPT_End
Definition: TEveProjections.h:29
TEveElementList
A list of TEveElements.
Definition: TEveElement.h:433
bool
TAttBBox
Helper for management of bounding-box information.
Definition: TAttBBox.h:18
TEveProjectionManager::fProjection
TEveProjection * fProjection
Definition: TEveProjectionManager.h:30
TEveProjection::kPT_Unknown
@ kPT_Unknown
Definition: TEveProjections.h:29
TEveProjectionManager::UpdateName
virtual void UpdateName()
Updates name to have consistent information with projection.
Definition: TEveProjectionManager.cxx:88
TEveProjectionManager
Manager class for steering of projections and managing projected objects.
Definition: TEveProjectionManager.h:22
TEveProjectionManager::SetCenter
void SetCenter(Float_t x, Float_t y, Float_t z)
Set projection center and rebuild projected scene.
Definition: TEveProjectionManager.cxx:141
TEveProjectionManager::ComputeBBox
virtual void ComputeBBox()
Virtual from TAttBBox; fill bounding-box information.
Definition: TEveProjectionManager.cxx:392
TAttBBox.h
TEveProjectionManager::UpdateDependentElsAndScenes
virtual void UpdateDependentElsAndScenes(TEveElement *root)
Update dependent elements' bounding box and mark scenes containing element root or its children as re...
Definition: TEveProjectionManager.cxx:183
TEveProjectionManager::ImportElements
virtual TEveElement * ImportElements(TEveElement *el, TEveElement *ext_list=0)
Recursively import elements and apply projection to the newly imported objects.
Definition: TEveProjectionManager.cxx:259
TEveProjectionManager::fCenter
TEveVector fCenter
Definition: TEveProjectionManager.h:31
TEveProjectionManager::ImportElementsRecurse
virtual TEveElement * ImportElementsRecurse(TEveElement *el, TEveElement *parent)
If el is TEveProjectable add projected instance else add plain TEveElementList to parent.
Definition: TEveProjectionManager.cxx:205
TEveProjectionManager::SubImportElements
virtual TEveElement * SubImportElements(TEveElement *el, TEveElement *proj_parent)
Recursively import elements and apply projection to the newly imported objects.
Definition: TEveProjectionManager.cxx:291
TEveVectorT< Float_t >
y
Double_t y[n]
Definition: legend1.C:17
TEveProjectionManager::~TEveProjectionManager
virtual ~TEveProjectionManager()
Destructor.
Definition: TEveProjectionManager.cxx:57
TEveProjectionManager::ProjectChildren
virtual void ProjectChildren()
Project all children recursively, update bounding-box and notify TEveManger about the scenes that hav...
Definition: TEveProjectionManager.cxx:374
TEveProjectionManager::ShouldImport
virtual Bool_t ShouldImport(TEveElement *el)
Returns true if element el should be imported.
Definition: TEveProjectionManager.cxx:166
TEveProjectionManager::GetCurrentDepth
Float_t GetCurrentDepth() const
Definition: TEveProjectionManager.h:57
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TEveProjectionManager::SetImportEmpty
void SetImportEmpty(Bool_t ie)
Definition: TEveProjectionManager.h:59
d
#define d(i)
Definition: RSha256.hxx:102
TEveElement::List_t
std::list< TEveElement * > List_t
Definition: TEveElement.h:71
TEveProjectionManager::SetProjection
void SetProjection(TEveProjection::EPType_e type)
Set projection type and distortion.
Definition: TEveProjectionManager.cxx:99
TEveProjectionManager::GetProjection
TEveProjection * GetProjection()
Definition: TEveProjectionManager.h:49
type
int type
Definition: TGX11.cxx:121
TEveProjectionManager::fProjections
TEveProjection * fProjections[TEveProjection::kPT_End]
Definition: TEveProjectionManager.h:28
TEveProjectionManager::fCurrentDepth
Float_t fCurrentDepth
Definition: TEveProjectionManager.h:32
TEveProjectionManager::RemoveDependent
void RemoveDependent(TEveElement *el)
Remove el as dependent element.
Definition: TEveProjectionManager.cxx:80