#include <ShapeCreator.h>
|
| | ShapeCreator () |
| void | setProjection (int p) |
| TLine * | createLine (const TVector3 &pos, const TVector3 &dir, double length) |
| TLine * | createLine (const TVector3 &pos1, const TVector3 &pos2) |
| TLine * | createOrthogonalLine (const TVector3 &pos, const TVector3 &dir, double length) |
| TArrow * | createArrow (const TVector3 &pos, const TVector3 &dir, double length) |
| TPolyLine * | createTriangle (const TVector3 &pos, const TVector3 &dir, double length) |
| TArc * | createArc (const TVector3 &pos, double r) |
| TBox * | createBox (const TVector3 &upperleft, const TVector3 &lowerright) |
| TText * | createText (const TVector3 &pos, const char *text) |
| TEllipse * | createEllipse (const TVector3 &pos, double r1, double r2) |
Definition at line 22 of file ShapeCreator.h.
◆ ShapeCreator()
| ShapeCreator::ShapeCreator |
( |
| ) |
|
◆ applyDirectionProjectionUnit()
| void ShapeCreator::applyDirectionProjectionUnit |
( |
const TVector3 & | dir, |
|
|
double & | x1, |
|
|
double & | x2, |
|
|
const TVector3 & | pos ) |
|
private |
Definition at line 53 of file ShapeCreator.cxx.
53 {
54
55
66
67
68 const double phiFactor = 1000.;
70
71 TVector3 pos2(pos+dir);
72 x2 = (pos2.Phi() -
pos.Phi()) * phiFactor;
73
74
75
76
77
78
79
80
82
85 }
86
87 double length = sqrt(x1*x1 + x2*x2);
91 }
92
93}
◆ applyProjection()
| void ShapeCreator::applyProjection |
( |
const TVector3 & | pos, |
|
|
double & | x1, |
|
|
double & | x2 ) |
|
private |
Definition at line 25 of file ShapeCreator.cxx.
25 {
26
27
38
39
40
41 const double phiFactor = 1000.;
43 x2 =
pos.Phi() * phiFactor;
44
46
49 }
50
51}
◆ createArc()
| TArc * ShapeCreator::createArc |
( |
const TVector3 & | pos, |
|
|
double | r ) |
Definition at line 175 of file ShapeCreator.cxx.
175 {
178
179
180 return new TArc(x1,x2,
r);
181}
void applyProjection(const TVector3 &pos, double &x1, double &x2)
◆ createArrow()
| TArrow * ShapeCreator::createArrow |
( |
const TVector3 & | pos, |
|
|
const TVector3 & | dir, |
|
|
double | length ) |
Definition at line 149 of file ShapeCreator.cxx.
149 {
151 double dx1,dx2;
152
155
156
157
158 return new TArrow(x1, x2, x1+dx1*
length, x2+dx2*
length);
159}
void applyDirectionProjectionUnit(const TVector3 &dir, double &x1, double &x2, const TVector3 &pos)
◆ createBox()
| TBox * ShapeCreator::createBox |
( |
const TVector3 & | upperleft, |
|
|
const TVector3 & | lowerright ) |
Definition at line 184 of file ShapeCreator.cxx.
184 {
187
190
191
192 return new TBox(x1,x2,y1,y2);
193}
◆ createEllipse()
| TEllipse * ShapeCreator::createEllipse |
( |
const TVector3 & | pos, |
|
|
double | r1, |
|
|
double | r2 ) |
Definition at line 201 of file ShapeCreator.cxx.
201 {
204
205
206 return new TEllipse(x1, x2, r1, r2);
207}
◆ createLine() [1/2]
| TLine * ShapeCreator::createLine |
( |
const TVector3 & | pos, |
|
|
const TVector3 & | dir, |
|
|
double | length ) |
Definition at line 106 of file ShapeCreator.cxx.
106 {
108 double dx1,dx2;
109
112
113
118
119 return new TLine(xu1,xu2,xl1,xl2);
120
121}
◆ createLine() [2/2]
| TLine * ShapeCreator::createLine |
( |
const TVector3 & | pos1, |
|
|
const TVector3 & | pos2 ) |
Definition at line 123 of file ShapeCreator.cxx.
123 {
126
129
130 return new TLine(x1,y1,x2,y2);
131}
◆ createOrthogonalLine()
| TLine * ShapeCreator::createOrthogonalLine |
( |
const TVector3 & | pos, |
|
|
const TVector3 & | dir, |
|
|
double | length ) |
Definition at line 133 of file ShapeCreator.cxx.
133 {
135 double dx1,dx2;
136
139
144
145 return new TLine(xu1,xu2,xl1,xl2);
146
147}
◆ createText()
| TText * ShapeCreator::createText |
( |
const TVector3 & | pos, |
|
|
const char * | text ) |
Definition at line 195 of file ShapeCreator.cxx.
195 {
198 return new TText(x1, x2, text);
199}
◆ createTriangle()
| TPolyLine * ShapeCreator::createTriangle |
( |
const TVector3 & | pos, |
|
|
const TVector3 & | dir, |
|
|
double | length ) |
Definition at line 161 of file ShapeCreator.cxx.
161 {
163 double dx1,dx2;
164
169
170
171 return new TPolyLine(3,
x,
y);
172}
◆ setProjection()
| void ShapeCreator::setProjection |
( |
int | p | ) |
|
Definition at line 95 of file ShapeCreator.cxx.
95 {
96
97 if(p != 0 && p != 1 && p != 2 && p != 3 && p != 4)
98 std::cout << "ERROR Wrong projection " << std::endl;
100
101
102}
◆ m_projection
| int ShapeCreator::m_projection |
|
private |
The documentation for this class was generated from the following files: