#ifndef ROOT_TEveQuadSet
#define ROOT_TEveQuadSet
#include "TEveDigitSet.h"
class TRandom;
class TEveQuadSet : public TEveDigitSet
{
friend class TEveQuadSetGL;
TEveQuadSet(const TEveQuadSet&);
TEveQuadSet& operator=(const TEveQuadSet&);
public:
enum EQuadType_e
{
kQT_Undef,
kQT_FreeQuad,
kQT_RectangleXY,
kQT_RectangleXZ,
kQT_RectangleYZ,
kQT_RectangleXYFixedDim,
kQT_RectangleXYFixedZ,
kQT_RectangleXZFixedY,
kQT_RectangleYZFixedX,
kQT_RectangleXYFixedDimZ,
kQT_RectangleXZFixedDimY,
kQT_RectangleYZFixedDimX,
kQT_Rectangle_End,
kQT_LineXYFixedZ,
kQT_LineXZFixedY,
kQT_Line_End,
kQT_HexagonXY,
kQT_HexagonYX,
kQT_Hexagon_End
};
protected:
struct QFreeQuad_t : public DigitBase_t { Float_t fVertices[12]; };
struct QOrigin_t : public DigitBase_t { Float_t fA, fB; };
struct QRectFixDimC_t : public QOrigin_t {};
struct QRectFixDim_t : public QRectFixDimC_t { Float_t fC; };
struct QRectFixC_t : public QRectFixDimC_t { Float_t fW, fH; };
struct QRect_t : public QRectFixDim_t { Float_t fW, fH; };
struct QLineFixC_t : public QOrigin_t { Float_t fDx, fDy; };
struct QHex_t : public QOrigin_t { Float_t fC, fR; };
protected:
EQuadType_e fQuadType;
Float_t fDefWidth;
Float_t fDefHeight;
Float_t fDefCoord;
static Int_t SizeofAtom(EQuadType_e qt);
public:
TEveQuadSet(const char* n="TEveQuadSet", const char* t="");
TEveQuadSet(EQuadType_e quadType, Bool_t valIsCol, Int_t chunkSize,
const char* n="TEveQuadSet", const char* t="");
virtual ~TEveQuadSet() {}
void Reset(EQuadType_e quadType, Bool_t valIsCol, Int_t chunkSize);
Float_t GetDefWidth() const { return fDefWidth; }
Float_t GetDefHeight() const { return fDefHeight; }
Float_t GetDefCoord() const { return fDefCoord; }
void SetDefWidth(Float_t v) { fDefWidth = v; }
void SetDefHeight(Float_t v) { fDefHeight = v; }
void SetDefCoord(Float_t v) { fDefCoord = v; }
void AddQuad(Float_t* verts);
void AddQuad(Float_t a, Float_t b);
void AddQuad(Float_t a, Float_t b, Float_t c);
void AddQuad(Float_t a, Float_t b, Float_t w, Float_t h);
void AddQuad(Float_t a, Float_t b, Float_t c, Float_t w, Float_t h);
void AddLine(Float_t a, Float_t b, Float_t w, Float_t h);
void AddHexagon(Float_t a, Float_t b, Float_t z, Float_t r);
void QuadValue(Int_t value) { DigitValue(value); }
void QuadColor(Color_t ci) { DigitColor(ci); }
void QuadColor(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255) { DigitColor(r, g, b, a); }
void QuadId(TObject* id) { DigitId(id); }
virtual void ComputeBBox();
ClassDef(TEveQuadSet, 0);
};
#endif