]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Reve/BoxSet.h
Added methods Track::ImportHits() and Track::ImportClusters(); fixed a charge value...
[u/mrichter/AliRoot.git] / EVE / Reve / BoxSet.h
CommitLineData
915dabe1 1// $Header$
2
3#ifndef REVE_BoxSet_H
4#define REVE_BoxSet_H
5
6#include <Gtypes.h>
7#include <TNamed.h>
8#include <TAtt3D.h>
9#include <TAttBBox.h>
10#include <Reve/Reve.h>
11#include <vector>
12
13class TRandom;
14
15namespace Reve {
16
17struct Box
18{
19 Float_t vertices[24];
20 UChar_t color[4];
21
22 Box(Color_t col = 1)
23 { Reve::ColorFromIdx(col, color); }
24 Box(Color_t col, Float_t* p)
25 { Reve::ColorFromIdx(col, color); memcpy(vertices, p, 32*sizeof(Float_t)); }
26
27 Box(TRandom& rnd, Float_t origin, Float_t size);
28
29 virtual ~Box() {}
30
31 ClassDef(Box, 1);
32};
33
34/**************************************************************************/
35
36class BoxSet: public TNamed, public TAtt3D, public TAttBBox
37{
38 friend class BoxSetGL;
39
915dabe1 40protected:
41 Double_t fMatrix[16];
42 Bool_t fTrans;
43
44public:
45 std::vector<Box> fBoxes;
46
092578a7 47 BoxSet(const Text_t* n="BoxSet", const Text_t* t="");
915dabe1 48 virtual ~BoxSet() {}
49
50 void ClearSet() { fBoxes.clear(); }
51
52 Bool_t GetTrans() const { return fTrans; }
53 void SetTrans(Bool_t t) { fTrans = t; }
5987168b 54 Double_t* ArrTrans() { return fMatrix; }
915dabe1 55
56 virtual void ComputeBBox();
57 virtual void Paint(Option_t* option = "");
58
59 void Test(Int_t nboxes);
60
61 ClassDef(BoxSet, 1);
62}; // endclass BoxSet
63
64}
65
66#endif