Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
20 class TEveProjectionManager : public TEveElementList,
21  public TAttBBox
22 {
23 private:
24  TEveProjectionManager(const TEveProjectionManager&); // Not implemented
25  TEveProjectionManager& operator=(const TEveProjectionManager&); // Not implemented
26 
27 protected:
28  TEveProjection* fProjections[TEveProjection::kPT_End];
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:
42  TEveProjectionManager(TEveProjection::EPType_e type=TEveProjection::kPT_Unknown);
43  virtual ~TEveProjectionManager();
44 
45  void AddDependent(TEveElement* el);
46  void RemoveDependent(TEveElement* el);
47 
48  void SetProjection(TEveProjection::EPType_e type);
49  TEveProjection* GetProjection() { return fProjection; }
50 
51  virtual void UpdateName();
52 
53  void SetCenter(Float_t x, Float_t y, Float_t z);
54  TEveVector& GetCenter() { return fCenter; }
55 
56  void SetCurrentDepth(Float_t d) { fCurrentDepth = d; }
57  Float_t GetCurrentDepth() const { return fCurrentDepth; }
58 
59  void SetImportEmpty(Bool_t ie) { fImportEmpty = ie; }
60  Bool_t GetImportEmpty() const { return fImportEmpty; }
61 
62  virtual Bool_t HandleElementPaste(TEveElement* el);
63 
64  virtual TEveElement* ImportElementsRecurse(TEveElement* el,
65  TEveElement* parent);
66  virtual TEveElement* ImportElements(TEveElement* el,
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