You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
810 B
C++

#include "StdAfx.h"
#include "MeasureMgr.h"
#include "GlobalFunction.h"
#include "LogMgr.h"
CMeasureMgr gMeasureMgr;
CMeasureMgr::CMeasureMgr(void)
{
m_bSelFirstPt = false;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
}
CMeasureMgr::~CMeasureMgr(void)
{
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>µIJɼ<C4B2><C9BC><EFBFBD>
void CMeasureMgr::SetNewPt(Dbxy pt)
{
CString LogStr;
LogStr.Format(_T("MeasureMgr:[pt.x] = [%f] ,[pt.y] = [%f]"),pt.x,pt.y);
gLogMgr->WriteDebugLog(LogStr);
if(!m_bSelFirstPt)//<2F><><EFBFBD>õ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>
{
m_OldPt = pt;
m_bSelFirstPt = true;
return;
}
//<2F><><EFBFBD><EFBFBD>
double Dis = CalDistance(m_OldPt,pt);
//<2F>Ƕ<EFBFBD>
double Ang = Cal360AngleByTwoPt(m_OldPt,pt);
LogStr.Format(_T("MeasureMgr:[Dis] = [%f] ,[Ang] = [%f]"),Dis,Ang);
gLogMgr->WriteDebugLog(LogStr);
}