rem: static float OPC_PointTriangleSqrDist(const Point& point, const Point& p0, const Point& p1, const Point& p2)
add: static float OPC_PointTriangleSqrDist(const IceMaths::Point& point, const IceMaths::Point& p0, const IceMaths::Point& p1, const IceMaths::Point& p2)
context: static float OPC_PointTriangleSqrDist(const Point& point, const Point& p0, const Point& p1, const Point& p2){	// Hook	Point TriEdge0 = p1 - p0;	Point TriEdge1 = p2 - p0;	Point kDiff	= p0 - point;	float fA00	= TriEdge0.SquareMagnitude();	float fA01	= TriEdge0 | TriEdge1;	float fA11	= TriEdge1.SquareMagnitude();	float fB0	= kDiff | TriEdge0;	float fB1	= kDiff | TriEdge1;	float fC	= kDiff.SquareMagnitude();	float fDet	= fabsf(fA00*fA11 - fA01*fA01);	float fS	= fA01*fB1-fA11*fB0;	float fT	= fA01*fB0-fA00*fB1;	float fSqrDist;	if(fS + fT <= fDet)	{		if(fS < 0.0f)		{			if(fT < 0.0f)  // region 4			{				if(fB0 < 0.0f)				{					if(-fB0 >= fA00)		fSqrDist = fA00+2.0f*fB0+fC;					else					fSqrDist = fB0*(-fB0/fA00)+fC;				}				else				{					if(fB1 >= 0.0f)			fSqrDist = fC;					else if(-fB1 >= fA11)	fSqrDist = fA11+2.0f*fB1+fC;					else					fSqrDist = fB1*(-fB1/fA11)+fC;				}			}			else  // region 3			{				if(fB1 >= 0.0f)				fSqrDist = fC;				else if(-fB1 >= fA11)		fSqrDist = fA11+2.0f*fB1+fC;				else						fSqrDist = fB1*(-fB1/fA11)+fC;			}		}		else if(fT < 0.0f)  // region 5		{			if(fB0 >= 0.0f)					fSqrDist = fC;			else if(-fB0 >= fA00)			fSqrDist = fA00+2.0f*fB0+fC;			else							fSqrDist = fB0*(-fB0/fA00)+fC;		}		else  // region 0		{			// minimum at interior point			if(fDet==0.0f)			{				fSqrDist = MAX_FLOAT;			}			else			{				float fInvDet = 1.0f/fDet;				fS *= fInvDet;				fT *= fInvDet;				fSqrDist = fS*(fA00*fS+fA01*fT+2.0f*fB0) + fT*(fA01*fS+fA11*fT+2.0f*fB1)+fC;			}		}	}	else	{		float fTmp0, fTmp1, fNumer, fDenom;		if(fS < 0.0f)  // region 2		{			fTmp0 = fA01 + fB0;			fTmp1 = fA11 + fB1;			if(fTmp1 > fTmp0)			{				fNumer = fTmp1 - fTmp0;				fDenom = fA00-2.0f*fA01+fA11;				if(fNumer >= fDenom)				{					fSqrDist = fA00+2.0f*fB0+fC;				}				else				{					fS = fNumer/fDenom;					fT = 1.0f - fS;					fSqrDist = fS*(fA00*fS+fA01*fT+2.0f*fB0) + fT*(fA01*fS+fA11*fT+2.0f*fB1)+fC;				}			}			else			{				if(fTmp1 <= 0.0f)		fSqrDist = fA11+2.0f*fB1+fC;				else if(fB1 >= 0.0f)	fSqrDist = fC;				else					fSqrDist = fB1*(-fB1/fA11)+fC;			}		}		else if(fT < 0.0f)  // region 6		{			fTmp0 = fA01 + fB1;			fTmp1 = fA00 + fB0;			if(fTmp1 > fTmp0)			{				fNumer = fTmp1 - fTmp0;				fDenom = fA00-2.0f*fA01+fA11;				if(fNumer >= fDenom)				{					fSqrDist = fA11+2.0f*fB1+fC;				}				else				{					fT = fNumer/fDenom;					fS = 1.0f - fT;					fSqrDist = fS*(fA00*fS+fA01*fT+2.0f*fB0) + fT*(fA01*fS+fA11*fT+2.0f*fB1)+fC;				}			}			else			{				if(fTmp1 <= 0.0f)		fSqrDist = fA00+2.0f*fB0+fC;				else if(fB0 >= 0.0f)	fSqrDist = fC;				else					fSqrDist = fB0*(-fB0/fA00)+fC;			}		}		else  // region 1		{			fNumer = fA11 + fB1 - fA01 - fB0;			if(fNumer <= 0.0f)			{				fSqrDist = fA11+2.0f*fB1+fC;			}			else			{				fDenom = fA00-2.0f*fA01+fA11;				if(fNumer >= fDenom)				{					fSqrDist = fA00+2.0f*fB0+fC;				}				else				{					fS = fNumer/fDenom;					fT = 1.0f - fS;					fSqrDist = fS*(fA00*fS+fA01*fT+2.0f*fB0) + fT*(fA01*fS+fA11*fT+2.0f*fB1)+fC;				}			}		}	}	return fabsf(fSqrDist);}