25 Particle::Particle(
Material material) : m_material(std::move(material))
 
   31     : m_material(std::move(material)), mP_form_factor(form_factor.clone())
 
   34     registerChild(mP_form_factor.get());
 
   38     : m_material(std::move(material)), mP_form_factor(form_factor.clone())
 
   41     setRotation(rotation);
 
   42     registerChild(mP_form_factor.get());
 
   50         p_result->setFormFactor(*mP_form_factor);
 
   62     std::unique_ptr<IRotation> P_rotation(IRotation::createIdentity());
 
   64         P_rotation.reset(mP_rotation->clone());
 
   65     std::unique_ptr<IFormFactor> P_temp_ff(
 
   66         mP_form_factor->createSlicedFormFactor(limits, *P_rotation, m_position));
 
   70     double volume = P_temp_ff->volume();
 
   71     Material transformed_material(m_material.rotatedMaterial(P_rotation->getTransform3D()));
 
   72     P_ff->setMaterial(transformed_material);
 
   74     result.m_regions.push_back({volume, transformed_material});
 
   75     result.mP_slicedff = std::move(P_ff);
 
   79 void Particle::setMaterial(
Material material)
 
   84 void Particle::setFormFactor(
const IFormFactor& form_factor)
 
   86     if (&form_factor != mP_form_factor.get()) {
 
   87         mP_form_factor.reset(form_factor.
clone());
 
   88         registerChild(mP_form_factor.get());
 
   97 void Particle::initialize()
 
Factory functions used to create material instances.
 
Defines class SlicedParticle.
 
void setAbundance(double abundance)
Sets particle abundance.
 
std::vector< const INode * > getChildren() const override
Returns a vector of children (const).
 
void setPosition(kvector_t position)
Sets relative position of the particle's reference point in the coordinate system of parent.
 
void setRotation(const IRotation &rotation)
Sets transformation.
 
void registerParticleProperties()
Registers abundance and position.
 
Pure virtual interface for rotations.
 
A wrapper for underlying material implementation.
 
A particle with a form factor and refractive index.
 
Particle * clone() const override final
Returns a clone of this ISample object.
 
const Material * material() const override final
Returns nullptr, unless overwritten to return a specific material.
 
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
 
SlicedParticle createSlicedParticle(ZLimits limits) const override final
Creates a sliced form factor for this particle.
 
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
 
Material HomogeneousMaterial(const std::string &name, complex_t refractive_index, kvector_t magnetization)
Constructs a material with name, refractive_index and magnetization (in A/m).
 
Struct that contains information on a sliced particle.