]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Reve/StraightLineSet.h
Getting rid of effC++ warnings about missing copy constructor and assignment operator.
[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   {
38     Float_t        fV1[3];
39     Float_t        fV2[3];
40     TRef           fRef;
41
42     Line(Float_t x1, Float_t y1, Float_t z1,Float_t x2, Float_t y2, Float_t z2)
43     {
44       fV1[0] = x1, fV1[1] = y1, fV1[2] = z1;
45       fV2[0] = x2, fV2[1] = y2, fV2[2] = z2;
46     }
47   };
48  
49   struct Marker
50   {
51     Int_t          fLineID;
52     Float_t        fPos;
53     TRef           fRef;
54
55     Marker(Int_t lineID, Float_t pos) : fLineID(lineID), fPos(pos) {};
56   };
57
58 protected:
59   Color_t           fColor;
60
61   Bool_t            fOwnLinesIds;       //Flag specifying if id-objects are owned by the QuadSet
62   Bool_t            fOwnMarkersIds;     //Flag specifying if id-objects are owned by the QuadSet
63   VoidCPlex         fLinePlex;
64   Line*             fLastLine;     //!
65   VoidCPlex         fMarkerPlex;
66
67   Bool_t            fRnrMarkers;
68   Bool_t            fRnrLines;
69
70 public:
71   StraightLineSet(const Text_t* n="StraightLine", const Text_t* t="");
72   virtual ~StraightLineSet() {}
73
74   virtual Bool_t CanEditMainColor() { return kTRUE; }
75
76   void AddLine(Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2);
77   void AddMarker(Int_t lineID, Float_t pos);
78
79   virtual void ComputeBBox();
80   virtual void Paint(Option_t* option="");
81
82   Color_t GetColor()    const { return fColor; };
83   void    SetColor(Color_t c) { fColor=c; }
84
85   ClassDef(StraightLineSet, 1);
86 }; // endclass StraightLineSet
87
88 }
89
90 #endif