#ifndef __ISDFINTERPOLATOR_H__ #define __ISDFINTERPOLATOR_H__ #include "ISDF.h" #include "OctreeADF.h" namespace SDF { /* * The interface for SDF interpolation functions * Implementations would include TrilinearSdfInterp, CoonsSdfInterp, etc. * * Interface usage: * First, create an implementation instance. * Then, use setNode to tell it which SDF node to interpolate for. * After setting the node, call interpolate(from) to get the * interpolated SDF from 'from' to the interpolated surface. * * Implementations must allow users to call setNode again to * interpolate for a different node. So once setNode is called * for a different node, interpolate will begin returning SDFs * for the new node. * * For now, interpolators only have to return signed doubles, * as opposed to the SdfValue structure. So they are not required * to return a closest-point. */ class ISdfInterpolator { public: ISdfInterpolator(void); ~ISdfInterpolator(void); virtual void setNode(octreeNode *node) = 0; virtual double interpolate(const Point &from) = 0; }; } #endif // __ISDFINTERPOLATOR_H__