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

IFFPolyhedron: rm member m_z_bottom and fct shift

parent b3351035
No related branches found
No related tags found
1 merge request!1187adapt to changes in libff: factory functions moved to ff/Make
......@@ -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 "";
......
......@@ -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);
......
......@@ -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;
......
......@@ -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 "";
......
......@@ -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 "";
......
......@@ -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 "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment