diff --git a/Sample/HardParticle/Dodecahedron.cpp b/Sample/HardParticle/Dodecahedron.cpp index af05989b9152dd6fc8a153dd747882ff87c85adb..815894eded6e280ced1f112344581f70a484ebfb 100644 --- a/Sample/HardParticle/Dodecahedron.cpp +++ b/Sample/HardParticle/Dodecahedron.cpp @@ -33,7 +33,6 @@ std::string Dodecahedron::validate() const return jointError({"nonpositive edge=" + std::to_string(m_edge)}); pimpl.reset(ff::make::Dodecahedron(m_edge)); - shift(1.113516364411607 * m_edge); m_validated = true; return ""; diff --git a/Sample/HardParticle/IFormFactorPolyhedron.cpp b/Sample/HardParticle/IFormFactorPolyhedron.cpp index 45bbbb39cdf6ff3cdd5bc154de21f06a00a24af0..809a42eb2e7b009a5e3ebe65740e2141e1b33009 100644 --- a/Sample/HardParticle/IFormFactorPolyhedron.cpp +++ b/Sample/HardParticle/IFormFactorPolyhedron.cpp @@ -34,16 +34,9 @@ IFormFactorPolyhedron::~IFormFactorPolyhedron() = default; void IFormFactorPolyhedron::setPolyhedron(const ff::Topology& topology, double z_bottom, const std::vector<R3>& vertices) const { - m_z_bottom = z_bottom; - pimpl = std::make_unique<ff::Polyhedron>(topology, vertices, R3(0, 0, -z_bottom)); } -void IFormFactorPolyhedron::shift(double z_center) const -{ - m_z_bottom = -z_center; -} - double IFormFactorPolyhedron::volume() const { ASSERT(m_validated); diff --git a/Sample/HardParticle/IFormFactorPolyhedron.h b/Sample/HardParticle/IFormFactorPolyhedron.h index efec54662788fc5e0fd8f0f4198d08de6eca4a03..aab6534fa319b791d8598ea391b0f5b4ac7138bb 100644 --- a/Sample/HardParticle/IFormFactorPolyhedron.h +++ b/Sample/HardParticle/IFormFactorPolyhedron.h @@ -41,10 +41,8 @@ public: protected: void setPolyhedron(const ff::Topology& topology, double z_bottom, const std::vector<R3>& vertices) const; - void shift(double z_center) const; mutable std::unique_ptr<ff::IPolyhedron> pimpl; - mutable double m_z_bottom; private: Span exec_spanZ(const IRotation* rotation) const override; diff --git a/Sample/HardParticle/Icosahedron.cpp b/Sample/HardParticle/Icosahedron.cpp index 7fc152b4bc67c79554aa58b8e74955d7b58cf124..72ba884420091f4f0eb4a30930e8c018991ee53b 100644 --- a/Sample/HardParticle/Icosahedron.cpp +++ b/Sample/HardParticle/Icosahedron.cpp @@ -33,7 +33,6 @@ std::string Icosahedron::validate() const return jointError({"nonpositive edge=" + std::to_string(m_edge)}); pimpl.reset(ff::make::Icosahedron(m_edge)); - shift(0.7557613140761708 * m_edge); m_validated = true; return ""; diff --git a/Sample/HardParticle/PlatonicOctahedron.cpp b/Sample/HardParticle/PlatonicOctahedron.cpp index 54f4a784fba8d9930671b5d483cb5393b29b0cd1..da00008ef5c35383efd3c6b976ba3f659ffe976d 100644 --- a/Sample/HardParticle/PlatonicOctahedron.cpp +++ b/Sample/HardParticle/PlatonicOctahedron.cpp @@ -35,7 +35,6 @@ std::string PlatonicOctahedron::validate() const return jointError({"nonpositive edge=" + std::to_string(m_edge)}); pimpl.reset(ff::make::Octahedron(m_edge)); - shift(m_edge / sqrt(2)); m_validated = true; return ""; diff --git a/Sample/HardParticle/PlatonicTetrahedron.cpp b/Sample/HardParticle/PlatonicTetrahedron.cpp index 78c0c3ab5adc928a56ed06ef3c28266df2b49731..04fa9368b8e5668bff2caecd6990aeed5b722b70 100644 --- a/Sample/HardParticle/PlatonicTetrahedron.cpp +++ b/Sample/HardParticle/PlatonicTetrahedron.cpp @@ -35,7 +35,6 @@ std::string PlatonicTetrahedron::validate() const return jointError({"nonpositive edge=" + std::to_string(m_edge)}); pimpl.reset(ff::make::Tetrahedron(m_edge)); - shift(sqrt(2. / 3) / 4 * m_edge); m_validated = true; return "";