OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
StraightGeometry.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: StraightGeometry.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: StraightGeometry
10 // A concrete geometry representing a straight line segment which runs
11 // coaxial with the local z-axis.
12 //
13 // ------------------------------------------------------------------------
14 // Class category: BeamlineGeometry
15 // ------------------------------------------------------------------------
16 //
17 // $Date: 2000/03/27 09:32:34 $
18 // $Author: fci $
19 //
20 // ------------------------------------------------------------------------
21 
24 
25 
26 // Class StraightGeometry.
27 // ------------------------------------------------------------------------
28 
30 {}
31 
32 
34  return len;
35 }
36 
37 
39  return len;
40 }
41 
42 
44  len = l;
45 }
46 
47 
49  return len / 2.0;
50 }
51 
52 
54  return -len / 2.0;
55 }
56 
57 
58 double StraightGeometry::getExit() const {
59  return len / 2.0;
60 }
61 
62 
63 Euclid3D StraightGeometry::getTransform(double fromS, double toS) const {
64  return Euclid3D::translation(0, 0, fromS - toS);
65 }
66 
67 
69  return Euclid3D::translation(0, 0, len);
70 }
71 
72 
74  return Euclid3D::translation(0, 0, s);
75 }
76 
77 
79  return Euclid3D::translation(0, 0, -len / 2.0);
80 }
81 
82 
84  return Euclid3D::translation(0, 0, len / 2.0);
85 }
86 
87 
88 
89 
static Euclid3D translation(double x, double y, double z)
Make translation.
Definition: Euclid3D.cpp:152
Euclid3D getTransform(double fromS, double toS) const
Get transform.
double getEntrance() const
Get entrance.
virtual void setElementLength(double length)
Set design length.
virtual double getArcLength() const
Get arc length.
Displacement and rotation in space.
Definition: Euclid3D.h:68
double getExit() const
Get exit.
Euclid3D getTotalTransform() const
Get transform.
double getOrigin() const
Get origin.
virtual double getElementLength() const
Get design length.
virtual ~StraightGeometry()
Euclid3D getExitFrame() const
Get transform.
Euclid3D getEntranceFrame() const
Get transform.