Use ImplicitSurface.center in marching cubes
This commit is contained in:
parent
97966377f5
commit
48ef986f4f
2 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,7 @@ class ImplicitSurface {
|
||||||
public:
|
public:
|
||||||
virtual double operator() (double x, double y, double z) const = 0;
|
virtual double operator() (double x, double y, double z) const = 0;
|
||||||
double operator()(const Point& pt) const;
|
double operator()(const Point& pt) const;
|
||||||
Point getCenter() { return center;}
|
Point getCenter() const { return center;}
|
||||||
protected:
|
protected:
|
||||||
Point center;
|
Point center;
|
||||||
ImplicitSurface(Point _center) : center(_center) {}
|
ImplicitSurface(Point _center) : center(_center) {}
|
||||||
|
|
|
@ -19,6 +19,7 @@ Mesh MarchingCubes::operator()() {
|
||||||
Mesh output;
|
Mesh output;
|
||||||
|
|
||||||
without_hints(output);
|
without_hints(output);
|
||||||
|
output.translate(surface.getCenter());
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue