ROOT  6.06/09
Reference Guide
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 
24 class TEveLine : public TEvePointSet,
25  public TAttLine
26 {
27  friend class TEveLineEditor;
28  friend class TEveLineGL;
29 
30 private:
31  TEveLine(const TEveLine&); // Not implemented
32  TEveLine& operator=(const TEveLine&); // Not implemented
33 
34 protected:
38 
40 
41 public:
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  virtual ~TEveLine() {}
45 
46  virtual void SetMarkerColor(Color_t col);
47 
48  virtual void SetLineColor(Color_t col) { SetMainColor(col); }
49  virtual void SetLineStyle(Style_t lstyle);
50  virtual void SetLineWidth(Width_t lwidth);
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 
62  TEveVector GetLineStart() const;
63  TEveVector GetLineEnd() const;
64 
65  virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
66 
67  virtual void CopyVizParams(const TEveElement* el);
68  virtual void WriteVizParams(std::ostream& out, const TString& var);
69 
70  virtual TClass* ProjectedClass(const TEveProjection* p) const;
71 
72  static Bool_t GetDefaultSmooth();
73  static void SetDefaultSmooth(Bool_t r);
74 
75  ClassDef(TEveLine, 0); // An arbitrary polyline with fixed line and marker attributes.
76 };
77 
78 
79 //------------------------------------------------------------------------------
80 // TEveLineProjected
81 //------------------------------------------------------------------------------
82 
83 class TEveLineProjected : public TEveLine,
84  public TEveProjected
85 {
86 private:
87  TEveLineProjected(const TEveLineProjected&); // Not implemented
88  TEveLineProjected& operator=(const TEveLineProjected&); // Not implemented
89 
90 protected:
91  virtual void SetDepthLocal(Float_t d);
92 
93 public:
95  virtual ~TEveLineProjected() {}
96 
97  virtual void SetProjection(TEveProjectionManager* mng, TEveProjectable* model);
98  virtual void UpdateProjection();
99  virtual TEveElement* GetProjectedAsElement() { return this; }
100 
101  ClassDef(TEveLineProjected, 0); // Projected replica of a TEveLine.
102 };
103 
104 #endif
static Bool_t GetDefaultSmooth()
Get default value for smooth-line drawing flag.
Definition: TEveLine.cxx:300
Abstract base class for classes that hold results of a non-linear projection transformation.
TEveLine & operator=(const TEveLine &)
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
void SetRnrPoints(Bool_t r)
Set rendering of points. Propagate to projected lines.
Definition: TEveLine.cxx:144
Bool_t GetSmooth() const
Definition: TEveLine.h:54
An arbitrary polyline with fixed line and marker attributes.
Definition: TEveLine.h:24
Editor for TEveLine class.
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveLine.cxx:260
Bool_t GetRnrPoints() const
Definition: TEveLine.h:53
Basic string class.
Definition: TString.h:137
virtual void SetDepthLocal(Float_t d)
Set depth (z-coordinate) of the projected points.
Definition: TEveLine.cxx:344
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
Bool_t GetRnrLine() const
Definition: TEveLine.h:52
virtual void SetLineStyle(Style_t lstyle)
Set line-style of the line.
Definition: TEveLine.cxx:86
virtual ~TEveLine()
Definition: TEveLine.h:44
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveLine.h:99
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveLine.cxx:277
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEvePointSetProjected class.
Definition: TEveLine.cxx:291
TEveVector GetLineEnd() const
Return the last point of the line.
Definition: TEveLine.cxx:250
Base-class for non-linear projections.
Bool_t fSmooth
Definition: TEveLine.h:37
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Set projection manager and projection model.
Definition: TEveLine.cxx:334
Manager class for steering of projections and managing projected objects.
char * out
Definition: TBase64.cxx:29
short Color_t
Definition: RtypesCore.h:79
GL-renderer for TEveLine class.
Definition: TEveLineGL.h:23
Projected copy of a TEveLine.
Definition: TEveLine.h:83
Abstract base-class for non-linear projectable objects.
TEveLine(const TEveLine &)
virtual void SetLineColor(Color_t col)
Definition: TEveLine.h:48
ROOT::R::TRInterface & r
Definition: Object.C:4
Bool_t fRnrLine
Definition: TEveLine.h:35
virtual void SetLineWidth(Width_t lwidth)
Set line-style of the line.
Definition: TEveLine.cxx:106
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns list-tree icon for TEveLine.
Definition: TEveLine.cxx:58
ClassDef(TEveLine, 0)
Bool_t fRnrPoints
Definition: TEveLine.h:36
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
Definition: TEvePointSet.h:31
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:81
void ReduceSegmentLengths(Float_t max)
Make sure that no segment is longer than max.
Definition: TEveLine.cxx:183
virtual void SetMainColor(Color_t color)
Set main color of the element.
virtual void SetMarkerColor(Color_t col)
Set marker color. Propagate to projected lines.
Definition: TEveLine.cxx:66
short Width_t
Definition: RtypesCore.h:78
void SetRnrLine(Bool_t r)
Set rendering of line. Propagate to projected lines.
Definition: TEveLine.cxx:125
ClassDef(TEveLineProjected, 0)
virtual ~TEveLineProjected()
Definition: TEveLine.h:95
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Definition: vector.h:440
#define name(a, b)
Definition: linkTestLib0.cpp:5
TEveLineProjected()
Default constructor.
Definition: TEveLine.cxx:324
static void SetDefaultSmooth(Bool_t r)
Set default value for smooth-line drawing flag (default kFALSE).
Definition: TEveLine.cxx:309
TEveVector GetLineStart() const
Return the first point of the line.
Definition: TEveLine.cxx:239
Float_t CalculateLineLength() const
Sum-up lengths of individual segments.
Definition: TEveLine.cxx:222
TEveLineProjected & operator=(const TEveLineProjected &)
static Bool_t fgDefaultSmooth
Definition: TEveLine.h:39
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
void SetSmooth(Bool_t r)
Set smooth rendering. Propagate to projected lines.
Definition: TEveLine.cxx:163
virtual void UpdateProjection()
Re-apply the projection.
Definition: TEveLine.cxx:358
Line Attributes class.
Definition: TAttLine.h:32