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