50 std::unique_ptr<Particle> P_core(
mp_core->clone());
51 P_core->rotate(*P_rotation);
53 auto sliced_core = P_core->createSlicedParticle(limits);
56 std::unique_ptr<Particle> P_shell(
mp_shell->clone());
57 P_shell->rotate(*P_rotation);
59 auto sliced_shell = P_shell->createSlicedParticle(limits);
60 if (!sliced_shell.mP_slicedff)
65 if (!sliced_core.mP_slicedff) {
66 result.
mP_slicedff.reset(sliced_shell.mP_slicedff.release());
67 result.
m_regions.push_back(sliced_shell.m_regions.back());
72 if (sliced_shell.m_regions.size() != 1)
74 auto shell_material = sliced_shell.
m_regions[0].m_material;
75 sliced_core.mP_slicedff->setAmbientMaterial(shell_material);
78 sliced_shell.m_regions.back().m_volume -= sliced_core.m_regions.back().m_volume;
80 sliced_shell.mP_slicedff.release()));
81 result.
m_regions.push_back(sliced_core.m_regions.back());
82 result.
m_regions.push_back(sliced_shell.m_regions.back());
95 mp_core->translate(relative_core_position);
97 mp_core->registerAbundance(
false);
Defines ParticleCoreShell.
Defines class SlicedParticle.
void setAbundance(double abundance)
Sets particle abundance.
void registerChild(INode *node)
void setName(const std::string &name)
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.
std::unique_ptr< IRotation > mP_rotation
void setRotation(const IRotation &rotation)
Sets transformation.
void registerParticleProperties()
Registers abundance and position.
static IRotation * createIdentity()
A particle with a core/shell geometry.
std::vector< const INode * > getChildren() const override final
Returns a vector of children (const).
void addAndRegisterShell(const Particle &shell)
ParticleCoreShell * clone() const override final
Returns a clone of this ISample object.
void addAndRegisterCore(const Particle &core, kvector_t relative_core_position)
SlicedParticle createSlicedParticle(ZLimits limits) const override final
Creates a sliced form factor for this particle.
std::unique_ptr< Particle > mp_shell
std::unique_ptr< Particle > mp_core
A particle with a form factor and refractive index.
Particle * clone() const override final
Returns a clone of this ISample object.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Struct that contains information on a sliced particle.
std::vector< HomogeneousRegion > m_regions
std::unique_ptr< IFormFactor > mP_slicedff