// NormalError.cpp: NormalError クラスのインプリメンテーション // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "MeshEditor.h" #include "NormalError.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // 構築/消滅 ////////////////////////////////////////////////////////////////////// NormalError::NormalError() { } NormalError::~NormalError() { } float NormalError::func(float p[]) { int face_N = mesh->face_N; float (*normal)[3] = mesh->normal_f; int (*face)[3] = mesh->face; float E = 0; for(int i=0; ivertex_N; int **link = mesh->vertex_link_v; int **link_f = mesh->vertex_link_f; int *degree = mesh->degree_v; int *isBound = mesh->isBound; float (*normal)[3] = mesh->normal_f; for(int i=0; i