00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TEveGeoShape
00013 #define ROOT_TEveGeoShape
00014
00015 #include "TEveShape.h"
00016
00017 class TGeoShape;
00018 class TGeoCompositeShape;
00019 class TEveGeoShapeExtract;
00020 class TBuffer3D;
00021
00022 class TEveGeoShape : public TEveShape
00023 {
00024 private:
00025 TEveGeoShape(const TEveGeoShape&);
00026 TEveGeoShape& operator=(const TEveGeoShape&);
00027
00028 protected:
00029 Int_t fNSegments;
00030 TGeoShape *fShape;
00031 TGeoCompositeShape *fCompositeShape;
00032
00033 static TGeoManager *fgGeoMangeur;
00034
00035 static TEveGeoShape* SubImportShapeExtract(TEveGeoShapeExtract* gse, TEveElement* parent);
00036 TEveGeoShapeExtract* DumpShapeTree(TEveGeoShape* geon, TEveGeoShapeExtract* parent=0);
00037
00038 TGeoShape* MakePolyShape();
00039
00040 public:
00041 TEveGeoShape(const char* name="TEveGeoShape", const char* title=0);
00042 virtual ~TEveGeoShape();
00043
00044 virtual TObject* GetObject(const TEveException&) const
00045 { const TObject* obj = this; return const_cast<TObject*>(obj); }
00046
00047 Int_t GetNSegments() const { return fNSegments; }
00048 TGeoShape* GetShape() const { return fShape; }
00049 void SetNSegments(Int_t s);
00050 void SetShape(TGeoShape* s);
00051
00052 virtual void ComputeBBox();
00053 virtual void Paint(Option_t* option="");
00054
00055 void Save(const char* file, const char* name="Extract");
00056 void SaveExtract(const char* file, const char* name);
00057 void WriteExtract(const char* name);
00058
00059 static TEveGeoShape* ImportShapeExtract(TEveGeoShapeExtract* gse, TEveElement* parent=0);
00060
00061
00062 virtual TBuffer3D* MakeBuffer3D();
00063 virtual TClass* ProjectedClass(const TEveProjection* p) const;
00064
00065 static TGeoManager* GetGeoMangeur();
00066
00067 ClassDef(TEveGeoShape, 2);
00068 };
00069
00070
00071
00072 class TEveGeoShapeProjected : public TEveShape,
00073 public TEveProjected
00074 {
00075 private:
00076 TEveGeoShapeProjected(const TEveGeoShapeProjected&);
00077 TEveGeoShapeProjected& operator=(const TEveGeoShapeProjected&);
00078
00079 protected:
00080 TBuffer3D *fBuff;
00081
00082 virtual void SetDepthLocal(Float_t d);
00083
00084 public:
00085 TEveGeoShapeProjected();
00086 virtual ~TEveGeoShapeProjected() {}
00087
00088 virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable* model);
00089 virtual void UpdateProjection();
00090 virtual TEveElement* GetProjectedAsElement() { return this; }
00091
00092 virtual void ComputeBBox();
00093
00094 ClassDef(TEveGeoShapeProjected, 0);
00095 };
00096
00097 #endif