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:
|
||||
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) {}
|
||||
|
|
|
@ -19,6 +19,7 @@ Mesh MarchingCubes::operator()() {
|
|||
Mesh output;
|
||||
|
||||
without_hints(output);
|
||||
output.translate(surface.getCenter());
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue