BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
RealSpaceBuilderUtils.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
6 //! @brief Defines RealSpaceBuilderUtils 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 #ifndef BORNAGAIN_GUI_COREGUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDERUTILS_H
16 #define BORNAGAIN_GUI_COREGUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDERUTILS_H
17 
19 #include <QVector3D>
20 #include <memory>
21 #include <utility>
22 
23 class RealSpaceModel;
24 class SessionItem;
25 class SceneGeometry;
26 class RealSpaceBuilder;
27 class IRotation;
28 class MesoCrystalItem;
29 class Particle;
31 class ParticleCoreShell;
36 namespace RealSpace {
37 struct Vector3D;
38 namespace Particles {
39 class Particle;
40 }
41 } // namespace RealSpace
42 
44 // compute cumulative abundances of particles
45 QVector<double> computeCumulativeAbundances(const SessionItem& layoutItem);
46 
48  const std::vector<std::vector<double>>& lattice_positions,
49  const std::vector<Particle3DContainer>& particle3DContainer_vector, RealSpaceModel* model,
50  const SceneGeometry& sceneGeometry, const RealSpaceBuilder* builder3D);
51 
52 // Implement Rotation of a 3D particle using parameters from IRotation Object
54 
55 //! Apply transformations (translation, rotation) to a 3D Particle
56 //! or to a particle belonging to a ParticleComposition
57 void applyParticleTransformations(const Particle& particle,
59  const kvector_t& origin = kvector_t(0, 0, 0));
60 
61 //! Apply transformations (translation, rotation) to a particle (core/shell) in a ParticleCoreShell
64  const ParticleCoreShell& particleCoreShell,
65  const kvector_t& origin = kvector_t(0, 0, 0));
66 
67 // Apply color to a 3D particle
68 void applyParticleColor(const Particle& particle, RealSpace::Particles::Particle& particle3D,
69  double alpha = 1);
70 
71 std::vector<Particle3DContainer> particle3DContainerVector(const SessionItem& layoutItem,
72  const QVector3D& origin = {});
73 
75  double total_abundance = 1.0,
76  const QVector3D& origin = {});
77 
79  double total_abundance = 1.0,
80  const QVector3D& origin = {});
81 
84  double total_abundance = 1.0, const QVector3D& origin = {});
85 
86 std::vector<Particle3DContainer>
87 particleDistribution3DContainer(const ParticleDistribution& particleDistribution,
88  double total_abundance = 1.0, const QVector3D& origin = {});
89 
91  double total_abundance = 1.0,
92  const QVector3D& origin = {});
93 
94 } // namespace RealSpaceBuilderUtils
95 
96 #endif // BORNAGAIN_GUI_COREGUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDERUTILS_H
Defines IRotation classes.
BasicVector3D< double > kvector_t
Definition: Vectors3D.h:21
Abstract base class of interference functions.
Abstract base class for rotations.
Definition: Rotations.h:28
Interference function of a 2D paracrystal.
A composition of particles at fixed positions.
A particle with a core/shell geometry.
A particle type that is a parametric distribution of IParticle's.
A particle with a form factor and refractive index.
Definition: Particle.h:24
QVector< double > computeCumulativeAbundances(const SessionItem &layoutItem)
Particle3DContainer particleCoreShell3DContainer(const ParticleCoreShell &particleCoreShell, double total_abundance=1.0, const QVector3D &origin={})
Particle3DContainer particleComposition3DContainer(const ParticleComposition &particleComposition3DContainer, double total_abundance=1.0, const QVector3D &origin={})
void populateParticlesAtLatticePositions(const std::vector< std::vector< double >> &lattice_positions, const std::vector< Particle3DContainer > &particle3DContainer_vector, RealSpaceModel *model, const SceneGeometry &sceneGeometry, const RealSpaceBuilder *builder3D)
std::vector< Particle3DContainer > particle3DContainerVector(const SessionItem &layoutItem, const QVector3D &origin={})
void applyParticleTransformations(const Particle &particle, RealSpace::Particles::Particle &particle3D, const kvector_t &origin=kvector_t(0, 0, 0))
Apply transformations (translation, rotation) to a 3D Particle or to a particle belonging to a Partic...
std::vector< Particle3DContainer > particleDistribution3DContainer(const ParticleDistribution &particleDistribution, double total_abundance=1.0, const QVector3D &origin={})
void applyParticleCoreShellTransformations(const Particle &particle, RealSpace::Particles::Particle &particle3D, const ParticleCoreShell &particleCoreShell, const kvector_t &origin=kvector_t(0, 0, 0))
Apply transformations (translation, rotation) to a particle (core/shell) in a ParticleCoreShell.
Particle3DContainer mesoCrystal3DContainer(const MesoCrystalItem &mesoCrystalItem, double total_abundance=1.0, const QVector3D &origin={})
RealSpace::Vector3D implementParticleRotationfromIRotation(const IRotation *&rotation)
void applyParticleColor(const Particle &particle, RealSpace::Particles::Particle &particle3D, double alpha=1)
Particle3DContainer singleParticle3DContainer(const Particle &particle, double total_abundance=1.0, const QVector3D &origin={})