33 result->addAndRegisterAbstractParticle(particle->clone());
39 result->setWeight(
weight());
46 std::vector<const INode*> result;
48 result.emplace_back(p);
66 std::vector<const IParticle*> result;
68 result.emplace_back(p);
81 result += particle->abundance();
Defines class InterferenceNone.
Defines class ParticleLayout.
Abstract base class of interference functions.
IInterference * clone() const override=0
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal....
void setAbundance(double abundance)
Sets particle abundance.
IParticle * clone() const override=0
Returns a clone of this ISampleNode object.
Decorator class that adds particles to ISampleNode objects.
double weight() const
Returns the relative weight of this layout.
OwningVector< IParticle > m_particles
Vector of particle types.
void addAndRegisterAbstractParticle(IParticle *child)
Adds particle information with simultaneous registration in parent class.
void setTotalParticleSurfaceDensity(double particle_density)
Sets total particle surface density.
void setAndRegisterInterference(IInterference *child)
Sets interference function with simultaneous registration in parent class.
ParticleLayout * clone() const override
Returns a clone of this ISampleNode object.
void addParticle(const IParticle &particle, double abundance=-1.0)
Adds particle to the layout with abundance, position and the rotation defined.
double totalAbundance() const
const IInterference * interferenceFunction() const
std::unique_ptr< IInterference > m_interparticle
~ParticleLayout() override
void setInterference(const IInterference &interparticle)
Adds interference functions.
std::vector< const IParticle * > particles() const
double weightedParticleSurfaceDensity() const
double m_total_particle_density
std::vector< const INode * > nodeChildren() const override
Returns all children.
double totalParticleSurfaceDensity() const