15 #ifndef BORNAGAIN_CORE_AGGREGATE_PARTICLELAYOUT_H
16 #define BORNAGAIN_CORE_AGGREGATE_PARTICLELAYOUT_H
Defines and implements interface class ILayout.
Defines IRotation classes.
Interface for a generic particle.
Pure virtual base class of interference functions.
Pure virtual interface class to equip a sample layer with scattering properties.
Visitor interface to visit ISample objects.
Base class for tree-like structures containing parameterized objects.
Pure virtual base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Pure virtual interface for rotations.
The identity rotation, which leaves everything in place.
Decorator class that adds particles to ISample objects.
SafePointerVector< IAbstractParticle > m_particles
Vector of particle types.
std::unique_ptr< IInterferenceFunction > mP_interference_function
void registerParticleDensity(bool make_registered=true)
double getTotalAbundance() const final override
Get total abundance of all particles.
SafePointerVector< IParticle > particles() const final override
Returns information on all particles (type and abundance) and generates new particles if an IAbstract...
void accept(INodeVisitor *visitor) const final override
Calls the INodeVisitor's visit method.
~ParticleLayout() override
std::vector< const INode * > getChildren() const final override
Returns a vector of children (const).
void setInterferenceFunction(const IInterferenceFunction &interference_function)
Adds interference functions.
double totalParticleSurfaceDensity() const final override
Returns surface density of all particles.
void setTotalParticleSurfaceDensity(double particle_density) final override
Sets total particle surface density.
const IInterferenceFunction * interferenceFunction() const final override
Returns the interference function.
void setAndRegisterInterferenceFunction(IInterferenceFunction *child)
Sets interference function with simultaneous registration in parent class.
double m_total_particle_density
void addAndRegisterAbstractParticle(IAbstractParticle *child)
Adds particle information with simultaneous registration in parent class.
void addParticle(const IAbstractParticle &particle, double abundance=-1.0, const kvector_t position={}, const IRotation &rotation=IdentityRotation())
Adds particle to the layout with abundance, position and the rotation defined.
ParticleLayout * clone() const final override
Returns a clone of this ISample object.
A vector of pointers, owned by *this, with methods to handle them safely.