2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #ifndef ALIEVE_TPCSector2DGL_H
11 #define ALIEVE_TPCSector2DGL_H
13 #include <TGLObject.h>
15 #include <Alieve/AliEveTPCSector2D.h>
16 #include <Alieve/AliEveTPCSectorData.h>
22 class AliEveTPCSector2DGL : public TGLObject
24 AliEveTPCSector2DGL(const AliEveTPCSector2DGL&); // Not implemented
25 AliEveTPCSector2DGL& operator=(const AliEveTPCSector2DGL&); // Not implemented
28 virtual void DirectDraw(TGLRnrCtx & rnrCtx) const;
30 void LoadPadrow(AliEveTPCSectorData::RowIterator& iter, Int_t row, Int_t off) const;
31 void CreateTexture() const;
33 void DisplayTexture(const AliEveTPCSectorData::SegmentInfo& seg,
34 Int_t startCol, Int_t startRow) const;
35 void DisplayQuads(const AliEveTPCSectorData::SegmentInfo& seg,
36 Int_t startCol, Int_t startRow) const;
37 void DisplayNamedQuads(const AliEveTPCSectorData::SegmentInfo& seg,
38 Int_t startCol, Int_t startRow) const;
39 void DisplayFrame() const;
41 UChar_t* GetRowCol(Int_t row, Int_t col) const;
43 AliEveTPCSector2D* fSector;
44 mutable AliEveTPCSectorData* fSectorData;
46 mutable UChar_t* fImage;
47 mutable UInt_t fTexture;
51 AliEveTPCSector2DGL();
52 virtual ~AliEveTPCSector2DGL();
54 virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
55 virtual void SetBBox();
56 virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
58 virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
60 static void TraceStepsUp (const AliEveTPCSectorData::SegmentInfo& s);
61 static void TraceStepsDown(const AliEveTPCSectorData::SegmentInfo& s);
63 static const Int_t fgkTextureWidth;
64 static const Int_t fgkTextureHeight;
65 static const Int_t fgkTextureByteSize;
67 }; // endclass TPCSector2D_GL_Rnr
70 inline UChar_t* AliEveTPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
72 return fImage + 4*(row*fgkTextureWidth + col);