#ifndef __IMPLICIT_FUNCTION_H__
#define __IMPLICIT_FUNCTION_H__

#include "libmath.h"
#include <gaol/gaol.h>

namespace xrt
{
	typedef gaol::interval Interval;

	class ImplicitFunction
	{
	public:
		virtual Interval evaluate( Interval&, Interval&, Interval& ) = 0;
		virtual float evaluate( float, float, float ) = 0;
	};
}

#define DECLARE_CLASS( name, function ) \
	class name##Function: public ImplicitFunction\
	{\
	public:\
		Interval evaluate( Interval& x, Interval& y, Interval& z ) { return function; }\
		float evaluate( float x, float y, float z ) { return function; }\
	};

#define EXPORT_CLASS( name ) extern "C" EXPORT ImplicitFunction* createFunction() { return new name##Function; }

#endif //__IMPLICIT_FUNCTION_H__