GGEMS  1.1
GPU GEant4-based Monte Carlo Simulations
GGEMSGeometryTransformation.hh
Go to the documentation of this file.
1 #ifndef GUARD_GGEMS_MATHS_GGEMSGEOMETRYTRANSFORMATION_HH
2 #define GUARD_GGEMS_MATHS_GGEMSGEOMETRYTRANSFORMATION_HH
3 
4 // ************************************************************************
5 // * This file is part of GGEMS. *
6 // * *
7 // * GGEMS is free software: you can redistribute it and/or modify *
8 // * it under the terms of the GNU General Public License as published by *
9 // * the Free Software Foundation, either version 3 of the License, or *
10 // * (at your option) any later version. *
11 // * *
12 // * GGEMS is distributed in the hope that it will be useful, *
13 // * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 // * GNU General Public License for more details. *
16 // * *
17 // * You should have received a copy of the GNU General Public License *
18 // * along with GGEMS. If not, see <https://www.gnu.org/licenses/>. *
19 // * *
20 // ************************************************************************
21 
36 
41 class GGEMS_EXPORT GGEMSGeometryTransformation
42 {
43  public:
48 
53 
59  GGEMSGeometryTransformation(GGEMSGeometryTransformation const& transform_calculator) = delete;
60 
66  GGEMSGeometryTransformation& operator=(GGEMSGeometryTransformation const& geometry_transformation) = delete;
67 
73  GGEMSGeometryTransformation(GGEMSGeometryTransformation const&& geometry_transformation) = delete;
74 
80  GGEMSGeometryTransformation& operator=(GGEMSGeometryTransformation const&& geometry_transformation) = delete;
81 
89  void SetTranslation(GGfloat const& tx, GGfloat const& ty, GGfloat const& tz);
90 
96  void SetTranslation(GGfloat3 const& txyz);
97 
103  inline GGfloat44 GetMatrixTranslation(void) const {return matrix_translation_;};
104 
112  void SetRotation(GGfloat const& rx, GGfloat const& ry, GGfloat const& rz);
113 
119  void SetRotation(GGfloat3 const& rxyz);
120 
126  inline GGfloat44 GetMatrixRotation(void) const {return matrix_rotation_;};
127 
133  void SetAxisTransformation(GGfloat33 const& axis);
134 
142  void SetAxisTransformation(GGfloat3 const& m0, GGfloat3 const& m1, GGfloat3 const& m2);
143 
149  inline GGfloat44 GetMatrixOrthographicProjection(void) const {return matrix_orthographic_projection_;};
150 
156  inline GGfloat3 GetPosition(void) const {return position_;}
157 
163  inline GGfloat3 GetRotation(void) const {return rotation_;}
164 
170  inline GGfloat33 GetLocalAxis(void) const {return local_axis_;}
171 
178  inline cl::Buffer* GetTransformationMatrix(GGsize const& index) const {return matrix_transformation_[index];}
179 
180  private:
187  cl::Buffer** matrix_transformation_;
189 };
190 
191 #endif // End of GUARD_GGEMS_MATHS_TRANSFORMATION_MATRIX_HH
GGEMSGeometryTransformation::GetLocalAxis
GGfloat33 GetLocalAxis(void) const
return the local axis matrix
Definition: GGEMSGeometryTransformation.hh:170
GGEMSGeometryTransformation
This class handles everything about geometry transformation.
Definition: GGEMSGeometryTransformation.hh:42
GGEMSGeometryTransformation::GetRotation
GGfloat3 GetRotation(void) const
Return the current rotation.
Definition: GGEMSGeometryTransformation.hh:163
GGEMSGeometryTransformation::rotation_
GGfloat3 rotation_
Definition: GGEMSGeometryTransformation.hh:182
GGEMSMatrixTypes.hh
Class managing the matrix types.
GGEMSGeometryTransformation::matrix_rotation_
GGfloat44 matrix_rotation_
Definition: GGEMSGeometryTransformation.hh:185
GGEMSGeometryTransformation::matrix_transformation_
cl::Buffer ** matrix_transformation_
Definition: GGEMSGeometryTransformation.hh:187
GGEMSGeometryTransformation::position_
GGfloat3 position_
Definition: GGEMSGeometryTransformation.hh:181
GGEMSGeometryTransformation::number_activated_devices_
GGsize number_activated_devices_
Definition: GGEMSGeometryTransformation.hh:188
GGEMSGeometryTransformation::operator=
GGEMSGeometryTransformation & operator=(GGEMSGeometryTransformation const &geometry_transformation)=delete
Avoid assignement of the class by reference.
GGsize
#define GGsize
Definition: GGEMSTypes.hh:252
GGEMSGeometryTransformation::local_axis_
GGfloat33 local_axis_
Definition: GGEMSGeometryTransformation.hh:183
GGfloat3
#define GGfloat3
Definition: GGEMSTypes.hh:275
GGEMSGeometryTransformation::operator=
GGEMSGeometryTransformation & operator=(GGEMSGeometryTransformation const &&geometry_transformation)=delete
Avoid copy of the class by rvalue reference.
GGfloat33_t
Structure storing float 3 x 3 matrix.
Definition: GGEMSMatrixTypes.hh:42
m2
__constant GGfloat m2
Definition: GGEMSSystemOfUnits.hh:61
GGEMSGeometryTransformation::GetTransformationMatrix
cl::Buffer * GetTransformationMatrix(GGsize const &index) const
return the transformation matrix
Definition: GGEMSGeometryTransformation.hh:178
GGEMSGeometryTransformation::GGEMSGeometryTransformation
GGEMSGeometryTransformation(GGEMSGeometryTransformation const &&geometry_transformation)=delete
Avoid copy of the class by rvalue reference.
GGEMSOpenCLManager.hh
Singleton class storing all informations about OpenCL and managing GPU/CPU devices,...
GGEMSGeometryTransformation::GetPosition
GGfloat3 GetPosition(void) const
Return the current position.
Definition: GGEMSGeometryTransformation.hh:156
GGEMSGeometryTransformation::matrix_orthographic_projection_
GGfloat44 matrix_orthographic_projection_
Definition: GGEMSGeometryTransformation.hh:186
GGEMSGeometryTransformation::GetMatrixRotation
GGfloat44 GetMatrixRotation(void) const
Return the translation matrix.
Definition: GGEMSGeometryTransformation.hh:126
GGEMSGeometryTransformation::GetMatrixOrthographicProjection
GGfloat44 GetMatrixOrthographicProjection(void) const
return the matrix of orthographic projection
Definition: GGEMSGeometryTransformation.hh:149
GGEMSGeometryTransformation::GGEMSGeometryTransformation
GGEMSGeometryTransformation(GGEMSGeometryTransformation const &transform_calculator)=delete
Avoid copy of the class by reference.
GGEMSGeometryTransformation::GetMatrixTranslation
GGfloat44 GetMatrixTranslation(void) const
Return the translation matrix.
Definition: GGEMSGeometryTransformation.hh:103
GGfloat44_t
Structure storing float 4 x 4 matrix.
Definition: GGEMSMatrixTypes.hh:53
GGEMSGeometryTransformation::matrix_translation_
GGfloat44 matrix_translation_
Definition: GGEMSGeometryTransformation.hh:184
GGfloat
#define GGfloat
Definition: GGEMSTypes.hh:273