3 #ifndef ALIEVE_TPCSector2DGL_H
4 #define ALIEVE_TPCSector2DGL_H
8 #include <Alieve/TPCSector2D.h>
9 #include <Alieve/TPCSectorData.h>
16 class TPCSector2DGL : public TGLObject
18 TPCSector2DGL(const TPCSector2DGL&); // Not implemented
19 TPCSector2DGL& operator=(const TPCSector2DGL&); // Not implemented
22 virtual void DirectDraw(const TGLDrawFlags & flags) const;
24 void LoadPadrow(TPCSectorData::RowIterator& iter, Int_t row, Int_t off) const;
25 void CreateTexture() const;
27 void DisplayTexture(const TPCSectorData::SegmentInfo& seg,
28 Int_t startCol, Int_t startRow) const;
29 void DisplayQuads(const TPCSectorData::SegmentInfo& seg,
30 Int_t startCol, Int_t startRow) const;
31 void DisplayNamedQuads(const TPCSectorData::SegmentInfo& seg,
32 Int_t startCol, Int_t startRow) const;
33 void DisplayFrame() const;
35 UChar_t* GetRowCol(Int_t row, Int_t col) const;
38 mutable TPCSectorData* fSectorData;
40 mutable UChar_t* fImage;
41 mutable UInt_t fTexture;
46 virtual ~TPCSector2DGL();
48 virtual Bool_t SetModel(TObject* obj);
49 virtual void SetBBox();
50 virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
52 virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
54 static void TraceStepsUp (const TPCSectorData::SegmentInfo& s);
55 static void TraceStepsDown(const TPCSectorData::SegmentInfo& s);
57 static const Int_t fgkTextureWidth;
58 static const Int_t fgkTextureHeight;
59 static const Int_t fgkTextureByteSize;
61 }; // endclass TPCSector2D_GL_Rnr
64 inline UChar_t* TPCSector2DGL::GetRowCol(Int_t row, Int_t col) const
66 return fImage + 4*(row*fgkTextureWidth + col);