Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:39

0001 // @(#)root/eve7:$Id$
0002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT7_REveGeoShapeExtract
0013 #define ROOT7_REveGeoShapeExtract
0014 
0015 #include "TNamed.h"
0016 
0017 class TList;
0018 class TGeoShape;
0019 
0020 namespace ROOT {
0021 namespace Experimental {
0022 
0023 class REveGeoShapeExtract : public TNamed
0024 {
0025    REveGeoShapeExtract(const REveGeoShapeExtract&) = delete;
0026    REveGeoShapeExtract& operator=(const REveGeoShapeExtract&) = delete;
0027 
0028 protected:
0029    Double_t    fTrans[16];   // Transformation matrix, 4x4 column major.
0030    Float_t     fRGBA[4];     // RGBA color.
0031    Float_t     fRGBALine[4]; // RGBA color.
0032    Bool_t      fRnrSelf;     // Render this object.
0033    Bool_t      fRnrElements; // Render children of this object.
0034    Bool_t      fRnrFrame;    // Also draw shape outline.
0035    Bool_t      fMiniFrame;   // Minimize shape outline when drawing.
0036    TGeoShape*  fShape;       // Shape to be drawn for this object.
0037    TList*      fElements;    // Children elements.
0038 
0039 public:
0040    REveGeoShapeExtract(const char *n = "REveGeoShapeExtract", const char *t = nullptr);
0041    ~REveGeoShapeExtract() override;
0042 
0043    Bool_t HasElements();
0044    void   AddElement(REveGeoShapeExtract* gse);
0045 
0046    void SetTrans(const Double_t arr[16]);
0047    void SetRGBA (const Float_t  arr[4]);
0048    void SetRGBALine(const Float_t  arr[4]);
0049    void SetRnrSelf(Bool_t r)     { fRnrSelf = r;     }
0050    void SetRnrElements(Bool_t r) { fRnrElements = r; }
0051    void SetRnrFrame(Bool_t r)    { fRnrFrame = r; }
0052    void SetMiniFrame(Bool_t r)   { fMiniFrame = r; }
0053    void SetShape(TGeoShape* s)   { fShape = s;       }
0054    void SetElements(TList* e)    { fElements = e;    }
0055 
0056    Double_t*  GetTrans()       { return fTrans; }
0057    Float_t*   GetRGBA()        { return fRGBA;  }
0058    Float_t*   GetRGBALine()    { return fRGBALine; }
0059    Bool_t     GetRnrSelf()     { return fRnrSelf;     }
0060    Bool_t     GetRnrElements() { return fRnrElements; }
0061    Bool_t     GetRnrFrame()    { return fRnrFrame; }
0062    Bool_t     GetMiniFrame()   { return fMiniFrame; }
0063    TGeoShape* GetShape()       { return fShape;    }
0064    TList*     GetElements()    { return fElements; }
0065 
0066    ClassDefOverride(REveGeoShapeExtract, 1); // Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extracts.
0067 };
0068 
0069 } // namespace Experimental
0070 } // namespace ROOT
0071 
0072 #endif