12 #ifndef ROOT7_REveGeoShape
13 #define ROOT7_REveGeoShape
19 class TGeoCompositeShape;
23 namespace Experimental {
25 class REveGeoShapeExtract;
33 class REveGeoShape :
public REveShape,
34 public REveProjectable
37 REveGeoShape(
const REveGeoShape &);
38 REveGeoShape &operator=(
const REveGeoShape &);
42 TGeoShape *fShape{
nullptr};
43 TGeoCompositeShape *fCompositeShape{
nullptr};
45 static TGeoManager *fgGeoManager;
47 static REveGeoShape *SubImportShapeExtract(REveGeoShapeExtract *gse, REveElement *parent);
48 REveGeoShapeExtract *DumpShapeTree(REveGeoShape *geon, REveGeoShapeExtract *parent =
nullptr);
50 TGeoShape *MakePolyShape();
53 REveGeoShape(
const std::string &name =
"REveGeoShape",
const std::string &title =
"");
54 virtual ~REveGeoShape();
56 Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset)
override;
57 void BuildRenderData()
override;
59 Int_t GetNSegments()
const {
return fNSegments; }
60 TGeoShape *GetShape()
const {
return fShape; }
61 void SetNSegments(Int_t s);
62 void SetShape(TGeoShape *s);
64 void ComputeBBox()
override;
66 void SaveExtract(
const char *file,
const char *name);
67 void WriteExtract(
const char *name);
69 static REveGeoShape *ImportShapeExtract(REveGeoShapeExtract *gse, REveElement *parent =
nullptr);
72 virtual std::unique_ptr<TBuffer3D> MakeBuffer3D();
73 TClass *ProjectedClass(
const REveProjection *p)
const override;
75 static TGeoManager *GetGeoManager();
76 static TGeoHMatrix *GetGeoHMatrixIdentity();
85 class REveGeoShapeProjected :
public REveShape,
public REveProjected {
87 REveGeoShapeProjected(
const REveGeoShapeProjected &);
88 REveGeoShapeProjected &operator=(
const REveGeoShapeProjected &);
91 std::unique_ptr<TBuffer3D> fBuff;
93 void SetDepthLocal(Float_t d)
override;
96 REveGeoShapeProjected();
97 virtual ~REveGeoShapeProjected();
99 void SetProjection(REveProjectionManager *proj, REveProjectable *model)
override;
100 void UpdateProjection()
override;
101 REveElement *GetProjectedAsElement()
override {
return this; }
103 void ComputeBBox()
override;