Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TShape.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/g3d:$Id$
0002 // Author: Nenad Buncic   17/09/95
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, 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_TShape
0013 #define ROOT_TShape
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TShape                                                               //
0019 //                                                                      //
0020 // Basic shape class                                                    //
0021 //                                                                      //
0022 //                                                                      //
0023 //////////////////////////////////////////////////////////////////////////
0024 
0025 #include "TNamed.h"
0026 #include "TMaterial.h"
0027 #include "TAttLine.h"
0028 #include "TAttFill.h"
0029 #include "TAtt3D.h"
0030 #include "X3DBuffer.h"
0031 
0032 class TBuffer3D;
0033 class TNode;
0034 
0035 class TShape : public TNamed, public TAttLine, public TAttFill, public TAtt3D {
0036 
0037 protected:
0038    Int_t           fNumber;      //Shape number
0039    Int_t           fVisibility;  //Visibility flag
0040    TMaterial      *fMaterial;    //Pointer to material
0041 
0042    virtual void    FillBuffer3D(TBuffer3D & buffer, Int_t reqSections) const;
0043    Int_t           GetBasicColor() const;
0044 
0045    Int_t           ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py);
0046 
0047 
0048 public:
0049    TShape();
0050    TShape(const char *name, const char *title, const char *material);
0051    TShape(const TShape&);
0052    TShape& operator=(const TShape&);
0053            ~TShape() override;
0054 
0055    virtual const   TBuffer3D &GetBuffer3D(Int_t reqSections) const;
0056    TMaterial      *GetMaterial()  const {return fMaterial;}
0057    virtual Int_t   GetNumber()     const {return fNumber;}
0058    Int_t           GetVisibility() const {return fVisibility;}
0059    void    Paint(Option_t *option="") override;
0060    void    SetName(const char *name) override;
0061    virtual void    SetPoints(Double_t *points) const ;
0062    virtual void    SetVisibility(Int_t vis) {fVisibility = vis;} // *MENU*
0063    void            TransformPoints(Double_t *points, UInt_t NbPnts) const;
0064 
0065    ClassDefOverride(TShape,2)  //Basic shape
0066 };
0067 
0068 R__EXTERN TNode *gNode;
0069 
0070 inline void TShape::SetName(const char *) { }
0071 
0072 #endif