* add the portability.h file, manage with bouml Geometry
[hkl.git] / include / hkl / geometry_twoC.h
blob345bfdfe538cfcc363650af44cf3527539854a78
1 #ifndef _GEOMETRY_TWOC_H_
2 #define _GEOMETRY_TWOC_H_
4 #include "geometry.h"
6 using namespace std;
8 namespace hkl
10 namespace geometry
13 // forward declaration
14 namespace eulerian4C
16 class Vertical;
17 class Horizontal;
19 namespace kappa4C
21 class Vertical;
22 class Horizontal;
24 class Kappa6C;
25 class Eulerian6C;
26 // end forward declaration
28 namespace twoC
31 /**
32 * \brief A Geometry for the Vertical eulerian 4 circle soleil generic diffractometer.
34 class Vertical : public Geometry
36 public:
38 Vertical(void); //!< Default constructor.
40 Vertical(Vertical const & geometry); //!< Copy Constructor.
42 /**
43 * @brief Constructor
45 * @param omega The value of the "omega" Axe.
46 * @param two_theta The value of the "2theta" Axe.
48 Vertical(double const & omega, double const & two_theta);
50 virtual ~Vertical(void); //!< Default destructor.
52 /*!
53 * \brief Assignation of the Geometry.
54 * \param geometry The Geometry to assign.
56 Vertical & operator=(Vertical const & geometry);
58 /**
59 * @brief Get the omega axe.
60 * @return A pointer on the omega axe.
62 Axe * & omega(void)
64 return _omega;
67 /**
68 * @brief Get the tth axe.
69 * @return A pointer on the tth axe.
71 Axe * & tth(void)
73 return _tth;
76 /**
77 * @brief Get the omega axe.
78 * @return A pointer on the omega axe.
80 Axe * const & omega(void) const
82 return _omega;
85 /**
86 * @brief Get the tth axe.
87 * @return A pointer on the tth axe.
89 Axe * const & tth(void) const
91 return _tth;
94 /**
95 * @brief Set the angles of the eulerian4CD::Vertical geometry.
97 * @param omega The value of the "omega" Axe.
98 * @param two_theta The value of the "2theta" Axe.
100 void setAngles(double const & omega, double const & two_theta);
103 * @brief Set a TwoC::Vertical Geometry from an other Geometry.
104 * @param geometry The Geometry.
105 * @param strict if stric geometry are equivalent, if not update only the necessary axes.
106 * @throw HKLException depending of the true type of the geometry.
108 * The stric parameter is use to specifi witch axxes must be update from the geometry
109 * and if exception must be throw depending of the value of the axes.
110 * stric = true
111 * eulerian4C::Vertical(omega = 30, chi = 10, phi = 15, two_theta = 60) -> throw an exception because chi <> phi <> 0
112 * but if stric = false no exception is throw.
114 void setFromGeometry(geometry::eulerian4C::Vertical const & geometry, bool const & strict) throw (HKLException);
117 * @brief Set a TwoC::Vertical Geometry from an other Geometry.
118 * @param geometry The Geometry.
119 * @param strict if stric geometry are equivalent, if not update only the necessary axes.
120 * @throw HKLException depending of the true type of the geometry.
122 * The stric parameter is use to specifi witch axxes must be update from the geometry
123 * and if exception must be throw depending of the value of the axes.
124 * stric = true
125 * eulerian4C::Vertical(omega = 30, chi = 10, phi = 15, two_theta = 60) -> throw an exception because chi <> phi <> 0
126 * but if stric = false no exception is throw.
128 void setFromGeometry(geometry::kappa4C::Vertical const & geometry, bool const & strict) throw (HKLException);
131 * @brief Set a TwoC::Vertical Geometry from an other Geometry.
132 * @param geometry The Geometry.
133 * @param strict if stric geometry are equivalent, if not update only the necessary axes.
134 * @throw HKLException depending of the true type of the geometry.
136 * The stric parameter is use to specifi witch axxes must be update from the geometry
137 * and if exception must be throw depending of the value of the axes.
138 * stric = true
139 * eulerian4C::Vertical(omega = 30, chi = 10, phi = 15, two_theta = 60) -> throw an exception because chi <> phi <> 0
140 * but if stric = false no exception is throw.
142 void setFromGeometry(geometry::Eulerian6C const & geometry, bool const & strict) throw (HKLException);
145 * @brief Set a TwoC::Vertical Geometry from an other Geometry.
146 * @param geometry The Geometry.
147 * @param strict if stric geometry are equivalent, if not update only the necessary axes.
148 * @throw HKLException depending of the true type of the geometry.
150 * The stric parameter is use to specifi witch axxes must be update from the geometry
151 * and if exception must be throw depending of the value of the axes.
152 * stric = true
153 * eulerian4C::Vertical(omega = 30, chi = 10, phi = 15, two_theta = 60) -> throw an exception because chi <> phi <> 0
154 * but if stric = false no exception is throw.
156 void setFromGeometry(geometry::Kappa6C const & geometry, bool const & strict) throw (HKLException);
158 public:
159 Axe * _omega; //!< The omega Axe.
160 Axe * _tth; //!< The tth Axe.
163 } // namespace eulerian4C
164 } // namespace geometry
165 } // namespace hkl
167 #endif // _GEOMETRY_TWOC_H_