Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:41

0001 // @(#)root/eve:$Id$
0002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, 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 ROOT_TEveGeoShapeExtract
0013 #define ROOT_TEveGeoShapeExtract
0014 
0015 #include "TNamed.h"
0016 
0017 class TList;
0018 class TGeoShape;
0019 
0020 class TEveGeoShapeExtract : public TNamed
0021 {
0022    TEveGeoShapeExtract(const TEveGeoShapeExtract&);            // Not implemented
0023    TEveGeoShapeExtract& operator=(const TEveGeoShapeExtract&); // Not implemented
0024 
0025 protected:
0026    Double_t    fTrans[16];   // Transformation matrix, 4x4 column major.
0027    Float_t     fRGBA[4];     // RGBA color.
0028    Float_t     fRGBALine[4]; // RGBA color.
0029    Bool_t      fRnrSelf;     // Render this object.
0030    Bool_t      fRnrElements; // Render children of this object.
0031    Bool_t      fRnrFrame;    // Also draw shape outline.
0032    Bool_t      fMiniFrame;   // Minimize shape outline when drawing.
0033    TGeoShape*  fShape;       // Shape to be drawn for this object.
0034    TList*      fElements;    // Children elements.
0035 
0036 public:
0037    TEveGeoShapeExtract(const char* n="TEveGeoShapeExtract", const char* t=nullptr);
0038    ~TEveGeoShapeExtract() override;
0039 
0040    Bool_t HasElements();
0041    void   AddElement(TEveGeoShapeExtract* gse);
0042 
0043    void SetTrans(const Double_t arr[16]);
0044    void SetRGBA (const Float_t  arr[4]);
0045    void SetRGBALine(const Float_t  arr[4]);
0046    void SetRnrSelf(Bool_t r)     { fRnrSelf = r;     }
0047    void SetRnrElements(Bool_t r) { fRnrElements = r; }
0048    void SetRnrFrame(Bool_t r)    { fRnrFrame = r; }
0049    void SetMiniFrame(Bool_t r)   { fMiniFrame = r; }
0050    void SetShape(TGeoShape* s)   { fShape = s;       }
0051    void SetElements(TList* e)    { fElements = e;    }
0052 
0053    Double_t*  GetTrans()       { return fTrans; }
0054    Float_t*   GetRGBA()        { return fRGBA;  }
0055    Float_t*   GetRGBALine()    { return fRGBALine; }
0056    Bool_t     GetRnrSelf()     { return fRnrSelf;     }
0057    Bool_t     GetRnrElements() { return fRnrElements; }
0058    Bool_t     GetRnrFrame()    { return fRnrFrame; }
0059    Bool_t     GetMiniFrame()   { return fMiniFrame; }
0060    TGeoShape* GetShape()       { return fShape;    }
0061    TList*     GetElements()    { return fElements; }
0062 
0063    ClassDefOverride(TEveGeoShapeExtract, 2); // Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extracts.
0064 };
0065 
0066 #endif