]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/TPCSector2DGL.h
Merge from EVE-dev.
[u/mrichter/AliRoot.git] / EVE / Alieve / TPCSector2DGL.h
1 // $Header$
2
3 #ifndef ALIEVE_TPCSector2DGL_H
4 #define ALIEVE_TPCSector2DGL_H
5
6 #include <TGLObject.h>
7
8 #include <Alieve/TPCSector2D.h>
9 #include <Alieve/TPCSectorData.h>
10
11
12 namespace Alieve {
13
14 class TPCSector2DGL : public TGLObject
15 {
16 protected:
17   virtual void DirectDraw(const TGLDrawFlags & flags) const;
18
19   void LoadPadrow(TPCSectorData::RowIterator& iter, Int_t row, Int_t off) const;
20   void CreateTexture() const;
21
22   void DisplayTexture(Float_t padW,     Float_t padH, Float_t startR,
23                       Int_t numMaxPads, Int_t numRows,
24                       Int_t startCol,   Int_t startRow) const;
25   void DisplayQuads  (Float_t padW,     Float_t padH, Float_t startR,
26                       Int_t numMaxPads, Int_t numRows,
27                       Int_t startCol,   Int_t startRow) const;
28   void DisplayFrame  () const;
29
30   UChar_t* GetRowCol(Int_t row, Int_t col) const;
31
32   TPCSector2D*                 fSector;
33   mutable TPCSectorData*       fSectorData;
34
35   mutable UChar_t*             fImage;
36   mutable UInt_t               fTexture;
37   mutable UInt_t               fRTS;
38  
39 public:
40   TPCSector2DGL();
41   virtual ~TPCSector2DGL();
42
43   virtual Bool_t SetModel(TObject* obj); 
44   virtual void   SetBBox();
45
46   static void TraceStepsUp  (const TPCSectorData::SegmentInfo& s);
47   static void TraceStepsDown(const TPCSectorData::SegmentInfo& s);
48
49   static const Int_t fgkTextureWidth;
50   static const Int_t fgkTextureHeight;
51   static const Int_t fgkTextureByteSize;
52
53 }; // endclass TPCSector2D_GL_Rnr
54   
55
56 inline UChar_t* TPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
57 {
58   return fImage + 4*(row*fgkTextureWidth + col);
59 }
60
61
62 }
63
64 #endif