TShape.h

Go to the documentation of this file.
00001 // @(#)root/g3d:$Id: TShape.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Nenad Buncic   17/09/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TShape
00013 #define ROOT_TShape
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TShape                                                               //
00019 //                                                                      //
00020 // Basic shape class                                                    //
00021 //                                                                      //
00022 //                                                                      //
00023 //////////////////////////////////////////////////////////////////////////
00024 
00025 #ifndef ROOT_TNamed
00026 #include "TNamed.h"
00027 #endif
00028 #ifndef ROOT_TMaterial
00029 #include "TMaterial.h"
00030 #endif
00031 #ifndef ROOT_TAttLine
00032 #include "TAttLine.h"
00033 #endif
00034 #ifndef ROOT_TAttFill
00035 #include "TAttFill.h"
00036 #endif
00037 #ifndef ROOT_TAtt3D
00038 #include "TAtt3D.h"
00039 #endif
00040 #ifndef ROOT_X3DBuffer
00041 #include "X3DBuffer.h"
00042 #endif
00043 
00044 class TBuffer3D;
00045 class TNode;
00046 
00047 class TShape : public TNamed, public TAttLine, public TAttFill, public TAtt3D {
00048 
00049 protected:
00050    Int_t           fNumber;      //Shape number
00051    Int_t           fVisibility;  //Visibility flag
00052    TMaterial      *fMaterial;    //Pointer to material
00053    
00054    virtual void    FillBuffer3D(TBuffer3D & buffer, Int_t reqSections) const;
00055    Int_t           GetBasicColor() const;
00056 
00057    Int_t           ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py);
00058 
00059 
00060 public:
00061    TShape();
00062    TShape(const char *name, const char *title, const char *material);
00063    TShape(const TShape&);
00064    TShape& operator=(const TShape&);
00065    virtual         ~TShape();
00066 
00067    virtual const   TBuffer3D &GetBuffer3D(Int_t reqSections) const;
00068    TMaterial      *GetMaterial()  const {return fMaterial;}
00069    virtual Int_t   GetNumber()     const {return fNumber;}
00070    Int_t           GetVisibility() const {return fVisibility;}
00071    virtual void    Paint(Option_t *option="");
00072    virtual void    SetName(const char *name);
00073    virtual void    SetPoints(Double_t *points) const ;
00074    virtual void    SetVisibility(Int_t vis) {fVisibility = vis;} // *MENU*
00075    void            TransformPoints(Double_t *points, UInt_t NbPnts) const;
00076 
00077    ClassDef(TShape,2)  //Basic shape
00078 };
00079 
00080 R__EXTERN TNode *gNode;
00081 
00082 inline void TShape::SetName(const char *) { }
00083 
00084 #endif

Generated on Tue Jul 5 14:16:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1