2018-02-06 19:07:07 +01:00
|
|
|
#pragma once
|
|
|
|
|
2018-02-11 16:46:55 +01:00
|
|
|
#include "common_structures.hpp"
|
|
|
|
|
2018-01-25 11:40:39 +01:00
|
|
|
class ImplicitSurface {
|
|
|
|
public:
|
2018-02-11 20:19:26 +01:00
|
|
|
virtual double operator() (double x, double y, double z) const = 0;
|
|
|
|
double operator()(const Point& pt) const;
|
2018-02-12 13:45:02 +01:00
|
|
|
Point getCenter() const { return center;}
|
2018-02-13 13:22:41 +01:00
|
|
|
|
2018-02-13 18:42:15 +01:00
|
|
|
virtual Point location_hint() const = 0;
|
|
|
|
|
2018-02-13 13:22:41 +01:00
|
|
|
/// Compute the normal vector to the isosurface at `pt`
|
|
|
|
Point normal_at(const Point& pt) const;
|
2018-02-12 11:37:38 +01:00
|
|
|
protected:
|
|
|
|
Point center;
|
|
|
|
ImplicitSurface(Point _center) : center(_center) {}
|
2018-02-07 17:57:49 +01:00
|
|
|
};
|