File indexing completed on 2025-01-18 10:11:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveLine
0013 #define ROOT_TEveLine
0014
0015 #include "TEvePointSet.h"
0016 #include "TEveVector.h"
0017
0018 #include "TAttLine.h"
0019
0020
0021
0022
0023
0024 class TEveLine : public TEvePointSet,
0025 public TAttLine
0026 {
0027 friend class TEveLineEditor;
0028 friend class TEveLineGL;
0029
0030 private:
0031 TEveLine(const TEveLine&);
0032 TEveLine& operator=(const TEveLine&);
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 TEveLine(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
0043 TEveLine(const char* name, Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
0044 ~TEveLine() 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 TEveVector GetLineStart() const;
0063 TEveVector GetLineEnd() const;
0064
0065 const TGPicture* GetListTreeIcon(Bool_t open=kFALSE) override;
0066
0067 void CopyVizParams(const TEveElement* el) override;
0068 void WriteVizParams(std::ostream& out, const TString& var) override;
0069
0070 TClass* ProjectedClass(const TEveProjection* p) const override;
0071
0072 static Bool_t GetDefaultSmooth();
0073 static void SetDefaultSmooth(Bool_t r);
0074
0075 ClassDefOverride(TEveLine, 0);
0076 };
0077
0078
0079
0080
0081
0082
0083 class TEveLineProjected : public TEveLine,
0084 public TEveProjected
0085 {
0086 private:
0087 TEveLineProjected(const TEveLineProjected&);
0088 TEveLineProjected& operator=(const TEveLineProjected&);
0089
0090 protected:
0091 void SetDepthLocal(Float_t d) override;
0092
0093 public:
0094 TEveLineProjected();
0095 ~TEveLineProjected() override {}
0096
0097 void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
0098 void UpdateProjection() override;
0099 TEveElement* GetProjectedAsElement() override { return this; }
0100
0101 ClassDefOverride(TEveLineProjected, 0);
0102 };
0103
0104 #endif