mpri-graphics-project/Implicit.hpp
Théophile Bastian 7b374c70ae Surfaces now provide a location hint
This is supposed to be a point in space close to the surface
2018-02-13 18:42:15 +01:00

18 lines
523 B
C++

#pragma once
#include "common_structures.hpp"
class ImplicitSurface {
public:
virtual double operator() (double x, double y, double z) const = 0;
double operator()(const Point& pt) const;
Point getCenter() const { return center;}
virtual Point location_hint() const = 0;
/// Compute the normal vector to the isosurface at `pt`
Point normal_at(const Point& pt) const;
protected:
Point center;
ImplicitSurface(Point _center) : center(_center) {}
};