Logo ROOT   6.10/09
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
25  TEveProjectionManager& operator=(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 
54  TEveVector& GetCenter() { return fCenter; }
55 
56  void SetCurrentDepth(Float_t d) { fCurrentDepth = d; }
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
float Float_t
Definition: RtypesCore.h:53
virtual ~TEveProjectionManager()
Destructor.
void SetCenter(Float_t x, Float_t y, Float_t z)
Set projection center and rebuild projected scene.
virtual Int_t SubImportChildren(TEveElement *el, TEveElement *proj_parent)
Recursively import children elements of el and apply projection to the newly imported objects...
virtual TEveElement * ImportElementsRecurse(TEveElement *el, TEveElement *parent)
If el is TEveProjectable add projected instance else add plain TEveElementList to parent...
void RemoveDependent(TEveElement *el)
Remove el as dependent element.
virtual void ProjectChildren()
Project all children recursively, update bounding-box and notify TEveManger about the scenes that hav...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
TEveProjection * fProjections[TEveProjection::kPT_End]
A list of TEveElements.
Definition: TEveElement.h:459
Double_t x[n]
Definition: legend1.C:17
void AddDependent(TEveElement *el)
Add el as dependent element.
#define ClassDef(name, id)
Definition: Rtypes.h:297
virtual TEveElement * ImportElements(TEveElement *el, TEveElement *ext_list=0)
Recursively import elements and apply projection to the newly imported objects.
void SetImportEmpty(Bool_t ie)
Base-class for non-linear projections.
Manager class for steering of projections and managing projected objects.
virtual Bool_t ShouldImport(TEveElement *el)
Returns true if element el should be imported.
TEveProjectionManager(const TEveProjectionManager &)
TEveProjection * GetProjection()
void SetCurrentDepth(Float_t d)
TEveProjection * fProjection
std::list< TEveElement * > List_t
Definition: TEveElement.h:69
int type
Definition: TGX11.cxx:120
Double_t y[n]
Definition: legend1.C:17
TEveProjectionManager & operator=(const TEveProjectionManager &)
virtual void UpdateDependentElsAndScenes(TEveElement *root)
Update dependent elements&#39; bounding box and mark scenes containing element root or its children as re...
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
void SetProjection(TEveProjection::EPType_e type)
Set projection type and distortion.
virtual void ProjectChildrenRecurse(TEveElement *el)
Project el (via TEveProjected::UpdateProjection()) and recurse through el&#39;s children.
Helper for management of bounding-box information.
Definition: TAttBBox.h:17
virtual void ComputeBBox()
Virtual from TAttBBox; fill bounding-box information.
virtual void UpdateName()
Updates name to have consistent information with projection.
virtual TEveElement * SubImportElements(TEveElement *el, TEveElement *proj_parent)
Recursively import elements and apply projection to the newly imported objects.
Float_t GetCurrentDepth() const
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33