BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorPrism6.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/FormFactorPrism6.h
6 //! @brief Defines class FormFactorPrism6.
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_SAMPLE_HARDPARTICLE_FORMFACTORPRISM6_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORPRISM6_H
17 
19 
20 //! A prism based on a regular hexagonal.
21 //! @ingroup hardParticle
22 
24 public:
25  FormFactorPrism6(const std::vector<double> P);
26  FormFactorPrism6(double base_edge, double height);
27 
28  FormFactorPrism6* clone() const final { return new FormFactorPrism6(m_base_edge, m_height); }
29  void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
30 
31  double getBaseEdge() const { return m_base_edge; }
32 
33 protected:
34  IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
35  kvector_t translation) const final;
36 
37  void onChange() final;
38  double height() const final { return m_height; }
39 
40 private:
41  const double& m_base_edge;
42  const double& m_height;
43 };
44 
45 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORPRISM6_H
Defines interface IFormFactorPrism.
A prism based on a regular hexagonal.
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
double height() const final
IFormFactor * sliceFormFactor(ZLimits limits, const IRotation &rot, kvector_t translation) const final
Actually slices the form factor or throws an exception.
const double & m_base_edge
FormFactorPrism6 * clone() const final
Returns a clone of this ISampleNode object.
void onChange() final
Action to be taken in inherited class when a parameter has changed.
FormFactorPrism6(const std::vector< double > P)
const double & m_height
double getBaseEdge() const
A prism with a polygonal base, for form factor computation.
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
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Definition: ZLimits.h:45