BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCantellatedCube.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/HardParticle/FormFactorCantellatedCube.h
6 //! @brief Defines class FormFactorCantellatedCube.
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_FORMFACTORCANTELLATEDCUBE_H
16 #define BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORCANTELLATEDCUBE_H
17 
19 
20 //! A cube, with truncation of all edges and corners, as in Croset (2017) Fig 7
21 //! @ingroup hardParticle
22 
24 {
25 public:
26  FormFactorCantellatedCube(const std::vector<double> P);
27  FormFactorCantellatedCube(double length, double removed_length);
28 
29  FormFactorCantellatedCube* clone() const override final
30  {
32  }
33  void accept(INodeVisitor* visitor) const override final { visitor->visit(this); }
34 
35  double getLength() const { return m_length; }
36  double getRemovedLength() const { return m_removed_length; }
37 
38 protected:
39  void onChange() override final;
40 
41 private:
43  const double& m_length;
44  const double& m_removed_length;
45 };
46 
47 #endif // BORNAGAIN_CORE_HARDPARTICLE_FORMFACTORCANTELLATEDCUBE_H
Defines class IFormFactorPolyhedron.
A cube, with truncation of all edges and corners, as in Croset (2017) Fig 7.
FormFactorCantellatedCube(const std::vector< double > P)
void onChange() override final
Action to be taken in inherited class when a parameter has changed.
void accept(INodeVisitor *visitor) const override final
Calls the INodeVisitor's visit method.
static const PolyhedralTopology topology
FormFactorCantellatedCube * clone() const override final
Returns a clone of this ISample object.
A polyhedron, for form factor computation.
Visitor interface to visit ISample objects.
Definition: INodeVisitor.h:149
For internal use in IFormFactorPolyhedron.