// ImplicitFunction.h: ImplicitFunction クラスのインターフェイス // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_IMPLICITFUNCTION_H__E5D8E77D_DFDC_4335_9A5B_435B70905669__INCLUDED_) #define AFX_IMPLICITFUNCTION_H__E5D8E77D_DFDC_4335_9A5B_435B70905669__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "MeshData.h" #define h 0.0001f class ImplicitFunction { public: float distanceToTriangle(float A[], float B[], float C[], float P[]); void EvaluateNormalError(MeshData *mesh, float* error); float EvaluateCurvatureError(MeshData* mesh, double &max); void setNormalAsGrd(MeshData* mesh); float EvaluateNormalError(MeshData* mesh, double &max); float EvaluateVertexError(MeshData* mesh, double &max); ImplicitFunction(); virtual ~ImplicitFunction(); void doubleNabla(float x[], float dd[][3]); void nabla(float x[3], float g[3]); float model(float x[3]); void EvaluateDD(float x[3], float dd[3][3]); inline float metaball(float r, float d); inline float distanceToSegment(float A[], float B[], float P[]); float hfSphere(float x[3], float cen[3], float r); float hfTorusX(float x[3], float cen[3], float R, float r); float hfTorusZ(float x[3], float cen[3], float R, float r); float hfTorusY(float x[3], float cen[3], float R, float r); float hfEllCylZ(float x[3], float cen[3], float a, float b); float hfEllipsoid(float x[3], float cen[3], float a, float b, float c); virtual float EvaluateFunction(float x[3]); virtual void EvaluateGradient(float x[3], float g[3]); private: float R_uni(float f1, float f2); float R_int(float f1, float f2); }; #endif // !defined(AFX_IMPLICITFUNCTION_H__E5D8E77D_DFDC_4335_9A5B_435B70905669__INCLUDED_)