www.pudn.com > 人体步态跟踪识别bate版.rar > DPoint2D.cpp


// DPoint2D.cpp: implementation of the CDPoint2D class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#include "stdafx.h" 
#include "humantrack.h" 
#include "DPoint2D.h" 
#include "math.h" 
#ifdef _DEBUG 
#undef THIS_FILE 
static char THIS_FILE[]=__FILE__; 
#define new DEBUG_NEW 
#endif 
 
////////////////////////////////////////////////////////////////////// 
// Construction/Destruction 
////////////////////////////////////////////////////////////////////// 
 
CDPoint2D::CDPoint2D() 
{ 
x=0; 
y=0; 
} 
CDPoint2D::CDPoint2D(double x1, double y1)  
{	 
x = x;  
y = y; 
} 
CDPoint2D::~CDPoint2D() 
{ 
 
} 
double CDPoint2D::distance(CDPoint2D point)  
{ 
	 
return sqrt(pow(x-point.x, 2) + pow(y-point.y, 2)); 
} 
 
void CDPoint2D::setValue(double x1, double y1) 
 { 
	 
x = x1; 
y = y1; 
} 
 
CString CDPoint2D::toString() 
 { 
	CString s("ll"); 
	return s; 
//new String("[" + x + ", " + y + "]"); 
}