]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | #ifndef REVE_ReveGeom_H | |
4 | #define REVE_ReveGeom_H | |
5 | ||
6 | #include <Reve/RenderElement.h> | |
7 | ||
8 | class TGeoVolume; | |
9 | class TGeoNode; | |
24e2ff4a | 10 | class TGeoHMatrix; |
5a5a1232 | 11 | class TGeoManager; |
12 | ||
13 | namespace Reve { | |
14 | ||
7d42b6c2 | 15 | class GeoNodeRnrEl : public RenderElementListBase, |
16 | public TObject | |
5a5a1232 | 17 | { |
18 | friend class GeoNodeRnrElEditor; | |
19 | ||
265ecb21 | 20 | GeoNodeRnrEl(const GeoNodeRnrEl&); // Not implemented |
21 | GeoNodeRnrEl& operator=(const GeoNodeRnrEl&); // Not implemented | |
22 | ||
5a5a1232 | 23 | protected: |
24e2ff4a | 24 | TGeoNode *fNode; |
5a5a1232 | 25 | |
26 | public: | |
27 | GeoNodeRnrEl(TGeoNode* node); | |
28 | ||
29 | virtual const Text_t* GetName() const; | |
30 | virtual const Text_t* GetTitle() const; | |
31 | ||
32 | TGeoNode* GetNode() const { return fNode; } | |
33 | ||
34 | virtual Int_t ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent); | |
35 | ||
7d42b6c2 | 36 | virtual void UpdateItems(); |
5a5a1232 | 37 | |
38 | virtual Bool_t CanEditRnrElement() { return false; } | |
39 | virtual void SetRnrElement(Bool_t rnr); | |
40 | ||
41 | virtual Bool_t CanEditMainColor() { return true; } | |
42 | virtual void SetMainColor(Color_t color); | |
43 | virtual void SetMainColor(Pixel_t pixel); | |
44 | ||
45 | void UpdateNode(TGeoNode* node); | |
46 | void UpdateVolume(TGeoVolume* volume); | |
47 | ||
48 | virtual void Draw(Option_t* option=""); | |
49 | ||
50 | ClassDef(GeoNodeRnrEl, 1); | |
51 | }; // endclass GeoNodeRnrEl | |
52 | ||
53 | //---------------------------------------------------------------- | |
54 | ||
55 | class GeoTopNodeRnrEl : public GeoNodeRnrEl | |
56 | { | |
265ecb21 | 57 | GeoTopNodeRnrEl(const GeoTopNodeRnrEl&); // Not implemented |
58 | GeoTopNodeRnrEl& operator=(const GeoTopNodeRnrEl&); // Not implemented | |
59 | ||
5a5a1232 | 60 | protected: |
61 | TGeoManager* fManager; | |
24e2ff4a | 62 | TGeoHMatrix* fGlobalTrans; |
63 | Bool_t fUseNodeTrans; | |
5a5a1232 | 64 | Int_t fVisOption; |
65 | Int_t fVisLevel; | |
66 | ||
67 | public: | |
68 | GeoTopNodeRnrEl(TGeoManager* manager, TGeoNode* node, Int_t visopt=1, Int_t vislvl=3); | |
24e2ff4a | 69 | virtual ~GeoTopNodeRnrEl(); |
70 | ||
71 | TGeoHMatrix *GetGlobalTrans() const { return fGlobalTrans; } | |
72 | void SetGlobalTrans(TGeoHMatrix* m); | |
73 | Bool_t GetUseNodeTrans() const { return fUseNodeTrans; } | |
74 | void SetUseNodeTrans(Bool_t u=kTRUE); | |
5a5a1232 | 75 | |
76 | Int_t GetVisOption() const { return fVisOption; } | |
77 | void SetVisOption(Int_t visopt); | |
78 | Int_t GetVisLevel() const { return fVisLevel; } | |
79 | void SetVisLevel(Int_t vislvl); | |
80 | ||
7d42b6c2 | 81 | virtual void UpdateItems(); |
5a5a1232 | 82 | |
83 | virtual Bool_t CanEditRnrElement() { return true; } | |
84 | virtual void SetRnrElement(Bool_t rnr); | |
85 | ||
86 | virtual void Draw(Option_t* option=""); | |
87 | virtual void Paint(Option_t* option=""); | |
88 | ||
89 | // Signals from GeoManager. | |
90 | // These are not available any more ... colors in list-tree not refreshed | |
91 | // properly. | |
92 | void VolumeVisChanged(TGeoVolume* volume); | |
93 | void VolumeColChanged(TGeoVolume* volume); | |
94 | void NodeVisChanged(TGeoNode* node); | |
95 | ||
96 | ClassDef(GeoTopNodeRnrEl, 1); | |
97 | }; // endclass GeoTopNodeRnrEl | |
98 | ||
99 | } | |
100 | ||
101 | #endif |