]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEODB/AliGShape.h
This commit was generated by cvs2svn to compensate for changes in r209,
[u/mrichter/AliRoot.git] / GEODB / AliGShape.h
1 #ifndef ALIGSHAPE_H
2 #define ALIGSHAPE_H
3
4 /* -*- C++ -*- */
5 /*             */
6 /* 1998/10/22  */
7 /* --------------------------------------------------------------------------  */
8 /*                                                                             */
9 /* AliGShape Class                                                             */
10 /*                                                                             */
11 /* This file is part of the ALICE Geometry Database .                          */
12 /*                                                                             */
13 /* Author:  Joana E. Santo                                                     */
14 /*                                                                             */
15 /* --------------------------------------------------------------------------  */
16 /* The shape virtual class represents the basic elements used in this          */
17 /* geometry to build the constituents of a detector. Deriving from this        */
18 /* class there are simple shapes like box, sphere, cone and thorus,            */
19 /* supershapes that are obtained from the previous by Boolean operations       */
20 /* and also user defined shapes.                                               */
21
22 #ifndef ROOT_TNamed
23 #include <TNamed.h>
24
25 #endif
26
27 //#ifndef ROOT_TMaterial
28 //#include <TMaterial.h>
29 //#endif
30
31 #ifndef ROOT_TAttLine
32 #include <TAttLine.h>
33 #endif
34
35 #ifndef ROOT_TAttFill
36 #include <TAttFill.h>
37 #endif
38
39 #ifndef ROOT_X3DBuffer
40 #include <X3DBuffer.h>
41 #endif
42
43 #ifndef ROOT_TPolyLine3D
44 #include <TPolyLine3D.h>
45 #endif
46
47 #include "TVector.h"
48 class AliGNode;
49 extern "C" { void FillX3DBuffer (X3DBuffer *buff); }
50
51 class AliGShape: public TNamed, public TAttLine, public TAttFill { 
52     protected:
53         Int_t fColor;
54
55     public:
56         AliGShape(Text_t* name, Text_t* title);
57         AliGShape();
58         AliGShape( AliGShape* shape ); // Copy Constructor
59         virtual ~AliGShape() {}
60
61                 Int_t   DistancetoPrimitive(Int_t, Int_t);
62                 Int_t   GetCol() { return fColor; }
63         virtual Bool_t  Is3D () {return kTRUE;}
64         virtual void    Paint(Option_t *option="");
65         virtual void    PaintGLPoints(Float_t *vertex);
66         virtual void    PaintShape(X3DBuffer *buff, Bool_t rangeView);
67                 void    SetCol( Int_t color ) { fColor = color; }
68         virtual void    SetName(const Text_t *name);
69         virtual void    SetPoints(Float_t *buffer);
70
71     ClassDef(AliGShape,1) //Generic shape class
72 };
73
74 R__EXTERN AliGNode* gNode;
75 R__EXTERN TVector*  gMatrix;
76 R__EXTERN Size3D    gSize3D;
77
78 inline void AliGShape::PaintGLPoints(Float_t *) { }
79 inline void AliGShape::SetName(const Text_t *) { }
80
81 #endif