Logo ROOT  
Reference Guide
REveLine.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007, 2018
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT7_REveLine
13 #define ROOT7_REveLine
14 
15 #include <ROOT/REvePointSet.hxx>
16 #include <ROOT/REveVector.hxx>
17 
18 #include "TAttLine.h"
19 
20 namespace ROOT {
21 namespace Experimental {
22 
23 ////////////////////////////////////////////////////////////////////////////////
24 /// REveLine
25 /// An arbitrary polyline with fixed line and marker attributes.
26 ////////////////////////////////////////////////////////////////////////////////
27 
28 class REveLine : public REvePointSet,
29  public TAttLine
30 {
31 private:
32  REveLine &operator=(const REveLine &) = delete;
33 
34 protected:
38 
40 
41 public:
42  REveLine(const std::string &name = "", const std::string &title = "", Int_t n_points = 0);
43  REveLine(const REveLine &l);
44  virtual ~REveLine() {}
45 
46  void SetMarkerColor(Color_t col) override;
47 
48  void SetLineColor(Color_t col) override { SetMainColor(col); }
49  void SetLineStyle(Style_t lstyle) override;
50  void SetLineWidth(Width_t lwidth) override;
51 
52  Bool_t GetRnrLine() const { return fRnrLine; }
53  Bool_t GetRnrPoints() const { return fRnrPoints; }
54  Bool_t GetSmooth() const { return fSmooth; }
55  void SetRnrLine(Bool_t r);
56  void SetRnrPoints(Bool_t r);
57  void SetSmooth(Bool_t r);
58 
59  void ReduceSegmentLengths(Float_t max);
61 
62  REveVector GetLineStart() const;
63  REveVector GetLineEnd() const;
64 
65  void CopyVizParams(const REveElement *el) override;
66  void WriteVizParams(std::ostream &out, const TString &var) override;
67 
68  TClass *ProjectedClass(const REveProjection *p) const override;
69 
70  Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override;
71  void BuildRenderData() override;
72 
73  static Bool_t GetDefaultSmooth();
74  static void SetDefaultSmooth(Bool_t r);
75 };
76 
77 //------------------------------------------------------------------------------
78 // REveLineProjected
79 //------------------------------------------------------------------------------
80 
81 class REveLineProjected : public REveLine, public REveProjected {
82 private:
85 
86 protected:
87  void SetDepthLocal(Float_t d) override;
88 
89 public:
91  virtual ~REveLineProjected() {}
92 
94  void UpdateProjection() override;
95  REveElement *GetProjectedAsElement() override { return this; }
96 };
97 
98 } // namespace Experimental
99 } // namespace ROOT
100 
101 #endif
l
auto * l
Definition: textangle.C:4
ROOT::Experimental::REveLine::ProjectedClass
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REvePointSetProjected class.
Definition: REveLine.cxx:274
ROOT::Experimental::REveLine::GetDefaultSmooth
static Bool_t GetDefaultSmooth()
Get default value for smooth-line drawing flag.
Definition: REveLine.cxx:308
ROOT::Experimental::REveProjected
Definition: REveProjectionBases.hxx:81
ROOT::Experimental::REveLine::SetRnrPoints
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Definition: REveLine.cxx:128
Style_t
short Style_t
Definition: RtypesCore.h:80
ROOT::Experimental::REveLine::SetLineStyle
void SetLineStyle(Style_t lstyle) override
Set line-style of the line.
Definition: REveLine.cxx:74
ROOT::Experimental::REveLineProjected::UpdateProjection
void UpdateProjection() override
Re-apply the projection.
Definition: REveLine.cxx:365
ROOT::Experimental::REveLine::~REveLine
virtual ~REveLine()
Definition: REveLine.hxx:44
r
ROOT::R::TRInterface & r
Definition: Object.C:4
ROOT::Experimental::REveLine::ReduceSegmentLengths
void ReduceSegmentLengths(Float_t max)
Make sure that no segment is longer than max.
Definition: REveLine.cxx:165
Float_t
float Float_t
Definition: RtypesCore.h:57
ROOT::Experimental::REveLineProjected::GetProjectedAsElement
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
Definition: REveLine.hxx:95
Int_t
int Int_t
Definition: RtypesCore.h:45
ROOT::Experimental::REveLine::fRnrPoints
Bool_t fRnrPoints
Definition: REveLine.hxx:36
REvePointSet.hxx
ROOT::Experimental::REveLine::SetRnrLine
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
Definition: REveLine.cxx:110
TString
Basic string class.
Definition: TString.h:136
ROOT::Experimental::REveElement
Definition: REveElement.hxx:41
ROOT::Experimental::REveVectorT< Float_t >
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
Color_t
short Color_t
Definition: RtypesCore.h:83
bool
ROOT::Experimental::REveProjection
REveProjection Base for specific classes that implement non-linear projections.
Definition: REveProjections.hxx:30
ROOT::Experimental::REveLine::SetDefaultSmooth
static void SetDefaultSmooth(Bool_t r)
Set default value for smooth-line drawing flag (default kFALSE).
Definition: REveLine.cxx:317
TAttLine.h
ROOT::Experimental::REveLineProjected::REveLineProjected
REveLineProjected()
Default constructor.
Definition: REveLine.cxx:331
ROOT::Experimental::REveLine::fSmooth
Bool_t fSmooth
Definition: REveLine.hxx:37
ROOT::Experimental::REveLine::SetLineColor
void SetLineColor(Color_t col) override
Set the line color.
Definition: REveLine.hxx:48
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
ROOT::Experimental::REveLine::GetLineStart
REveVector GetLineStart() const
Return the first point of the line.
Definition: REveLine.cxx:222
Width_t
short Width_t
Definition: RtypesCore.h:82
ROOT::Experimental::REveProjectable
Definition: REveProjectionBases.hxx:38
ROOT::Experimental::REveLine::GetSmooth
Bool_t GetSmooth() const
Definition: REveLine.hxx:54
ROOT::Experimental::REveLineProjected::SetDepthLocal
void SetDepthLocal(Float_t d) override
Set depth (z-coordinate) of the projected points.
Definition: REveLine.cxx:351
ROOT::Experimental::REveLineProjected::REveLineProjected
REveLineProjected(const REveLineProjected &)=delete
ROOT::Experimental::REveLine::fgDefaultSmooth
static Bool_t fgDefaultSmooth
Definition: REveLine.hxx:39
ROOT::Experimental::REvePointSet
Definition: REvePointSet.hxx:38
ROOT::Experimental::REveLineProjected::SetProjection
void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
Set projection manager and projection model.
Definition: REveLine.cxx:341
ROOT::Experimental::REveLine::GetLineEnd
REveVector GetLineEnd() const
Return the last point of the line.
Definition: REveLine.cxx:233
ROOT::Experimental::REveLine::GetRnrPoints
Bool_t GetRnrPoints() const
Definition: REveLine.hxx:53
ROOT::Experimental::REveLineProjected
Definition: REveLine.hxx:81
ROOT::Experimental::REveLine::BuildRenderData
void BuildRenderData() override
Virtual from REveElement. Prepares render data for binary streaming to client.
Definition: REveLine.cxx:295
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
ROOT::Experimental::REveLine::operator=
REveLine & operator=(const REveLine &)=delete
ROOT::Experimental::REveLine::WriteCoreJson
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Write core json.
Definition: REveLine.cxx:281
ROOT::Experimental::REveLine::SetSmooth
void SetSmooth(Bool_t r)
Set smooth rendering. Propagate to projected lines.
Definition: REveLine.cxx:146
ROOT::Experimental::REveLine::SetMarkerColor
void SetMarkerColor(Color_t col) override
Set marker color. Propagate to projected lines.
Definition: REveLine.cxx:56
name
char name[80]
Definition: TGX11.cxx:110
REveVector.hxx
ROOT::Experimental::REveLine::CopyVizParams
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
Definition: REveLine.cxx:243
d
#define d(i)
Definition: RSha256.hxx:102
make_cnn_model.model
model
Definition: make_cnn_model.py:6
ROOT::Experimental::REveLine::SetLineWidth
void SetLineWidth(Width_t lwidth) override
Set line-style of the line.
Definition: REveLine.cxx:92
ROOT::Experimental::REveLineProjected::operator=
REveLineProjected & operator=(const REveLineProjected &)=delete
ROOT::Experimental::REveLine
REveLine An arbitrary polyline with fixed line and marker attributes.
Definition: REveLine.hxx:30
ROOT::Experimental::REveLine::fRnrLine
Bool_t fRnrLine
Definition: REveLine.hxx:35
ROOT::Experimental::REveLine::GetRnrLine
Bool_t GetRnrLine() const
Definition: REveLine.hxx:52
ROOT::Experimental::REveLine::CalculateLineLength
Float_t CalculateLineLength() const
Sum-up lengths of individual segments.
Definition: REveLine.cxx:206
ROOT::Experimental::REveProjectionManager
REveProjectionManager Manager class for steering of projections and managing projected objects.
Definition: REveProjectionManager.hxx:30
ROOT::Experimental::REveLineProjected::~REveLineProjected
virtual ~REveLineProjected()
Definition: REveLine.hxx:91
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::REveElement::SetMainColor
virtual void SetMainColor(Color_t color)
Set main color of the element.
Definition: REveElement.cxx:684
ROOT::Experimental::REveLine::REveLine
REveLine(const std::string &name="", const std::string &title="", Int_t n_points=0)
Constructor.
Definition: REveLine.cxx:31
int
ROOT::Experimental::REveLine::WriteVizParams
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
Definition: REveLine.cxx:260