File indexing completed on 2025-01-18 10:12:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TPolyMarker3D
0013 #define ROOT_TPolyMarker3D
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "TObject.h"
0025 #include "TAttMarker.h"
0026 #include "TAtt3D.h"
0027 #include "TString.h"
0028
0029 class TH1;
0030 class TCollection;
0031
0032 class TPolyMarker3D : public TObject, public TAttMarker, public TAtt3D
0033 {
0034 protected:
0035 Int_t fN{0};
0036 Float_t *fP{nullptr};
0037 TString fOption;
0038 Int_t fLastPoint{-1};
0039 TString fName;
0040
0041 public:
0042 TPolyMarker3D();
0043 TPolyMarker3D(Int_t n, Marker_t marker=1, Option_t *option="");
0044 TPolyMarker3D(Int_t n, Float_t *p, Marker_t marker=1, Option_t *option="");
0045 TPolyMarker3D(Int_t n, Double_t *p, Marker_t marker=1, Option_t *option="");
0046 TPolyMarker3D(const TPolyMarker3D &p);
0047 TPolyMarker3D& operator=(const TPolyMarker3D&);
0048 ~TPolyMarker3D() override;
0049
0050 void Copy(TObject &polymarker) const override;
0051 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0052 void Draw(Option_t *option="") override;
0053 virtual void DrawPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="");
0054 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0055 virtual Int_t GetLastPoint() const { return fLastPoint;}
0056 const char *GetName() const override { return fName.Data(); }
0057 virtual Int_t GetN() const { return fN;}
0058 virtual Float_t *GetP() const { return fP;}
0059 virtual void GetPoint(Int_t n, Float_t &x, Float_t &y, Float_t &z) const;
0060 virtual void GetPoint(Int_t n, Double_t &x, Double_t &y, Double_t &z) const;
0061 Option_t *GetOption() const override { return fOption.Data(); }
0062 void ls(Option_t *option="") const override;
0063 virtual Int_t Merge(TCollection *list);
0064 void Paint(Option_t *option="") override;
0065 void Print(Option_t *option="") const override;
0066 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
0067 virtual void SetName(const char *name);
0068 void SetPoint(Int_t n, Double_t x, Double_t y, Double_t z);
0069 virtual void SetPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="");
0070 virtual void SetPolyMarker(Int_t n, Double_t *p, Marker_t marker, Option_t *option="");
0071 virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z);
0072 virtual Int_t Size() const {return fLastPoint+1;}
0073
0074 static void PaintH3(TH1 *h, Option_t *option);
0075
0076 ClassDefOverride(TPolyMarker3D,3);
0077 };
0078
0079 #endif