BornAgain
1.19.0
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/model/geometry/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/Utils/Assert.h
"
16
#include "
GUI/ba3d/model/geometry.h
"
17
18
namespace
RealSpace
{
19
20
Geometry::Mesh
Geometry::meshPlane
()
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 RealSpace
Assert.h
Defines the macro ASSERT.
ASSERT
#define ASSERT(condition)
Definition:
Assert.h:31
RealSpace::Geometry::makeMesh
static Mesh makeMesh(const Vertices &vs, Vertices const *ns=nullptr)
Definition:
geometry.cpp:111
RealSpace::Geometry::Mesh
QVector< Vert_Normal > Mesh
Definition:
geometry.h:66
RealSpace::Geometry::meshPlane
static Mesh meshPlane()
Definition:
plane.cpp:20
geometry.h
Defines Geometry class.
RealSpace
Definition:
def.cpp:20
RealSpace::Geometry::Vertices
Definition:
geometry.h:45
RealSpace::Geometry::Vertices::addQuad
void addQuad(const Vector3D &, const Vector3D &, const Vector3D &, const Vector3D &)
Definition:
geometry.cpp:37
GUI
ba3d
model
geometry
plane.cpp
Generated by
1.9.1