File indexing completed on 2025-01-18 10:10:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT7_REveLine
0013 #define ROOT7_REveLine
0014
0015 #include <ROOT/REvePointSet.hxx>
0016 #include <ROOT/REveVector.hxx>
0017
0018 #include "TAttLine.h"
0019
0020 namespace ROOT {
0021 namespace Experimental {
0022
0023
0024
0025
0026
0027
0028 class REveLine : public REvePointSet,
0029 public TAttLine
0030 {
0031 private:
0032 REveLine &operator=(const REveLine &) = delete;
0033
0034 protected:
0035 Bool_t fRnrLine;
0036 Bool_t fRnrPoints;
0037 Bool_t fSmooth;
0038
0039 static Bool_t fgDefaultSmooth;
0040
0041 public:
0042 REveLine(const std::string &name = "", const std::string &title = "", Int_t n_points = 0);
0043 REveLine(const REveLine &l);
0044 ~REveLine() override {}
0045
0046 void SetMarkerColor(Color_t col) override;
0047
0048 void SetLineColor(Color_t col) override { SetMainColor(col); }
0049 void SetLineStyle(Style_t lstyle) override;
0050 void SetLineWidth(Width_t lwidth) override;
0051
0052 Bool_t GetRnrLine() const { return fRnrLine; }
0053 Bool_t GetRnrPoints() const { return fRnrPoints; }
0054 Bool_t GetSmooth() const { return fSmooth; }
0055 void SetRnrLine(Bool_t r);
0056 void SetRnrPoints(Bool_t r);
0057 void SetSmooth(Bool_t r);
0058
0059 void ReduceSegmentLengths(Float_t max);
0060 Float_t CalculateLineLength() const;
0061
0062 REveVector GetLineStart() const;
0063 REveVector GetLineEnd() const;
0064
0065 void CopyVizParams(const REveElement *el) override;
0066 void WriteVizParams(std::ostream &out, const TString &var) override;
0067
0068 TClass *ProjectedClass(const REveProjection *p) const override;
0069
0070 Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override;
0071 void BuildRenderData() override;
0072
0073 static Bool_t GetDefaultSmooth();
0074 static void SetDefaultSmooth(Bool_t r);
0075 };
0076
0077
0078
0079
0080
0081 class REveLineProjected : public REveLine, public REveProjected {
0082 private:
0083 REveLineProjected(const REveLineProjected &) = delete;
0084 REveLineProjected &operator=(const REveLineProjected &) = delete;
0085
0086 protected:
0087 void SetDepthLocal(Float_t d) override;
0088
0089 public:
0090 REveLineProjected();
0091 ~REveLineProjected() override {}
0092
0093 void SetProjection(REveProjectionManager *mng, REveProjectable *model) override;
0094 void UpdateProjection() override;
0095 REveElement *GetProjectedAsElement() override { return this; }
0096 };
0097
0098 }
0099 }
0100
0101 #endif