3 #ifndef ALIEVE_TPCSector2DGL_H
4 #define ALIEVE_TPCSector2DGL_H
8 #include <Alieve/TPCSector2D.h>
9 #include <Alieve/TPCSectorData.h>
14 class TPCSector2DGL : public TGLObject
17 virtual void DirectDraw(const TGLDrawFlags & flags) const;
19 void LoadPadrow(TPCSectorData::RowIterator& iter, Int_t row, Int_t off) const;
20 void CreateTexture() const;
22 void DisplayTexture(const TPCSectorData::SegmentInfo& seg,
23 Int_t startCol, Int_t startRow) const;
24 void DisplayQuads(const TPCSectorData::SegmentInfo& seg,
25 Int_t startCol, Int_t startRow) const;
26 void DisplayNamedQuads(const TPCSectorData::SegmentInfo& seg,
27 Int_t startCol, Int_t startRow) const;
28 void DisplayFrame() const;
30 UChar_t* GetRowCol(Int_t row, Int_t col) const;
33 mutable TPCSectorData* fSectorData;
35 mutable UChar_t* fImage;
36 mutable UInt_t fTexture;
41 virtual ~TPCSector2DGL();
43 virtual Bool_t SetModel(TObject* obj);
44 virtual void SetBBox();
45 virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
47 static void TraceStepsUp (const TPCSectorData::SegmentInfo& s);
48 static void TraceStepsDown(const TPCSectorData::SegmentInfo& s);
50 static const Int_t fgkTextureWidth;
51 static const Int_t fgkTextureHeight;
52 static const Int_t fgkTextureByteSize;
54 }; // endclass TPCSector2D_GL_Rnr
57 inline UChar_t* TPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
59 return fImage + 4*(row*fgkTextureWidth + col);