Logo ROOT  
Reference Guide
TEveStraightLineSet.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_TEveStraightLineSet
13 #define ROOT_TEveStraightLineSet
14 
15 #include "TEveUtil.h"
16 
17 #include "TNamed.h"
18 #include "TQObject.h"
19 #include "TAtt3D.h"
20 #include "TAttMarker.h"
21 #include "TAttLine.h"
22 #include "TAttBBox.h"
23 
24 #include "TEveElement.h"
25 #include "TEveProjectionBases.h"
26 #include "TEveChunkManager.h"
27 #include "TEveTrans.h"
28 
29 class TRandom;
30 
32  public TEveProjectable,
33  public TNamed,
34  public TQObject,
35  public TAtt3D,
36  public TAttLine,
37  public TAttMarker,
38  public TAttBBox
39 {
40 private:
41  TEveStraightLineSet(const TEveStraightLineSet&); // Not implemented
42  TEveStraightLineSet& operator=(const TEveStraightLineSet&); // Not implemented
43 
44 public:
45  struct Line_t
46  {
51 
53  Float_t x2, Float_t y2, Float_t z2) : fId(-1), fRef()
54  {
55  fV1[0] = x1, fV1[1] = y1, fV1[2] = z1;
56  fV2[0] = x2, fV2[1] = y2, fV2[2] = z2;
57  }
58  };
59 
60  struct Marker_t
61  {
62  Float_t fV[3];
65 
66  Marker_t(Float_t x, Float_t y, Float_t z, Int_t line_id) : fLineId(line_id), fRef()
67  {
68  fV[0] = x, fV[1] = y, fV[2] = z;
69  }
70  };
71 
72 protected:
75 
76  Bool_t fOwnLinesIds; // Flag specifying if id-objects are owned by the line-set
77  Bool_t fOwnMarkersIds; // Flag specifying if id-objects are owned by the line-set
78 
81 
83 
85 
86 public:
87  TEveStraightLineSet(const char* n="StraightLineSet", const char* t="");
88  virtual ~TEveStraightLineSet() {}
89 
90  virtual void SetLineColor(Color_t col) { SetMainColor(col); }
91 
92  Line_t* AddLine(Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2);
93  Line_t* AddLine(const TEveVector& p1, const TEveVector& p2);
94  Marker_t* AddMarker(Float_t x, Float_t y, Float_t z, Int_t line_id=-1);
95  Marker_t* AddMarker(const TEveVector& p, Int_t line_id=-1);
96  Marker_t* AddMarker(Int_t line_id, Float_t pos);
97 
98  void SetLine(int idx, Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2);
99  void SetLine(int idx, const TEveVector& p1, const TEveVector& p2);
100 
103 
104  virtual Bool_t GetRnrMarkers() { return fRnrMarkers; }
105  virtual Bool_t GetRnrLines() { return fRnrLines; }
106  virtual Bool_t GetDepthTest() { return fDepthTest; }
107 
108  virtual void SetRnrMarkers(Bool_t x) { fRnrMarkers = x; }
109  virtual void SetRnrLines(Bool_t x) { fRnrLines = x; }
110  virtual void SetDepthTest(Bool_t x) { fDepthTest = x; }
111 
112  virtual void CopyVizParams(const TEveElement* el);
113  virtual void WriteVizParams(std::ostream& out, const TString& var);
114 
115  virtual TClass* ProjectedClass(const TEveProjection* p) const;
116 
117  virtual void ComputeBBox();
118  virtual void Paint(Option_t* option="");
119 
120  ClassDef(TEveStraightLineSet, 0); // Set of straight lines with optional markers along the lines.
121 };
122 
123 
124 /******************************************************************************/
125 
127  public TEveProjected
128 {
129 private:
132 
133 protected:
134  virtual void SetDepthLocal(Float_t d);
135 
136 public:
139 
141  virtual void UpdateProjection();
142  virtual TEveElement* GetProjectedAsElement() { return this; }
143 
144  ClassDef(TEveStraightLineSetProjected, 0); // Projected copy of a TEveStraightLineSet.
145 };
146 
147 #endif
TEveStraightLineSet::ProjectedClass
virtual TClass * ProjectedClass(const TEveProjection *p) const
Return class of projected object.
Definition: TEveStraightLineSet.cxx:161
n
const Int_t n
Definition: legend1.C:16
TEveElement
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:36
TEveStraightLineSet::Marker_t::Marker_t
Marker_t(Float_t x, Float_t y, Float_t z, Int_t line_id)
Definition: TEveStraightLineSet.h:66
TEveStraightLineSet::Line_t::fV1
Float_t fV1[3]
Definition: TEveStraightLineSet.h:48
TEveStraightLineSet::CopyVizParams
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveStraightLineSet.cxx:127
Option_t
const char Option_t
Definition: RtypesCore.h:66
TEveStraightLineSet::GetMarkerPlex
TEveChunkManager & GetMarkerPlex()
Definition: TEveStraightLineSet.h:102
TEveProjection
Base-class for non-linear projections.
Definition: TEveProjections.h:27
TEveStraightLineSetProjected::operator=
TEveStraightLineSetProjected & operator=(const TEveStraightLineSetProjected &)
TEveStraightLineSet::GetDepthTest
virtual Bool_t GetDepthTest()
Definition: TEveStraightLineSet.h:106
TNamed.h
TEveStraightLineSet::Marker_t::fV
Float_t fV[3]
Definition: TEveStraightLineSet.h:62
TAttMarker.h
Float_t
float Float_t
Definition: RtypesCore.h:57
TEveStraightLineSetProjected
Projected replica of a TEveStraightLineSet.
Definition: TEveStraightLineSet.h:128
Int_t
int Int_t
Definition: RtypesCore.h:45
x
Double_t x[n]
Definition: legend1.C:17
TEveElement.h
TEveStraightLineSet::SetLine
void SetLine(int idx, Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2)
Set line vertices with given index.
Definition: TEveStraightLineSet.cxx:73
TEveStraightLineSet
Set of straight lines with optional markers along the lines.
Definition: TEveStraightLineSet.h:39
TString
Basic string class.
Definition: TString.h:136
TAtt3D
Use this attribute class when an object should have 3D capabilities.
Definition: TAtt3D.h:19
TEveStraightLineSet::fOwnMarkersIds
Bool_t fOwnMarkersIds
Definition: TEveStraightLineSet.h:77
Color_t
short Color_t
Definition: RtypesCore.h:83
TEveProjectionBases.h
TEveStraightLineSet::GetLinePlex
TEveChunkManager & GetLinePlex()
Definition: TEveStraightLineSet.h:101
TEveStraightLineSet::fDepthTest
Bool_t fDepthTest
Definition: TEveStraightLineSet.h:82
TEveStraightLineSet::operator=
TEveStraightLineSet & operator=(const TEveStraightLineSet &)
bool
TEveStraightLineSetProjected::SetProjection
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Set projection manager and model object.
Definition: TEveStraightLineSet.cxx:218
TEveStraightLineSet::fRnrMarkers
Bool_t fRnrMarkers
Definition: TEveStraightLineSet.h:79
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TAttBBox
Helper for management of bounding-box information.
Definition: TAttBBox.h:18
TEveStraightLineSet::fMarkerPlex
TEveChunkManager fMarkerPlex
Definition: TEveStraightLineSet.h:74
Marker_t
short Marker_t
Definition: RtypesCore.h:81
TAttLine.h
TEveChunkManager.h
TEveUtil.h
TEveStraightLineSetProjected::GetProjectedAsElement
virtual TEveElement * GetProjectedAsElement()
Returns this projected dynamic-casted to TEveElement.
Definition: TEveStraightLineSet.h:142
TQObject.h
TEveProjectable
Abstract base-class for non-linear projectable objects.
Definition: TEveProjectionBases.h:35
TQObject
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition: TQObject.h:48
TEveStraightLineSet::GetRnrMarkers
virtual Bool_t GetRnrMarkers()
Definition: TEveStraightLineSet.h:104
TEveStraightLineSetProjected::UpdateProjection
virtual void UpdateProjection()
Callback that actually performs the projection.
Definition: TEveStraightLineSet.cxx:253
TEveStraightLineSet::fLinePlex
TEveChunkManager fLinePlex
Definition: TEveStraightLineSet.h:73
TRandom
This is the base class for the ROOT Random number generators.
Definition: TRandom.h:27
TEveStraightLineSet::Line_t
Definition: TEveStraightLineSet.h:46
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
TEveStraightLineSet::GetRnrLines
virtual Bool_t GetRnrLines()
Definition: TEveStraightLineSet.h:105
TAtt3D.h
TEveProjectionManager
Manager class for steering of projections and managing projected objects.
Definition: TEveProjectionManager.h:22
TEveStraightLineSet::TEveStraightLineSet
TEveStraightLineSet(const TEveStraightLineSet &)
TAttBBox.h
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TAttMarker
Marker Attributes class.
Definition: TAttMarker.h:19
TEveStraightLineSet::Marker_t::fRef
TRef fRef
Definition: TEveStraightLineSet.h:64
TEveVectorT< Float_t >
y
Double_t y[n]
Definition: legend1.C:17
TEveStraightLineSet::fRnrLines
Bool_t fRnrLines
Definition: TEveStraightLineSet.h:80
TEveStraightLineSet::WriteVizParams
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
Definition: TEveStraightLineSet.cxx:145
TEveTrans.h
TEveStraightLineSet::~TEveStraightLineSet
virtual ~TEveStraightLineSet()
Definition: TEveStraightLineSet.h:88
TEveStraightLineSet::Line_t::Line_t
Line_t(Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2)
Definition: TEveStraightLineSet.h:52
TEveStraightLineSetProjected::TEveStraightLineSetProjected
TEveStraightLineSetProjected(const TEveStraightLineSetProjected &)
TEveStraightLineSet::AddLine
Line_t * AddLine(Float_t x1, Float_t y1, Float_t z1, Float_t x2, Float_t y2, Float_t z2)
Add a line.
Definition: TEveStraightLineSet.cxx:52
TEveStraightLineSet::Line_t::fId
Int_t fId
Definition: TEveStraightLineSet.h:47
TEveStraightLineSet::ComputeBBox
virtual void ComputeBBox()
Compute bounding-box.
Definition: TEveStraightLineSet.cxx:170
TEveStraightLineSet::SetDepthTest
virtual void SetDepthTest(Bool_t x)
Definition: TEveStraightLineSet.h:110
TEveStraightLineSet::Paint
virtual void Paint(Option_t *option="")
Paint the line-set.
Definition: TEveStraightLineSet.cxx:195
TEveStraightLineSet::fOwnLinesIds
Bool_t fOwnLinesIds
Definition: TEveStraightLineSet.h:76
TEveChunkManager
Vector-like container with chunked memory allocation.
Definition: TEveChunkManager.h:27
TEveStraightLineSetProjected::SetDepthLocal
virtual void SetDepthLocal(Float_t d)
Set depth (z-coordinate) of the projected points.
Definition: TEveStraightLineSet.cxx:229
TEveStraightLineSetProjected::~TEveStraightLineSetProjected
virtual ~TEveStraightLineSetProjected()
Definition: TEveStraightLineSet.h:138
TEveProjected
Abstract base class for classes that hold results of a non-linear projection transformation.
Definition: TEveProjectionBases.h:84
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TEveStraightLineSet::Line_t::fV2
Float_t fV2[3]
Definition: TEveStraightLineSet.h:49
TEveElement::SetMainColor
virtual void SetMainColor(Color_t color)
Set main color of the element.
Definition: TEveElement.cxx:1158
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TEveStraightLineSet::Line_t::fRef
TRef fRef
Definition: TEveStraightLineSet.h:50
TEveStraightLineSetProjected::TEveStraightLineSetProjected
TEveStraightLineSetProjected()
Constructor.
Definition: TEveStraightLineSet.cxx:210
TEveStraightLineSet::Marker_t
Definition: TEveStraightLineSet.h:61
d
#define d(i)
Definition: RSha256.hxx:102
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TRef
Persistent Reference link to a TObject A TRef is a lightweight object pointing to any TObject.
Definition: TRef.h:32
TEveStraightLineSet::Marker_t::fLineId
Int_t fLineId
Definition: TEveStraightLineSet.h:63
make_cnn_model.model
model
Definition: make_cnn_model.py:6
TEveStraightLineSet::SetLineColor
virtual void SetLineColor(Color_t col)
Set the line color.
Definition: TEveStraightLineSet.h:90
TEveStraightLineSet::SetRnrLines
virtual void SetRnrLines(Bool_t x)
Definition: TEveStraightLineSet.h:109
TEveStraightLineSet::AddMarker
Marker_t * AddMarker(Float_t x, Float_t y, Float_t z, Int_t line_id=-1)
Add a marker with given position.
Definition: TEveStraightLineSet.cxx:96
TEveStraightLineSet::fLastLine
Line_t * fLastLine
Definition: TEveStraightLineSet.h:84
TEveStraightLineSet::SetRnrMarkers
virtual void SetRnrMarkers(Bool_t x)
Definition: TEveStraightLineSet.h:108
int