Use ImplicitSurface.center in marching cubes

This commit is contained in:
Théophile Bastian 2018-02-12 13:45:02 +01:00
parent 97966377f5
commit 48ef986f4f
2 changed files with 2 additions and 1 deletions

View file

@ -6,7 +6,7 @@ class ImplicitSurface {
public:
virtual double operator() (double x, double y, double z) const = 0;
double operator()(const Point& pt) const;
Point getCenter() { return center;}
Point getCenter() const { return center;}
protected:
Point center;
ImplicitSurface(Point _center) : center(_center) {}

View file

@ -19,6 +19,7 @@ Mesh MarchingCubes::operator()() {
Mesh output;
without_hints(output);
output.translate(surface.getCenter());
return output;
}