/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #include "MGCLStdAfx.h" #include "mg/FSurface.h" #include "mg/FPoint.h" #if defined(_DEBUG) #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif // //Implements MGFPoint Class. //MGFPoint is to represent a Face's point. The expression is: //(MGFace* f, MGPosition uv), where f is a face pointer of interest, //and uv is the parameter value of the face f. ///////Constructor//////// ///////Operator oveload/////// bool MGFPoint::operator< (const MGFPoint& fp)const{ if(fp.m_face==m_face){ if(m_uv[0]==fp.m_uv[0]) return (m_uv[1]m_face->param_error_u()) return false; if(fabs(m_uv[1]-fp.m_uv[1])>m_face->param_error_v()) return false; return true; } ///////Member function/////// //Evaluation of the Face at the FPoint. //When nderi=0, get the positional data at the point. MGVector MGFPoint::eval(int ndu, int ndv)const{ return fsurface().eval(uv(), ndu, ndv); } //Debug Function std::ostream& operator<< (std::ostream& ostrm, const MGFPoint& fp){ ostrm<<"MGFPoint::m_face="<