Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveQuadSet.h
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TEveQuadSet
13#define ROOT_TEveQuadSet
14
15#include "TEveDigitSet.h"
16
17class TRandom;
18
20{
21 friend class TEveQuadSetGL;
22
23 TEveQuadSet(const TEveQuadSet&); // Not implemented
24 TEveQuadSet& operator=(const TEveQuadSet&); // Not implemented
25
26public:
28 kQT_Undef, // unknown-ignored
29 kQT_FreeQuad, // arbitrary quad: specify 4*(x,y,z) quad corners
30 kQT_RectangleXY, // rectangle in x-y plane: specify x, y, z, w, h
31 kQT_RectangleXZ, // rectangle in x-z plane: specify x, y, z, w, h
32 kQT_RectangleYZ, // rectangle in y-z plane: specify x, y, z, w, h
33 kQT_RectangleXYFixedDim, // rectangle in x-y plane: specify x, y, z; w, h taken from fDefWidth/Height
34 kQT_RectangleXYFixedZ, // rectangle in x-y plane: specify x, y, w, h; z taken from fDefCoord
35 kQT_RectangleXZFixedY, // rectangle in x-z plane: specify x, z, w, h; y taken from fDefCoord
36 kQT_RectangleYZFixedX, // rectangle in y-z plane: specify y, z, w, h; x taken from fDefWidth/Height/Coord
37 kQT_RectangleXYFixedDimZ, // rectangle in x-y plane: specify x, y; w, h, z taken from fDefWidth/Height/Coord
38 kQT_RectangleXZFixedDimY, // rectangle in x-z plane: specify x, z; w, h, y taken from fDefWidth/Height/Coord
39 kQT_RectangleYZFixedDimX, // rectangle in y-z plane: specify y, z; w, h, x taken from fDefWidth/Height/Coord
41 // line modes (needed for uniform handling of silicon-strip digits)
42 kQT_LineXYFixedZ, // line in x-y plane: specify x, y, w(dx), h(dy); z taken from fDefCoord
43 kQT_LineXZFixedY, // line in x-z plane: specify x, z, w(dx), h(dz); y taken from fDefCoord
45 // hexagon modes
46 kQT_HexagonXY, // horizontal hexagon: specify x, y, z, r
47 kQT_HexagonYX, // vertical hexagon: specify x, y, z, r
49 // circle modes:
50 // QT_CircleXY, // specify r, z
51 // QT_CircleXYFixedZ, // specify r
52 // QT_CircleXYFixedR, // specify z
53 };
54
55 struct QFreeQuad_t : public DigitBase_t { Float_t fVertices[12]; };
56
57 struct QOrigin_t : public DigitBase_t { Float_t fA, fB; };
58
59 struct QRectFixDimC_t : public QOrigin_t {};
60
61 struct QRectFixDim_t : public QRectFixDimC_t { Float_t fC; };
62
63 struct QRectFixC_t : public QRectFixDimC_t { Float_t fW, fH; };
64
65 struct QRect_t : public QRectFixDim_t { Float_t fW, fH; };
66
67 struct QLineFixC_t : public QOrigin_t { Float_t fDx, fDy; };
68
69 struct QHex_t : public QOrigin_t { Float_t fC, fR; };
70
71protected:
73
74 Float_t fDefWidth; // Breadth assigned to first coordinate (A)
75 Float_t fDefHeight; // Breadth assigned to second coordinate (B)
76 Float_t fDefCoord; // Default value for third coordinate (C)
77
78 static Int_t SizeofAtom(EQuadType_e qt);
79
80public:
81 TEveQuadSet(const char* n="TEveQuadSet", const char* t="");
82 TEveQuadSet(EQuadType_e quadType, Bool_t valIsCol, Int_t chunkSize,
83 const char* n="TEveQuadSet", const char* t="");
84 virtual ~TEveQuadSet() {}
85
86 void Reset(EQuadType_e quadType, Bool_t valIsCol, Int_t chunkSize);
87
88 Float_t GetDefWidth() const { return fDefWidth; }
89 Float_t GetDefHeight() const { return fDefHeight; }
90 Float_t GetDefCoord() const { return fDefCoord; }
91
95
96 // --------------------------------
97
98 void AddQuad(Float_t verts[12]);
99
100 void AddQuad(Float_t a, Float_t b);
104
106
108
109 // Wrappers to make transition to TEveDigitSet as base easier
111 void QuadColor(Color_t ci) { DigitColor(ci); }
113 void QuadId(TObject* id) { DigitId(id); }
114
115 // --------------------------------
116
117 // void Test(Int_t nquads);
118
119 virtual void ComputeBBox();
120
121 // virtual void Paint(Option_t* option="");
122
123 ClassDef(TEveQuadSet, 0); // Collection of 2D primitives (rectangles, hexagons, or lines); each primitive can be assigned a signal value and a TRef.
124};
125
126#endif
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define g(i)
Definition RSha256.hxx:105
#define a(i)
Definition RSha256.hxx:99
#define h(i)
Definition RSha256.hxx:106
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
unsigned char UChar_t
Definition RtypesCore.h:38
float Float_t
Definition RtypesCore.h:57
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Base-class for storage of digit collections; provides transformation matrix (TEveTrans),...
void DigitColor(Color_t ci)
Set color for the last digit added.
void DigitValue(Int_t value)
Set signal value for the last digit added.
void DigitId(TObject *id)
Set external object reference for the last digit added.
GL-renderer for TEveQuadSet class.
Supports various internal formats that result in rendering of a set of planar (lines,...
Definition TEveQuadSet.h:20
Float_t fDefHeight
Definition TEveQuadSet.h:75
void AddQuad(Float_t verts[12])
Add a quad specified with 4 vertices.
Float_t GetDefHeight() const
Definition TEveQuadSet.h:89
@ kQT_RectangleYZFixedX
Definition TEveQuadSet.h:36
@ kQT_RectangleXZFixedDimY
Definition TEveQuadSet.h:38
@ kQT_RectangleXYFixedDim
Definition TEveQuadSet.h:33
@ kQT_RectangleXYFixedZ
Definition TEveQuadSet.h:34
@ kQT_RectangleXYFixedDimZ
Definition TEveQuadSet.h:37
@ kQT_RectangleYZFixedDimX
Definition TEveQuadSet.h:39
@ kQT_RectangleXZFixedY
Definition TEveQuadSet.h:35
virtual ~TEveQuadSet()
Definition TEveQuadSet.h:84
Float_t GetDefWidth() const
Definition TEveQuadSet.h:88
void QuadColor(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255)
void QuadValue(Int_t value)
virtual void ComputeBBox()
Fill bounding-box information.
TEveQuadSet & operator=(const TEveQuadSet &)
Float_t fDefWidth
Definition TEveQuadSet.h:74
void SetDefWidth(Float_t v)
Definition TEveQuadSet.h:92
TEveQuadSet(const TEveQuadSet &)
void QuadId(TObject *id)
static Int_t SizeofAtom(EQuadType_e qt)
Return size of given atom type.
void SetDefHeight(Float_t v)
Definition TEveQuadSet.h:93
Float_t fDefCoord
Definition TEveQuadSet.h:76
EQuadType_e fQuadType
Definition TEveQuadSet.h:72
void Reset(EQuadType_e quadType, Bool_t valIsCol, Int_t chunkSize)
Clear the quad-set and reset the basic parameters.
void AddLine(Float_t a, Float_t b, Float_t w, Float_t h)
Add a line with starting coordinates and displacements.
void QuadColor(Color_t ci)
Float_t GetDefCoord() const
Definition TEveQuadSet.h:90
void SetDefCoord(Float_t v)
Definition TEveQuadSet.h:94
void AddHexagon(Float_t a, Float_t b, Float_t z, Float_t r)
Add a hexagon with given center (a,b,c) and radius.
Mother of all ROOT objects.
Definition TObject.h:41
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
const Int_t n
Definition legend1.C:16