Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
20namespace ROOT {
21namespace Experimental {
22
23////////////////////////////////////////////////////////////////////////////////
24/// REveLine
25/// An arbitrary polyline with fixed line and marker attributes.
26////////////////////////////////////////////////////////////////////////////////
27
28class REveLine : public REvePointSet,
29 public TAttLine
30{
31private:
32 REveLine &operator=(const REveLine &) = delete;
33
34protected:
38
40
41public:
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
61
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
82private:
85
86protected:
87 void SetDepthLocal(Float_t d) override;
88
89public:
91 virtual ~REveLineProjected() {}
92
93 void SetProjection(REveProjectionManager *mng, REveProjectable *model) override;
94 void UpdateProjection() override;
95 REveElement *GetProjectedAsElement() override { return this; }
96};
97
98} // namespace Experimental
99} // namespace ROOT
100
101#endif
#define d(i)
Definition RSha256.hxx:102
short Style_t
Definition RtypesCore.h:89
bool Bool_t
Definition RtypesCore.h:63
short Color_t
Definition RtypesCore.h:92
short Width_t
Definition RtypesCore.h:91
float Float_t
Definition RtypesCore.h:57
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t SetLineWidth
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
char name[80]
Definition TGX11.cxx:110
virtual void SetMainColor(Color_t color)
Set main color of the element.
REveLineProjected()
Default constructor.
Definition REveLine.cxx:333
void SetDepthLocal(Float_t d) override
Set depth (z-coordinate) of the projected points.
Definition REveLine.cxx:353
REveLineProjected(const REveLineProjected &)=delete
void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
Set projection manager and projection model.
Definition REveLine.cxx:343
REveLineProjected & operator=(const REveLineProjected &)=delete
void UpdateProjection() override
Re-apply the projection.
Definition REveLine.cxx:367
REveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to REveElement.
Definition REveLine.hxx:95
REveLine An arbitrary polyline with fixed line and marker attributes.
Definition REveLine.hxx:30
REveVector GetLineEnd() const
Return the last point of the line.
Definition REveLine.cxx:235
void ReduceSegmentLengths(Float_t max)
Make sure that no segment is longer than max.
Definition REveLine.cxx:167
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
Definition REveLine.cxx:245
void SetSmooth(Bool_t r)
Set smooth rendering. Propagate to projected lines.
Definition REveLine.cxx:148
void SetMarkerColor(Color_t col) override
Set marker color. Propagate to projected lines.
Definition REveLine.cxx:58
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
Definition REveLine.cxx:262
REveVector GetLineStart() const
Return the first point of the line.
Definition REveLine.cxx:224
static Bool_t GetDefaultSmooth()
Get default value for smooth-line drawing flag.
Definition REveLine.cxx:310
void SetLineColor(Color_t col) override
Set the line color.
Definition REveLine.hxx:48
static void SetDefaultSmooth(Bool_t r)
Set default value for smooth-line drawing flag (default kFALSE).
Definition REveLine.cxx:319
static Bool_t fgDefaultSmooth
Definition REveLine.hxx:39
Bool_t GetRnrPoints() const
Definition REveLine.hxx:53
void SetLineStyle(Style_t lstyle) override
Set line-style of the line.
Definition REveLine.cxx:76
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Write core json.
Definition REveLine.cxx:283
REveLine & operator=(const REveLine &)=delete
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
Definition REveLine.cxx:112
Float_t CalculateLineLength() const
Sum-up lengths of individual segments.
Definition REveLine.cxx:208
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Definition REveLine.cxx:130
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REvePointSetProjected class.
Definition REveLine.cxx:276
void BuildRenderData() override
Virtual from REveElement. Prepares render data for binary streaming to client.
Definition REveLine.cxx:297
REveProjectionManager Manager class for steering of projections and managing projected objects.
REveProjection Base for specific classes that implement non-linear projections.
Line Attributes class.
Definition TAttLine.h:18
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Basic string class.
Definition TString.h:139
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
TLine l
Definition textangle.C:4