3 #ifndef REVE_ReveGeom_H
4 #define REVE_ReveGeom_H
6 #include <Reve/RenderElement.h>
7 #include <Reve/ZTrans.h>
15 class TGeoShapeExtract;
19 class GeoNodeRnrEl : public RenderElement,
22 friend class GeoNodeRnrElEditor;
24 GeoNodeRnrEl(const GeoNodeRnrEl&); // Not implemented
25 GeoNodeRnrEl& operator=(const GeoNodeRnrEl&); // Not implemented
31 GeoNodeRnrEl(TGeoNode* node);
33 virtual const Text_t* GetName() const;
34 virtual const Text_t* GetTitle() const;
36 TGeoNode* GetNode() const { return fNode; }
38 virtual Int_t ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
40 virtual void UpdateItems();
42 virtual Bool_t CanEditRnrElement() { return false; }
43 virtual void SetRnrSelf(Bool_t rnr);
45 virtual Bool_t CanEditMainColor() { return true; }
46 virtual void SetMainColor(Color_t color);
47 virtual void SetMainColor(Pixel_t pixel);
49 void UpdateNode(TGeoNode* node);
50 void UpdateVolume(TGeoVolume* volume);
52 virtual void Draw(Option_t* option="");
54 ClassDef(GeoNodeRnrEl, 1);
55 }; // endclass GeoNodeRnrEl
57 //----------------------------------------------------------------
59 class GeoTopNodeRnrEl : public GeoNodeRnrEl
61 GeoTopNodeRnrEl(const GeoTopNodeRnrEl&); // Not implemented
62 GeoTopNodeRnrEl& operator=(const GeoTopNodeRnrEl&); // Not implemented
65 TGeoManager* fManager;
66 TGeoHMatrix* fGlobalTrans;
72 GeoTopNodeRnrEl(TGeoManager* manager, TGeoNode* node, Int_t visopt=1, Int_t vislvl=3);
73 virtual ~GeoTopNodeRnrEl();
75 TGeoHMatrix *GetGlobalTrans() const { return fGlobalTrans; }
76 void SetGlobalTrans(TGeoHMatrix* m);
77 Bool_t GetUseNodeTrans() const { return fUseNodeTrans; }
78 void SetUseNodeTrans(Bool_t u=kTRUE);
80 Int_t GetVisOption() const { return fVisOption; }
81 void SetVisOption(Int_t visopt);
82 Int_t GetVisLevel() const { return fVisLevel; }
83 void SetVisLevel(Int_t vislvl);
85 virtual void UpdateItems();
87 virtual Bool_t CanEditRnrElement() { return true; }
88 virtual void SetRnrSelf(Bool_t rnr);
90 virtual void Draw(Option_t* option="");
91 virtual void Paint(Option_t* option="");
93 // Signals from GeoManager.
94 // These are not available any more ... colors in list-tree not refreshed
96 void VolumeVisChanged(TGeoVolume* volume);
97 void VolumeColChanged(TGeoVolume* volume);
98 void NodeVisChanged(TGeoNode* node);
100 ClassDef(GeoTopNodeRnrEl, 1);
101 }; // endclass GeoTopNodeRnrEl
104 //----------------------------------------------------------------
105 //----------------------------------------------------------------
107 class GeoShapeRnrEl : public RenderElement,
110 GeoShapeRnrEl(const GeoShapeRnrEl&); // Not implemented
111 GeoShapeRnrEl& operator=(const GeoShapeRnrEl&); // Not implemented
116 UChar_t fTransparency;
119 static Int_t SubImportShapeExtract(TGeoShapeExtract* gse, RenderElement* parent);
122 GeoShapeRnrEl(const Text_t* name="GeoShapeRnrEl", const Text_t* title=0);
123 virtual ~GeoShapeRnrEl();
125 virtual Bool_t CanEditMainColor() { return kTRUE; }
127 ZTrans& RefHMTrans() { return fHMTrans; }
128 void SetTransMatrix(Double_t* carr) { fHMTrans.SetFrom(carr); }
129 void SetTransMatrix(const TGeoMatrix& mat) { fHMTrans.SetFrom(mat); }
131 Color_t GetColor() { return fColor; }
132 UChar_t GetTransparency() { return fTransparency; }
133 TGeoShape* GetShape() { return fShape; }
135 virtual void Paint(Option_t* option="");
137 static Int_t ImportShapeExtract(TGeoShapeExtract* gse, RenderElement* parent);
139 ClassDef(GeoShapeRnrEl, 1);