3 #ifndef REVE_ReveGeom_H
4 #define REVE_ReveGeom_H
6 #include <Reve/RenderElement.h>
7 #include <Reve/ZTrans.h>
8 #include <Reve/NLTBases.h>
16 class TGeoShapeExtract;
20 class GeoNodeRnrEl : public RenderElement,
23 friend class GeoNodeRnrElEditor;
25 GeoNodeRnrEl(const GeoNodeRnrEl&); // Not implemented
26 GeoNodeRnrEl& operator=(const GeoNodeRnrEl&); // Not implemented
30 TGeoShapeExtract* DumpShapeTree(GeoNodeRnrEl* geon, TGeoShapeExtract* parent = 0, Int_t level = 0);
32 GeoNodeRnrEl(TGeoNode* node);
34 virtual const Text_t* GetName() const;
35 virtual const Text_t* GetTitle() const;
37 TGeoNode* GetNode() const { return fNode; }
39 virtual Int_t ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
41 virtual Bool_t CanEditRnrElement() { return false; }
42 virtual void SetRnrSelf(Bool_t rnr);
43 virtual void SetRnrChildren(Bool_t rnr);
44 virtual void SetRnrState(Bool_t rnr);
46 virtual Bool_t CanEditMainColor() { return true; }
47 virtual void SetMainColor(Color_t color);
48 virtual void SetMainColor(Pixel_t pixel);
50 void UpdateNode(TGeoNode* node);
51 void UpdateVolume(TGeoVolume* volume);
53 void Save(const char* file, const char* name="Extract");
55 virtual void Draw(Option_t* option="");
57 ClassDef(GeoNodeRnrEl, 1);
58 }; // endclass GeoNodeRnrEl
60 //----------------------------------------------------------------
62 class GeoTopNodeRnrEl : public GeoNodeRnrEl
64 GeoTopNodeRnrEl(const GeoTopNodeRnrEl&); // Not implemented
65 GeoTopNodeRnrEl& operator=(const GeoTopNodeRnrEl&); // Not implemented
68 TGeoManager* fManager;
74 GeoTopNodeRnrEl(TGeoManager* manager, TGeoNode* node, Int_t visopt=1, Int_t vislvl=3);
75 virtual ~GeoTopNodeRnrEl();
77 virtual Bool_t CanEditMainHMTrans() { return kTRUE; }
78 virtual ZTrans* PtrMainHMTrans() { return &fGlobalTrans; }
80 ZTrans& RefGlobalTrans() { return fGlobalTrans; }
81 void SetGlobalTrans(const TGeoHMatrix* m);
84 Int_t GetVisOption() const { return fVisOption; }
85 void SetVisOption(Int_t visopt);
86 Int_t GetVisLevel() const { return fVisLevel; }
87 void SetVisLevel(Int_t vislvl);
89 virtual Bool_t CanEditRnrElement() { return true; }
90 virtual void SetRnrSelf(Bool_t rnr);
92 virtual void Draw(Option_t* option="");
93 virtual void Paint(Option_t* option="");
95 // Signals from GeoManager.
96 // These are not available any more ... colors in list-tree not refreshed
98 void VolumeVisChanged(TGeoVolume* volume);
99 void VolumeColChanged(TGeoVolume* volume);
100 void NodeVisChanged(TGeoNode* node);
102 ClassDef(GeoTopNodeRnrEl, 1);
103 }; // endclass GeoTopNodeRnrEl
106 //----------------------------------------------------------------
107 //----------------------------------------------------------------
109 class GeoShapeRnrEl : public RenderElement,
111 public NLTProjectable
113 GeoShapeRnrEl(const GeoShapeRnrEl&); // Not implemented
114 GeoShapeRnrEl& operator=(const GeoShapeRnrEl&); // Not implemented
119 UChar_t fTransparency;
122 static GeoShapeRnrEl* SubImportShapeExtract(TGeoShapeExtract* gse, RenderElement* parent);
123 TGeoShapeExtract* DumpShapeTree(GeoShapeRnrEl* geon, TGeoShapeExtract* parent = 0);
126 GeoShapeRnrEl(const Text_t* name="GeoShapeRnrEl", const Text_t* title=0);
127 virtual ~GeoShapeRnrEl();
129 virtual Bool_t CanEditMainColor() { return kTRUE; }
131 virtual Bool_t CanEditMainTransparency() { return kTRUE; }
132 virtual UChar_t GetMainTransparency() const { return fTransparency; }
133 virtual void SetMainTransparency(UChar_t t) { fTransparency = t; }
135 virtual Bool_t CanEditMainHMTrans() { return kTRUE; }
136 virtual ZTrans* PtrMainHMTrans() { return &fHMTrans; }
138 ZTrans& RefHMTrans() { return fHMTrans; }
139 void SetTransMatrix(Double_t* carr) { fHMTrans.SetFrom(carr); }
140 void SetTransMatrix(const TGeoMatrix& mat) { fHMTrans.SetFrom(mat); }
142 Color_t GetColor() { return fColor; }
143 TGeoShape* GetShape() { return fShape; }
145 virtual void Paint(Option_t* option="");
147 void Save(const char* file, const char* name="Extract");
148 static GeoShapeRnrEl* ImportShapeExtract(TGeoShapeExtract* gse, RenderElement* parent);
151 virtual TBuffer3D* MakeBuffer3D();
152 virtual TClass* ProjectedClass() const;
154 ClassDef(GeoShapeRnrEl, 1);