BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorTetrahedron.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorTetrahedron.h
6 //! @brief Defines class FormFactorTetrahedron
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 #ifndef BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORTETRAHEDRON_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORTETRAHEDRON_H
17 
19 
20 //! A frustum with equilateral trigonal base.
21 //! @ingroup hardParticle
22 
24 {
25 public:
26  FormFactorTetrahedron(const std::vector<double> P);
27  FormFactorTetrahedron(double base_edge, double height, double alpha);
28 
29  FormFactorTetrahedron* clone() const override final
30  {
32  }
33  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
34 
35  double getBaseEdge() const { return m_base_edge; }
36  double getHeight() const { return m_height; }
37  double getAlpha() const { return m_alpha; }
38 
39 protected:
40  IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
41  kvector_t translation) const override final;
42 
43  void onChange() override final;
44 
45 private:
47  const double& m_base_edge;
48  const double& m_height;
49  const double& m_alpha;
50 };
51 
52 #endif // BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORTETRAHEDRON_H
Defines class IFormFactorPolyhedron.
A frustum with equilateral trigonal base.
static const PolyhedralTopology topology
IFormFactor * sliceFormFactor(ZLimits limits, const IRotation &rot, kvector_t translation) const override final
Actually slices the form factor or throws an exception.
FormFactorTetrahedron(const std::vector< double > P)
FormFactorTetrahedron * clone() const override final
Returns a clone of this ISample object.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
A polyhedron, for form factor computation.
Pure virtual base class for all form factors.
Definition: IFormFactor.h:40
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
Pure virtual interface for rotations.
Definition: Rotations.h:27
For internal use in IFormFactorPolyhedron.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition: ZLimits.h:41