Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveLine.h
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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 ROOT_TEveLine
13#define ROOT_TEveLine
14
15#include "TEvePointSet.h"
16#include "TEveVector.h"
17
18#include "TAttLine.h"
19
20//------------------------------------------------------------------------------
21// TEveLine
22//------------------------------------------------------------------------------
23
24class TEveLine : public TEvePointSet,
25 public TAttLine
26{
27 friend class TEveLineEditor;
28 friend class TEveLineGL;
29
30private:
31 TEveLine(const TEveLine&); // Not implemented
32 TEveLine& operator=(const TEveLine&); // Not implemented
33
34protected:
38
40
41public:
42 TEveLine(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
43 TEveLine(const char* name, Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
44 ~TEveLine() override {}
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 TEveVector GetLineEnd() const;
64
65 const TGPicture* GetListTreeIcon(Bool_t open=kFALSE) override;
66
67 void CopyVizParams(const TEveElement* el) override;
68 void WriteVizParams(std::ostream& out, const TString& var) override;
69
70 TClass* ProjectedClass(const TEveProjection* p) const override;
71
72 static Bool_t GetDefaultSmooth();
73 static void SetDefaultSmooth(Bool_t r);
74
75 ClassDefOverride(TEveLine, 0); // An arbitrary polyline with fixed line and marker attributes.
76};
77
78
79//------------------------------------------------------------------------------
80// TEveLineProjected
81//------------------------------------------------------------------------------
82
84 public TEveProjected
85{
86private:
87 TEveLineProjected(const TEveLineProjected&); // Not implemented
88 TEveLineProjected& operator=(const TEveLineProjected&); // Not implemented
89
90protected:
91 void SetDepthLocal(Float_t d) override;
92
93public:
95 ~TEveLineProjected() override {}
96
97 void SetProjection(TEveProjectionManager* mng, TEveProjectable* model) override;
98 void UpdateProjection() override;
99 TEveElement* GetProjectedAsElement() override { return this; }
100
101 ClassDefOverride(TEveLineProjected, 0); // Projected replica of a TEveLine.
102};
103
104#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
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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
Line Attributes class.
Definition TAttLine.h:18
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
virtual void SetMainColor(Color_t color)
Set main color of the element.
Editor for TEveLine class.
GL-renderer for TEveLine class.
Definition TEveLineGL.h:24
Projected copy of a TEveLine.
Definition TEveLine.h:85
TEveLineProjected & operator=(const TEveLineProjected &)
void UpdateProjection() override
Re-apply the projection.
Definition TEveLine.cxx:358
TEveLineProjected(const TEveLineProjected &)
~TEveLineProjected() override
Definition TEveLine.h:95
TEveElement * GetProjectedAsElement() override
Returns this projected dynamic-casted to TEveElement.
Definition TEveLine.h:99
TEveLineProjected()
Default constructor.
Definition TEveLine.cxx:324
void SetDepthLocal(Float_t d) override
Set depth (z-coordinate) of the projected points.
Definition TEveLine.cxx:344
void SetProjection(TEveProjectionManager *mng, TEveProjectable *model) override
Set projection manager and projection model.
Definition TEveLine.cxx:334
An arbitrary polyline with fixed line and marker attributes.
Definition TEveLine.h:26
Float_t CalculateLineLength() const
Sum-up lengths of individual segments.
Definition TEveLine.cxx:222
Bool_t fSmooth
Definition TEveLine.h:37
void SetLineColor(Color_t col) override
Set the line color.
Definition TEveLine.h:48
void ReduceSegmentLengths(Float_t max)
Make sure that no segment is longer than max.
Definition TEveLine.cxx:183
void SetLineStyle(Style_t lstyle) override
Set line-style of the line.
Definition TEveLine.cxx:86
Bool_t GetRnrPoints() const
Definition TEveLine.h:53
static void SetDefaultSmooth(Bool_t r)
Set default value for smooth-line drawing flag (default kFALSE).
Definition TEveLine.cxx:309
static Bool_t fgDefaultSmooth
Definition TEveLine.h:39
TEveVector GetLineStart() const
Return the first point of the line.
Definition TEveLine.cxx:239
TClass * ProjectedClass(const TEveProjection *p) const override
Virtual from TEveProjectable, returns TEvePointSetProjected class.
Definition TEveLine.cxx:291
Bool_t fRnrLine
Definition TEveLine.h:35
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
Definition TEveLine.cxx:125
~TEveLine() override
Definition TEveLine.h:44
TEveLine & operator=(const TEveLine &)
TEveLine(const TEveLine &)
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
Definition TEveLine.cxx:277
const TGPicture * GetListTreeIcon(Bool_t open=kFALSE) override
Returns list-tree icon for TEveLine.
Definition TEveLine.cxx:58
Bool_t GetRnrLine() const
Definition TEveLine.h:52
Bool_t GetSmooth() const
Definition TEveLine.h:54
void CopyVizParams(const TEveElement *el) override
Copy visualization parameters from element el.
Definition TEveLine.cxx:260
void SetMarkerColor(Color_t col) override
Set marker color. Propagate to projected lines.
Definition TEveLine.cxx:66
Bool_t fRnrPoints
Definition TEveLine.h:36
void SetSmooth(Bool_t r)
Set smooth rendering. Propagate to projected lines.
Definition TEveLine.cxx:163
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Definition TEveLine.cxx:144
static Bool_t GetDefaultSmooth()
Get default value for smooth-line drawing flag.
Definition TEveLine.cxx:300
TEveVector GetLineEnd() const
Return the last point of the line.
Definition TEveLine.cxx:250
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
Abstract base-class for non-linear projectable objects.
Abstract base class for classes that hold results of a non-linear projection transformation.
Manager class for steering of projections and managing projected objects.
Base-class for non-linear projections.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition TGPicture.h:25
Basic string class.
Definition TString.h:139