Skip to content
Snippets Groups Projects
Commit 8c5cdab1 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ParticleCoreShell: merge initializer fcts

parent 5e33e2a4
No related branches found
No related tags found
1 merge request!516formfactor/particle: slight simplifications
Pipeline #51467 passed
......@@ -24,8 +24,9 @@
ParticleCoreShell::ParticleCoreShell(const Particle& shell, const Particle& core,
R3 relative_core_position)
{
addAndRegisterCore(core, relative_core_position);
addAndRegisterShell(shell);
m_core.reset(core.clone());
m_core->translate(relative_core_position);
m_shell.reset(shell.clone());
}
ParticleCoreShell::~ParticleCoreShell() = default;
......@@ -90,15 +91,4 @@ std::vector<const INode*> ParticleCoreShell::getChildren() const
return std::vector<const INode*>() << IParticle::getChildren() << m_core << m_shell;
}
void ParticleCoreShell::addAndRegisterCore(const Particle& core, R3 relative_core_position)
{
m_core.reset(core.clone());
m_core->translate(relative_core_position);
}
void ParticleCoreShell::addAndRegisterShell(const Particle& shell)
{
m_shell.reset(shell.clone());
}
ParticleCoreShell::ParticleCoreShell() : m_shell{nullptr}, m_core{nullptr} {}
......@@ -44,8 +44,6 @@ public:
std::vector<const INode*> getChildren() const override;
protected:
void addAndRegisterCore(const Particle& core, R3 relative_core_position);
void addAndRegisterShell(const Particle& shell);
ParticleCoreShell();
std::unique_ptr<Particle> m_shell;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment