File indexing completed on 2025-01-18 10:11:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveGeoShape
0013 #define ROOT_TEveGeoShape
0014
0015 #include "TEveShape.h"
0016
0017 class TGeoShape;
0018 class TGeoHMatrix;
0019 class TGeoCompositeShape;
0020 class TEveGeoShapeExtract;
0021 class TBuffer3D;
0022
0023 class TEveGeoShape : public TEveShape
0024 {
0025 private:
0026 TEveGeoShape(const TEveGeoShape&);
0027 TEveGeoShape& operator=(const TEveGeoShape&);
0028
0029 protected:
0030 Int_t fNSegments;
0031 TGeoShape *fShape;
0032 TGeoCompositeShape *fCompositeShape;
0033
0034 static TGeoManager *fgGeoMangeur;
0035
0036 static TEveGeoShape* SubImportShapeExtract(TEveGeoShapeExtract* gse, TEveElement* parent);
0037 TEveGeoShapeExtract* DumpShapeTree(TEveGeoShape* geon, TEveGeoShapeExtract* parent=nullptr);
0038
0039 TGeoShape* MakePolyShape();
0040
0041 public:
0042 TEveGeoShape(const char* name="TEveGeoShape", const char* title=nullptr);
0043 ~TEveGeoShape() override;
0044
0045 TObject* GetObject(const TEveException&) const override
0046 { const TObject* obj = this; return const_cast<TObject*>(obj); }
0047
0048 Int_t GetNSegments() const { return fNSegments; }
0049 TGeoShape* GetShape() const { return fShape; }
0050 void SetNSegments(Int_t s);
0051 void SetShape(TGeoShape* s);
0052
0053 void ComputeBBox() override;
0054 void Paint(Option_t* option="") override;
0055
0056 void Save(const char* file, const char* name="Extract");
0057 void SaveExtract(const char* file, const char* name);
0058 void WriteExtract(const char* name);
0059
0060 static TEveGeoShape* ImportShapeExtract(TEveGeoShapeExtract* gse, TEveElement* parent=nullptr);
0061
0062
0063 virtual TBuffer3D* MakeBuffer3D();
0064 TClass* ProjectedClass(const TEveProjection* p) const override;
0065
0066 static TGeoManager* GetGeoMangeur();
0067 static TGeoHMatrix* GetGeoHMatrixIdentity();
0068
0069 ClassDefOverride(TEveGeoShape, 0);
0070 };
0071
0072
0073
0074 class TEveGeoShapeProjected : public TEveShape,
0075 public TEveProjected
0076 {
0077 private:
0078 TEveGeoShapeProjected(const TEveGeoShapeProjected&);
0079 TEveGeoShapeProjected& operator=(const TEveGeoShapeProjected&);
0080
0081 protected:
0082 TBuffer3D *fBuff;
0083
0084 void SetDepthLocal(Float_t d) override;
0085
0086 public:
0087 TEveGeoShapeProjected();
0088 ~TEveGeoShapeProjected() override;
0089
0090 void SetProjection(TEveProjectionManager* proj, TEveProjectable* model) override;
0091 void UpdateProjection() override;
0092 TEveElement* GetProjectedAsElement() override { return this; }
0093
0094 void ComputeBBox() override;
0095
0096 ClassDefOverride(TEveGeoShapeProjected, 0);
0097 };
0098
0099 #endif