MURE
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Transformation Class Reference

Spatial Transformation for cell or universe. More...

#include <Transformation.hxx>

Public Member Functions

 Transformation (double x=0, double y=0, double z=0)
 
 Transformation (int Universe, double x=0, double y=0, double z=0)
 
 Transformation (const Transformation &t)
 copy constructor
 
 ~Transformation ()
 Destructor.
 
int GetNumber ()
 
vector< vector< double > > & GetRotationMatrix ()
 
vector< double > & GetTranslationVector ()
 
void FillRotationMatrix (double b1, double b2, double b3, double b4, double b5, double b6, double b7, double b8, double b9)
 
void SetTranslation (double x=0, double y=0, double z=0)
 
void SetRotation (double phi=0, double theta=0, double psi=0, string unit="deg")
 
bool IsRotationNeeded ()
 

Private Attributes

int fNumber
 The number (name) defining of the transformation.
 
vector< double > fTranslate
 The displacement vector.
 
vector< vector< double > > fRotMatrix
 The rotation matrix.
 
bool fIsRotationNeeded
 whether or not a rotation has been done (and thus should be written)
 

Detailed Description

Spatial Transformation for cell or universe.

Transformations allow users to define cells in a local coordinate and apply a translation and/or rotation. In MCNP, this is done via TR and TRCL cards ; but the possibility of MCNP for such transformation is much more complete than the one implemented here:

Author
PTO
J. Hajnrych
JW
Version
2.0

Constructor & Destructor Documentation

◆ Transformation() [1/3]

Transformation::Transformation ( double  x = 0,
double  y = 0,
double  z = 0 
)

Normal constructor.

Parameters
x: translation along x-axis
y: translation along y-axis
z: translation along z-axis

◆ Transformation() [2/3]

Transformation::Transformation ( int  Universe,
double  x = 0,
double  y = 0,
double  z = 0 
)

Normal constructor for universe transformation.

Parameters
Universe: universe number to wich the transformation is applied
x: translation along x-axis
y: translation along y-axis
z: translation along z-axis

◆ Transformation() [3/3]

Transformation::Transformation ( const Transformation t)

copy constructor

◆ ~Transformation()

Transformation::~Transformation ( )
default

Destructor.

Member Function Documentation

◆ FillRotationMatrix()

void Transformation::FillRotationMatrix ( double  b1,
double  b2,
double  b3,
double  b4,
double  b5,
double  b6,
double  b7,
double  b8,
double  b9 
)

Define the rotation matrix from the original coordinate system (x, y, z) to local coordinate system (x', y', z').

Parameters
b1: cosine of the angle between x, x'
b2: cosine of the angle between y, x'
b3: cosine of the angle between z, x'
b4: cosine of the angle between x, y'
b5: cosine of the angle between y, y'
b6: cosine of the angle between z, z'
b7: cosine of the angle between x, z'
b8: cosine of the angle between y, z'
b9: cosine of the angle between z, z'

◆ GetNumber()

int Transformation::GetNumber ( )
inline

< the number identifying the transformation

◆ GetRotationMatrix()

vector< vector< double > > & Transformation::GetRotationMatrix ( )
inline

< return the Rotation matrix

◆ GetTranslationVector()

vector< double > & Transformation::GetTranslationVector ( )
inline

< return the translation vector

◆ IsRotationNeeded()

bool Transformation::IsRotationNeeded ( )
inline

< whether or not a rotation has been done (and thus should be written)

◆ SetRotation()

void Transformation::SetRotation ( double  phi = 0,
double  theta = 0,
double  psi = 0,
string  unit = "deg" 
)

Define the rotation matrix from the original coordinate system (x, y, z) to local coordinate system (x', y', z').

Parameters
phi: rotation arround z
theta: rotation arround y
psi: rotation arround x
unit: units of angle (possible value are "deg" or "rad")

◆ SetTranslation()

void Transformation::SetTranslation ( double  x = 0,
double  y = 0,
double  z = 0 
)
inline

Define the translation.

Parameters
x: translation along x-axis
y: translation along y-axis
z: translation along z-axis

Member Data Documentation

◆ fIsRotationNeeded

bool Transformation::fIsRotationNeeded
private

whether or not a rotation has been done (and thus should be written)

◆ fNumber

int Transformation::fNumber
private

The number (name) defining of the transformation.

◆ fRotMatrix

vector< vector < double > > Transformation::fRotMatrix
private

The rotation matrix.

◆ fTranslate

vector< double > Transformation::fTranslate
private

The displacement vector.


The documentation for this class was generated from the following files:

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