00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TPolyLine3D
00013 #define ROOT_TPolyLine3D
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027 #ifndef ROOT_TList
00028 #include "TList.h"
00029 #endif
00030 #ifndef ROOT_TTString
00031 #include "TString.h"
00032 #endif
00033 #ifndef ROOT_TAttLine
00034 #include "TAttLine.h"
00035 #endif
00036 #ifndef ROOT_TAtt3D
00037 #include "TAtt3D.h"
00038 #endif
00039
00040
00041 class TPolyLine3D : public TObject, public TAttLine, public TAtt3D
00042 {
00043 protected:
00044 Int_t fN;
00045 Float_t *fP;
00046 TString fOption;
00047 Int_t fLastPoint;
00048
00049 public:
00050 TPolyLine3D();
00051 TPolyLine3D(Int_t n, Option_t *option="");
00052 TPolyLine3D(Int_t n, Float_t *p, Option_t *option="");
00053 TPolyLine3D(Int_t n, Double_t *p, Option_t *option="");
00054 TPolyLine3D(Int_t n, Float_t *x, Float_t *y, Float_t *z, Option_t *option="");
00055 TPolyLine3D(Int_t n, Double_t *x, Double_t *y, Double_t *z, Option_t *option="");
00056 TPolyLine3D(const TPolyLine3D &polylin);
00057 TPolyLine3D& operator=(const TPolyLine3D &polylin);
00058 virtual ~TPolyLine3D();
00059
00060 virtual void Copy(TObject &polyline) const;
00061 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00062 virtual void Draw(Option_t *option="");
00063 virtual void DrawPolyLine(Int_t n, Float_t *p, Option_t *option="");
00064 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00065 Int_t GetLastPoint() const {return fLastPoint;}
00066 Int_t GetN() const {return fN;}
00067 Float_t *GetP() const {return fP;}
00068 Option_t *GetOption() const {return fOption.Data();}
00069 virtual void ls(Option_t *option="") const;
00070 virtual Int_t Merge(TCollection *list);
00071 virtual void Paint(Option_t *option="");
00072 virtual void Print(Option_t *option="") const;
00073 virtual void SavePrimitive(ostream &out, Option_t *option = "");
00074 virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z);
00075 virtual void SetOption(Option_t *option="") {fOption = option;}
00076 virtual void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z);
00077 virtual void SetPolyLine(Int_t n, Option_t *option="");
00078 virtual void SetPolyLine(Int_t n, Float_t *p, Option_t *option="");
00079 virtual void SetPolyLine(Int_t n, Double_t *p, Option_t *option="");
00080 virtual Int_t Size() const { return fLastPoint+1;}
00081
00082 static void DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax);
00083
00084 ClassDef(TPolyLine3D,1)
00085 };
00086
00087 #endif