]>
Commit | Line | Data |
---|---|---|
d810d0de | 1 | // $Id$ |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | |
3 | ||
4 | /************************************************************************** | |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
9 | ||
10 | #ifndef ALIEVE_TPCSector2DGL_H | |
11 | #define ALIEVE_TPCSector2DGL_H | |
12 | ||
13 | #include <TGLObject.h> | |
14 | ||
15 | #include <Alieve/AliEveTPCSector2D.h> | |
16 | #include <Alieve/AliEveTPCSectorData.h> | |
17 | ||
18 | class TGLViewer; | |
19 | class TGLScene; | |
20 | ||
21 | ||
22 | class AliEveTPCSector2DGL : public TGLObject | |
23 | { | |
24 | AliEveTPCSector2DGL(const AliEveTPCSector2DGL&); // Not implemented | |
25 | AliEveTPCSector2DGL& operator=(const AliEveTPCSector2DGL&); // Not implemented | |
26 | ||
27 | protected: | |
28 | virtual void DirectDraw(TGLRnrCtx & rnrCtx) const; | |
29 | ||
30 | void LoadPadrow(AliEveTPCSectorData::RowIterator& iter, Int_t row, Int_t off) const; | |
31 | void CreateTexture() const; | |
32 | ||
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; | |
40 | ||
41 | UChar_t* GetRowCol(Int_t row, Int_t col) const; | |
42 | ||
43 | AliEveTPCSector2D* fSector; | |
44 | mutable AliEveTPCSectorData* fSectorData; | |
45 | ||
46 | mutable UChar_t* fImage; | |
47 | mutable UInt_t fTexture; | |
48 | mutable UInt_t fRTS; | |
51346b82 | 49 | |
d810d0de | 50 | public: |
51 | AliEveTPCSector2DGL(); | |
52 | virtual ~AliEveTPCSector2DGL(); | |
53 | ||
51346b82 | 54 | virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); |
d810d0de | 55 | virtual void SetBBox(); |
56 | virtual Bool_t SupportsSecondarySelect() const { return kTRUE; } | |
57 | ||
58 | virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec); | |
59 | ||
60 | static void TraceStepsUp (const AliEveTPCSectorData::SegmentInfo& s); | |
61 | static void TraceStepsDown(const AliEveTPCSectorData::SegmentInfo& s); | |
62 | ||
63 | static const Int_t fgkTextureWidth; | |
64 | static const Int_t fgkTextureHeight; | |
65 | static const Int_t fgkTextureByteSize; | |
66 | ||
67 | }; // endclass TPCSector2D_GL_Rnr | |
51346b82 | 68 | |
d810d0de | 69 | |
70 | inline UChar_t* AliEveTPCSector2DGL::GetRowCol(Int_t row, Int_t col) const | |
71 | { | |
72 | return fImage + 4*(row*fgkTextureWidth + col); | |
73 | } | |
74 | ||
75 | ||
76 | #endif |