Remove all remaining usages of the Boundary class.
Requiescat in pace
March 4, 1998 (commit 8:
184639502b4) - May 12, 2018 (41,058 commits and
counting).
Manifold has not gone too far from that original design: in the beginning we had
the in_between function:
template <int dim>
class Boundary {
public:
/**
* Typedef an array of the needed number
* of old points.
*/
typedef const Point<dim>* PointArray[1<<(dim-1)];
/**
* This function calculates the position
* of the new vertex.
*/
virtual Point<dim> in_between (const PointArray &neighbors) const = 0;
};
/**
Specialisation of \Ref{Boundary}<dim>, which places the new point right
into the middle of the given points. The middle is defined as the
arithmetic mean of the points.
*/
template <int dim>
class StraightBoundary : public Boundary<dim> {
public:
/**
* This function calculates the position
* of the new vertex.
*/
virtual Point<dim> in_between (const PointArray &neighbors) const {
Point<dim> p;
for (int i=0; i<(1<<(dim-1)); ++i)
p += *neighbors[i];
p /= (1<<(dim-1))*1.0;
return p;
};
};
which is essentially Manifold::get_intermediate_point without the weight.
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams