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
15
#include "
Sample/Shapes/RippleSawtooth.h
"
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
30
RippleSawtooth::~RippleSawtooth
() =
default
;
RippleSawtooth.h
Defines class RippleSawtooth.
kvector_t
BasicVector3D< double > kvector_t
Definition:
Vectors3D.h:21
IShape::m_vertices
std::vector< kvector_t > m_vertices
List of vertices initialized during construction.
Definition:
IShape.h:40
RippleSawtooth::RippleSawtooth
RippleSawtooth(double length, double width, double height, double asymmetry)
Definition:
RippleSawtooth.cpp:17
RippleSawtooth::~RippleSawtooth
~RippleSawtooth()
anonymous_namespace{BoxCompositionBuilder.cpp}::width
const double width
Definition:
BoxCompositionBuilder.cpp:31
anonymous_namespace{BoxCompositionBuilder.cpp}::height
const double height
Definition:
BoxCompositionBuilder.cpp:32
anonymous_namespace{BoxCompositionBuilder.cpp}::length
const double length
Definition:
BoxCompositionBuilder.cpp:30
Sample
Shapes
RippleSawtooth.cpp
Generated by
1.9.1