BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCone6.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/HardParticle/FormFactorCone6.h
6 //! @brief Defines class FormFactorCone6
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_FORMFACTORCONE6_H
16 #define BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORCONE6_H
17 
19 
20 //! A frustum (truncated pyramid) with regular hexagonal base.
21 //! @ingroup hardParticle
22 
24 public:
25  FormFactorCone6(const std::vector<double> P);
26  FormFactorCone6(double base_edge, double height, double alpha);
27 
28  FormFactorCone6* clone() const final
29  {
31  }
32  void accept(INodeVisitor* visitor) const final { visitor->visit(this); }
33 
34  double getBaseEdge() const { return m_base_edge; }
35  double getHeight() const { return m_height; }
36  double getAlpha() const { return m_alpha; }
37 
38 protected:
39  IFormFactor* sliceFormFactor(ZLimits limits, const IRotation& rot,
40  kvector_t translation) const final;
41 
42  void onChange() final;
43 
44 private:
46  const double& m_base_edge;
47  const double& m_height;
48  const double& m_alpha;
49 };
50 
51 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_FORMFACTORCONE6_H
Defines interface IFormFactorPolyhedron.
A frustum (truncated pyramid) with regular hexagonal base.
static const PolyhedralTopology topology
const double & m_base_edge
IFormFactor * sliceFormFactor(ZLimits limits, const IRotation &rot, kvector_t translation) const final
Actually slices the form factor or throws an exception.
FormFactorCone6(const std::vector< double > P)
FormFactorCone6 * clone() const final
Returns a clone of this ISampleNode object.
double getBaseEdge() const
void accept(INodeVisitor *visitor) const final
Calls the INodeVisitor's visit method.
double getAlpha() const
const double & m_alpha
void onChange() final
Action to be taken in inherited class when a parameter has changed.
double getHeight() const
const double & m_height
A polyhedron, 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
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:45