增加读写IO口标志信息,验证点到面距离算法。

This commit is contained in:
TAO Cheng
2014-01-13 19:12:38 +08:00
parent dc4fbc655f
commit bc65eb2726
8 changed files with 103 additions and 30 deletions
@@ -113,4 +113,17 @@ int CSo7_Interface::Pro_Face_Du(MY3DPoint* pArr, int n, double* Coe, double* Err
dis=dis2;
return 1;
}
//========================================
double CSo7_Interface::PointToFace_1(double* _dCoe, MY3DPoint _PointXYZ)
{
double a,b,c,d;
double r1(0.0);
a = _dCoe[0];
b = _dCoe[1];
c = _dCoe[2];
d = _dCoe[3];
r1=((a*_PointXYZ.x + b*_PointXYZ.y + c*_PointXYZ.z + d)/sqrt(a*a + b*b + c*c));
return r1;
}
@@ -43,6 +43,8 @@ public:
void PauseScanAndGetData();
int Pro_Face_Du(MY3DPoint* pArr, int n, double* Coe, double* Error, double& dis);
double PointToFace_1(double* _dCoe, MY3DPoint _PointXYZ);
};
#endif