Logo ROOT   6.18/05
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
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 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
63 TEveVector GetLineEnd() const;
64
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
84 public TEveProjected
85{
86private:
87 TEveLineProjected(const TEveLineProjected&); // Not implemented
88 TEveLineProjected& operator=(const TEveLineProjected&); // Not implemented
89
90protected:
91 virtual void SetDepthLocal(Float_t d);
92
93public:
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
ROOT::R::TRInterface & r
Definition: Object.C:4
#define d(i)
Definition: RSha256.hxx:102
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
short Width_t
Definition: RtypesCore.h:78
bool Bool_t
Definition: RtypesCore.h:59
short Color_t
Definition: RtypesCore.h:79
short Style_t
Definition: RtypesCore.h:76
float Float_t
Definition: RtypesCore.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:326
char name[80]
Definition: TGX11.cxx:109
Line Attributes class.
Definition: TAttLine.h:18
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:75
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:34
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
virtual void UpdateProjection()
Re-apply the projection.
Definition: TEveLine.cxx:358
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveLine.h:99
TEveLineProjected & operator=(const TEveLineProjected &)
TEveLineProjected(const TEveLineProjected &)
virtual void SetDepthLocal(Float_t d)
Set depth (z-coordinate) of the projected points.
Definition: TEveLine.cxx:344
virtual ~TEveLineProjected()
Definition: TEveLine.h:95
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Set projection manager and projection model.
Definition: TEveLine.cxx:334
TEveLineProjected()
Default constructor.
Definition: TEveLine.cxx:324
An arbitrary polyline with fixed line and marker attributes.
Definition: TEveLine.h:26
virtual void SetLineStyle(Style_t lstyle)
Set line-style of the line.
Definition: TEveLine.cxx:86
Float_t CalculateLineLength() const
Sum-up lengths of individual segments.
Definition: TEveLine.cxx:222
Bool_t fSmooth
Definition: TEveLine.h:37
virtual void SetLineWidth(Width_t lwidth)
Set line-style of the line.
Definition: TEveLine.cxx:106
void ReduceSegmentLengths(Float_t max)
Make sure that no segment is longer than max.
Definition: TEveLine.cxx:183
virtual void SetLineColor(Color_t col)
Set the line color.
Definition: TEveLine.h:48
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
virtual TClass * ProjectedClass(const TEveProjection *p) const
Virtual from TEveProjectable, returns TEvePointSetProjected class.
Definition: TEveLine.cxx:291
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns list-tree icon for TEveLine.
Definition: TEveLine.cxx:58
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 & operator=(const TEveLine &)
TEveLine(const TEveLine &)
Bool_t GetRnrLine() const
Definition: TEveLine.h:52
Bool_t GetSmooth() const
Definition: TEveLine.h:54
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveLine.cxx:260
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveLine.cxx:277
virtual ~TEveLine()
Definition: TEveLine.h:44
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
virtual void SetMarkerColor(Color_t col)
Set marker color. Propagate to projected lines.
Definition: TEveLine.cxx:66
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...
Definition: TEvePointSet.h:36
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.
Basic string class.
Definition: TString.h:131