ROOT logo
// @(#)root/g3d:$Id: TShape.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Nenad Buncic   17/09/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TShape
#define ROOT_TShape


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TShape                                                               //
//                                                                      //
// Basic shape class                                                    //
//                                                                      //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TMaterial
#include "TMaterial.h"
#endif
#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif
#ifndef ROOT_TAtt3D
#include "TAtt3D.h"
#endif
#ifndef ROOT_X3DBuffer
#include "X3DBuffer.h"
#endif

class TBuffer3D;
class TNode;

class TShape : public TNamed, public TAttLine, public TAttFill, public TAtt3D {

protected:
   Int_t           fNumber;      //Shape number
   Int_t           fVisibility;  //Visibility flag
   TMaterial      *fMaterial;    //Pointer to material
   
   virtual void    FillBuffer3D(TBuffer3D & buffer, Int_t reqSections) const;
   Int_t           GetBasicColor() const;

   Int_t           ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py);


public:
   TShape();
   TShape(const char *name, const char *title, const char *material);
   TShape(const TShape&);
   TShape& operator=(const TShape&);
   virtual         ~TShape();

   virtual const   TBuffer3D &GetBuffer3D(Int_t reqSections) const;
   TMaterial      *GetMaterial()  const {return fMaterial;}
   virtual Int_t   GetNumber()     const {return fNumber;}
   Int_t           GetVisibility() const {return fVisibility;}
   virtual void    Paint(Option_t *option="");
   virtual void    SetName(const char *name);
   virtual void    SetPoints(Double_t *points) const ;
   virtual void    SetVisibility(Int_t vis) {fVisibility = vis;} // *MENU*
   void            TransformPoints(Double_t *points, UInt_t NbPnts) const;

   ClassDef(TShape,2)  //Basic shape
};

R__EXTERN TNode *gNode;

inline void TShape::SetName(const char *) { }

#endif
 TShape.h:1
 TShape.h:2
 TShape.h:3
 TShape.h:4
 TShape.h:5
 TShape.h:6
 TShape.h:7
 TShape.h:8
 TShape.h:9
 TShape.h:10
 TShape.h:11
 TShape.h:12
 TShape.h:13
 TShape.h:14
 TShape.h:15
 TShape.h:16
 TShape.h:17
 TShape.h:18
 TShape.h:19
 TShape.h:20
 TShape.h:21
 TShape.h:22
 TShape.h:23
 TShape.h:24
 TShape.h:25
 TShape.h:26
 TShape.h:27
 TShape.h:28
 TShape.h:29
 TShape.h:30
 TShape.h:31
 TShape.h:32
 TShape.h:33
 TShape.h:34
 TShape.h:35
 TShape.h:36
 TShape.h:37
 TShape.h:38
 TShape.h:39
 TShape.h:40
 TShape.h:41
 TShape.h:42
 TShape.h:43
 TShape.h:44
 TShape.h:45
 TShape.h:46
 TShape.h:47
 TShape.h:48
 TShape.h:49
 TShape.h:50
 TShape.h:51
 TShape.h:52
 TShape.h:53
 TShape.h:54
 TShape.h:55
 TShape.h:56
 TShape.h:57
 TShape.h:58
 TShape.h:59
 TShape.h:60
 TShape.h:61
 TShape.h:62
 TShape.h:63
 TShape.h:64
 TShape.h:65
 TShape.h:66
 TShape.h:67
 TShape.h:68
 TShape.h:69
 TShape.h:70
 TShape.h:71
 TShape.h:72
 TShape.h:73
 TShape.h:74
 TShape.h:75
 TShape.h:76
 TShape.h:77
 TShape.h:78
 TShape.h:79
 TShape.h:80
 TShape.h:81
 TShape.h:82
 TShape.h:83
 TShape.h:84