BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
plane.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/ba3d/mesh/plane.cpp
6 //! @brief Implements utility functions in ba3d namespace
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 "Base/Util/Assert.h"
17 
18 namespace GUI::RealSpace {
19 
21 {
22  float const D = .5f;
23 
24  Vertices vs;
25  vs.reserve(4);
26  vs.addQuad({+D, +D, 0}, {-D, +D, 0}, {-D, -D, 0}, {+D, -D, 0});
27 
28  ASSERT(4 == vs.count());
29 
30  return makeMesh(vs);
31 }
32 
33 } // namespace GUI::RealSpace
static Mesh meshPlane()
Definition: plane.cpp:20
static Mesh makeMesh(const Vertices &vs, Vertices const *ns=nullptr)
Definition: geometry.cpp:117
QVector< Vert_Normal > Mesh
Definition: geometry.h:66
Defines Geometry class.
void addQuad(const Vector3D &, const Vector3D &, const Vector3D &, const Vector3D &)
Definition: geometry.cpp:42