MURE
Loading...
Searching...
No Matches
Transformation.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _TRANSFORMATION_HXX_
20#define _TRANSFORMATION_HXX_
21
27#include <iostream>
28#include <sstream>
29#include <vector>
30#include <string>
31#include <cmath>
32#include <map>
33#include <fstream>
34#include <iomanip>
35
36using namespace std;
37
39
59{
60 public:
67 Transformation(double x = 0, double y = 0, double z = 0);
75 Transformation(int Universe, double x = 0, double y = 0, double z = 0);
79 {
80 return fNumber;
81 }
82
83 vector < vector < double > > &GetRotationMatrix()
84 {
85 return fRotMatrix;
86 }
87 vector < double > &GetTranslationVector()
88 {
89 return fTranslate;
90 }
91
105 void FillRotationMatrix(double b1, double b2, double b3, double b4, double b5, double b6, double b7, double b8, double b9);
113 void SetTranslation(double x = 0, double y = 0, double z = 0)
114 {
115 fTranslate[0] = x;
116 fTranslate[1] = y;
117 fTranslate[2] = z;
118 }
119
128 void SetRotation(double phi = 0, double theta = 0, double psi = 0, string unit = "deg");
130 {
131 return fIsRotationNeeded;
132 }
133
134 private:
136 vector < double > fTranslate;
137 vector < vector < double > > fRotMatrix;
139};
140
141#endif
Spatial Transformation for cell or universe.
Definition Transformation.hxx:59
vector< double > fTranslate
The displacement vector.
Definition Transformation.hxx:136
vector< double > & GetTranslationVector()
Definition Transformation.hxx:87
vector< vector< double > > fRotMatrix
The rotation matrix.
Definition Transformation.hxx:137
void SetRotation(double phi=0, double theta=0, double psi=0, string unit="deg")
Definition Transformation.cxx:107
void SetTranslation(double x=0, double y=0, double z=0)
Definition Transformation.hxx:113
int fNumber
The number (name) defining of the transformation.
Definition Transformation.hxx:135
vector< vector< double > > & GetRotationMatrix()
Definition Transformation.hxx:83
int GetNumber()
Definition Transformation.hxx:78
bool fIsRotationNeeded
whether or not a rotation has been done (and thus should be written)
Definition Transformation.hxx:138
~Transformation()
Destructor.
bool IsRotationNeeded()
Definition Transformation.hxx:129
void FillRotationMatrix(double b1, double b2, double b3, double b4, double b5, double b6, double b7, double b8, double b9)
Definition Transformation.cxx:90
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024