]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Reve/StraightLineSet.h
Runloader is updated when moving to next file (quick fix).
[u/mrichter/AliRoot.git] / EVE / Reve / StraightLineSet.h
1 // $Header$
2
3 #ifndef REVE_StraightLineSet_H
4 #define REVE_StraightLineSet_H
5
6 #include <Reve/Reve.h>
7
8 #include <Gtypes.h>
9 #include <TNamed.h>
10 #include <TQObject.h>
11 #include <TAtt3D.h>
12 #include <TAttMarker.h>
13 #include <TAttBBox.h>
14
15 #include <Reve/Reve.h>
16 #include <Reve/RenderElement.h>
17 #include <Reve/Plex.h>
18 class TRandom;
19
20 namespace Reve {
21
22 class StraightLineSet : public RenderElement,
23                         public TNamed, public TQObject,
24                         public TAtt3D,
25                         public TAttMarker,
26                         public TAttBBox
27 {
28   friend class StraightLineSetGL; 
29   friend class StraightLineSetEditor;
30
31 private:
32   StraightLineSet(const StraightLineSet&);            // Not implemented
33   StraightLineSet& operator=(const StraightLineSet&); // Not implemented
34
35 protected:
36   struct Line {
37     Float_t        fV1[3];
38     Float_t        fV2[3];
39     TRef           fRef;
40
41     Line(Float_t x1, Float_t y1, Float_t z1,Float_t x2, Float_t y2, Float_t z2)
42     {
43       fV1[0] = x1, fV1[1] = y1, fV1[2] = z1;
44       fV2[0] = x2, fV2[1] = y2, fV2[2] = z2;
45     }
46   };
47  
48   struct Marker {
49     Int_t          fLineID;
50     Float_t        fPos;
51     TRef           fRef;
52
53     Marker(Int_t lineID, Float_t pos) : fLineID(lineID), fPos(pos) {};
54   };
55
56 protected:
57   Color_t           fColor;
58
59   Bool_t            fOwnLinesIds;       //Flag specifying if id-objects are owned by the QuadSet
60   Bool_t            fOwnMarkersIds;       //Flag specifying if id-objects are owned by the QuadSet
61   VoidCPlex         fLinePlex;
62   Line*             fLastLine;     //!
63   VoidCPlex         fMarkerPlex;
64
65   Bool_t            fRnrMarkers;
66   Bool_t            fRnrLines;
67
68 public:
69   StraightLineSet(const Text_t* n="StraightLine", const Text_t* t="");
70   virtual ~StraightLineSet() {}
71
72   virtual Bool_t CanEditMainColor() { return kTRUE; }
73
74   void AddLine(Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2);
75   void AddMarker(Int_t lineID, Float_t pos);
76
77   virtual void ComputeBBox();
78   virtual void Paint(Option_t* option="");
79
80   Color_t GetColor(){ return fColor; };
81   void    SetColor(Color_t c){ fColor=c; }
82
83   ClassDef(StraightLineSet, 1);
84 }; // endclass StraightLineSet
85
86 }
87
88 #endif