BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorDecoratorRotation.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Scattering/FormFactorDecoratorRotation.h
6 //! @brief Defines class FormFactorDecoratorRotation.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_SCATTERING_FORMFACTORDECORATORROTATION_H
21 #define BORNAGAIN_SAMPLE_SCATTERING_FORMFACTORDECORATORROTATION_H
22 
25 
26 class IRotation;
27 
28 //! Equips a form factor with a rotation.
29 //! @ingroup formfactors_internal
30 
32 public:
33  //! Constructor, setting form factor and rotation.
34  FormFactorDecoratorRotation(const IFormFactor& ff, const IRotation& rotation);
35 
36  FormFactorDecoratorRotation* clone() const final;
37 
38  void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
39 
40  double bottomZ(const IRotation& rotation) const final;
41 
42  double topZ(const IRotation& rotation) const final;
43 
44  complex_t evaluate(const WavevectorInfo& wavevectors) const final;
45 #ifndef SWIG
46  Eigen::Matrix2cd evaluatePol(const WavevectorInfo& wavevectors) const final;
47 #endif
48 
49 private:
51  //! Private constructor for cloning.
52  FormFactorDecoratorRotation(const IFormFactor& ff, const Transform3D& transform);
53 };
54 
55 #endif // BORNAGAIN_SAMPLE_SCATTERING_FORMFACTORDECORATORROTATION_H
56 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines and implements interface class IFormFactorDecorator.
Declares class Transform3D.
Equips a form factor with a rotation.
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
complex_t evaluate(const WavevectorInfo &wavevectors) const final
Returns scattering amplitude for complex wavevectors ki, kf.
double topZ(const IRotation &rotation) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
FormFactorDecoratorRotation(const IFormFactor &ff, const IRotation &rotation)
Constructor, setting form factor and rotation.
FormFactorDecoratorRotation * clone() const final
Returns a clone of this ISampleNode object.
Eigen::Matrix2cd evaluatePol(const WavevectorInfo &wavevectors) const final
Returns scattering amplitude for matrix interactions.
double bottomZ(const IRotation &rotation) const final
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Encapsulates another formfactor and adds extra functionality (a scalar factor, a position-dependent p...
Abstract base class for all form factors.
Definition: IFormFactor.h:36
Visitor interface to visit ISampleNode objects.
Definition: INodeVisitor.h:146
Abstract base class for rotations.
Definition: Rotations.h:28
Vector transformations in three dimensions.
Definition: Transform3D.h:26
Holds all wavevector information relevant for calculating form factors.