diff --git a/Sample/Particle/ParticleCoreShell.cpp b/Sample/Particle/ParticleCoreShell.cpp index 41b3d28701c00b00ea18a02a913d82495c315fca..0498f682fb88c0c0987a51093779218e1786740e 100644 --- a/Sample/Particle/ParticleCoreShell.cpp +++ b/Sample/Particle/ParticleCoreShell.cpp @@ -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} {} diff --git a/Sample/Particle/ParticleCoreShell.h b/Sample/Particle/ParticleCoreShell.h index 9ead6831a732a65064b6210ebad9d58ec8c6de11..08f700c0746397fd0331b39a129e0818bd410603 100644 --- a/Sample/Particle/ParticleCoreShell.h +++ b/Sample/Particle/ParticleCoreShell.h @@ -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;