15 #ifndef BORNAGAIN_SAMPLE_AGGREGATE_PARTICLELAYOUT_H
16 #define BORNAGAIN_SAMPLE_AGGREGATE_PARTICLELAYOUT_H
54 std::vector<const INode*>
getChildren()
const override;
Defines interface class ISampleNode.
Defines IRotation classes.
Defines and implements template class SafePointerVector.
Interface for a generic particle.
Abstract base class of interference functions.
Visitor interface to visit ISampleNode objects.
virtual void visit(const BasicLattice2D *)
Abstract base class for Particle, ParticleComposition, ParticleCoreShell, MesoCrystal.
Abstract base class for rotations.
Abstract base class for sample components and properties related to scattering.
The identity rotation, which leaves everything in place.
Decorator class that adds particles to ISampleNode objects.
double weight() const
Returns the relative weight of this layout.
SafePointerVector< IAbstractParticle > m_particles
Vector of particle types.
std::unique_ptr< IInterferenceFunction > m_interference_function
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
void registerParticleDensity(bool make_registered=true)
void setTotalParticleSurfaceDensity(double particle_density)
Sets total particle surface density.
double getTotalAbundance() const
ParticleLayout * clone() const override
Returns a clone of this ISampleNode object.
~ParticleLayout() override
void setInterferenceFunction(const IInterferenceFunction &interference_function)
Adds interference functions.
const IInterferenceFunction * interferenceFunction() const
SafePointerVector< IParticle > particles() const
Returns information on all particles (type and abundance) and generates new particles if an IAbstract...
std::vector< const INode * > getChildren() const override
Returns a vector of children.
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 setWeight(double weight)
Sets the relative weight of this layout.
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.
double totalParticleSurfaceDensity() const
A vector of pointers, owned by *this, with methods to handle them safely.