Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TEveScene.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_TEveScene
13 #define ROOT_TEveScene
14 
15 #include "TEveElement.h"
16 
17 class TEvePad;
18 class TGLScenePad;
19 
20 class TExMap;
21 
22 /******************************************************************************/
23 // TEveScene
24 /******************************************************************************/
25 
26 class TEveScene : public TEveElementList
27 {
28 private:
29  TEveScene(const TEveScene&); // Not implemented
30  TEveScene& operator=(const TEveScene&); // Not implemented
31 
32 protected:
33  TEvePad *fPad;
34  TGLScenePad *fGLScene;
35 
36  Bool_t fChanged;
37  Bool_t fSmartRefresh;
38  Bool_t fHierarchical;
39 
40  void RetransHierarchicallyRecurse(TEveElement* el, const TEveTrans& tp);
41 
42 public:
43  TEveScene(const char* n="TEveScene", const char* t="");
44  TEveScene(TGLScenePad* gl_scene, const char* n="TEveScene", const char* t="");
45  virtual ~TEveScene();
46 
47  virtual void CollectSceneParents(List_t& scenes);
48 
49  virtual Bool_t SingleRnrState() const { return kTRUE; }
50 
51  void Changed() { fChanged = kTRUE; }
52  Bool_t IsChanged() const { return fChanged; }
53 
54  void SetHierarchical(Bool_t h) { fHierarchical = h; }
55  Bool_t GetHierarchical() const { return fHierarchical; }
56 
57  void Repaint(Bool_t dropLogicals=kFALSE);
58  void RetransHierarchically();
59 
60  TGLScenePad* GetGLScene() const { return fGLScene; }
61  void SetGLScene(TGLScenePad* s) { fGLScene = s; }
62 
63  virtual void SetName(const char* n);
64  virtual void Paint(Option_t* option = "");
65 
66  void DestroyElementRenderers(TEveElement* element);
67  void DestroyElementRenderers(TObject* rnrObj);
68 
69  virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
70 
71  ClassDef(TEveScene, 0); // Reve representation of TGLScene.
72 };
73 
74 
75 /******************************************************************************/
76 // TEveSceneList
77 /******************************************************************************/
78 
79 class TEveSceneList : public TEveElementList
80 {
81 private:
82  TEveSceneList(const TEveSceneList&); // Not implemented
83  TEveSceneList& operator=(const TEveSceneList&); // Not implemented
84 
85 protected:
86 
87 public:
88  TEveSceneList(const char* n="TEveSceneList", const char* t="");
89  virtual ~TEveSceneList() {}
90 
91  void DestroyScenes();
92 
93  void RepaintChangedScenes(Bool_t dropLogicals);
94  void RepaintAllScenes(Bool_t dropLogicals);
95 
96  void DestroyElementRenderers(TEveElement* element);
97 
98  void ProcessSceneChanges(Bool_t dropLogicals, TExMap* stampMap);
99 
100  ClassDef(TEveSceneList, 0); // List of Scenes providing common operations on TEveScene collections.
101 };
102 
103 #endif