BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RippleSawtooth.cpp
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Shapes/RippleSawtooth.cpp
6 //! @brief Implements class RippleSawtooth.
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 
16 
17 RippleSawtooth::RippleSawtooth(double length, double width, double height, double asymmetry)
18 {
19  double ymax = width / 2.0 - asymmetry;
20  double ymin = -width / 2.0 - asymmetry;
21  m_vertices.resize(6);
22  m_vertices[0] = kvector_t(length / 2.0, ymax, 0.0);
23  m_vertices[1] = kvector_t(length / 2.0, ymin, 0.0);
24  m_vertices[2] = kvector_t(length / 2.0, 0.0, height);
25  m_vertices[3] = kvector_t(-length / 2.0, ymax, 0.0);
26  m_vertices[4] = kvector_t(-length / 2.0, ymin, 0.0);
27  m_vertices[5] = kvector_t(-length / 2.0, 0.0, height);
28 }
29 
Defines class RippleSawtooth.
BasicVector3D< double > kvector_t
Definition: Vectors3D.h:21
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
Definition: IShape.h:40
RippleSawtooth(double length, double width, double height, double asymmetry)