1    	// @(#)root/g3d:$Id$
2    	// Author: Nenad Buncic   17/09/95
3    	
4    	/*************************************************************************
5    	 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
6    	 * All rights reserved.                                                  *
7    	 *                                                                       *
8    	 * For the licensing terms see $ROOTSYS/LICENSE.                         *
9    	 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
10   	 *************************************************************************/
11   	
12   	#ifndef ROOT_TShape
13   	#define ROOT_TShape
14   	
15   	
16   	//////////////////////////////////////////////////////////////////////////
17   	//                                                                      //
18   	// TShape                                                               //
19   	//                                                                      //
20   	// Basic shape class                                                    //
21   	//                                                                      //
22   	//                                                                      //
23   	//////////////////////////////////////////////////////////////////////////
24   	
25   	#ifndef ROOT_TNamed
26   	#include "TNamed.h"
27   	#endif
28   	#ifndef ROOT_TMaterial
29   	#include "TMaterial.h"
30   	#endif
31   	#ifndef ROOT_TAttLine
32   	#include "TAttLine.h"
33   	#endif
34   	#ifndef ROOT_TAttFill
35   	#include "TAttFill.h"
36   	#endif
37   	#ifndef ROOT_TAtt3D
38   	#include "TAtt3D.h"
39   	#endif
40   	#ifndef ROOT_X3DBuffer
41   	#include "X3DBuffer.h"
42   	#endif
43   	
44   	class TBuffer3D;
45   	class TNode;
46   	
47   	class TShape : public TNamed, public TAttLine, public TAttFill, public TAtt3D {
48   	
49   	protected:
50   	   Int_t           fNumber;      //Shape number
51   	   Int_t           fVisibility;  //Visibility flag
52   	   TMaterial      *fMaterial;    //Pointer to material
53   	   
54   	   virtual void    FillBuffer3D(TBuffer3D & buffer, Int_t reqSections) const;
55   	   Int_t           GetBasicColor() const;
56   	
57   	   Int_t           ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py);
58   	
59   	
60   	public:
61   	   TShape();
62   	   TShape(const char *name, const char *title, const char *material);
63   	   TShape(const TShape&);
64   	   TShape& operator=(const TShape&);
65   	   virtual         ~TShape();
66   	
67   	   virtual const   TBuffer3D &GetBuffer3D(Int_t reqSections) const;
68   	   TMaterial      *GetMaterial()  const {return fMaterial;}
69   	   virtual Int_t   GetNumber()     const {return fNumber;}
70   	   Int_t           GetVisibility() const {return fVisibility;}
71   	   virtual void    Paint(Option_t *option="");
72   	   virtual void    SetName(const char *name);
73   	   virtual void    SetPoints(Double_t *points) const ;
74   	   virtual void    SetVisibility(Int_t vis) {fVisibility = vis;} // *MENU*
75   	   void            TransformPoints(Double_t *points, UInt_t NbPnts) const;
76   	
77   	   ClassDef(TShape,2)  //Basic shape
78   	};
79   	
80   	R__EXTERN TNode *gNode;
81   	
82   	inline void TShape::SetName(const char *) { }
83   	
84   	#endif
85