📄 obstacle.cpp
字号:
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// Obstacle.cpp: implementation of the CObstacle class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "simulator.h"
#include "Obstacle.h"
#include "const.h"
#include <math.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
IMPLEMENT_SERIAL( CObstacle, CObject, 1 )
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CObstacle::CObstacle()
{
m_erased = FALSE;
m_inRange = FALSE;
m_visited = TRUE;
m_angle = 0;
m_dist = 0;
}
// Function used by the copy constructors
void CObstacle::SetObstacle(const CObstacle *obst)
{
m_rect = obst->m_rect;
m_center = obst->m_center;
m_radius = obst->m_radius;
m_erased = obst->m_erased;
m_inRange = FALSE;
m_visited = FALSE;
m_angle = 0;
m_dist = 0;
}
CObstacle::~CObstacle()
{
}
void CObstacle::Serialize(CArchive& ar)
{
CObject::Serialize(ar); // Base class method
if (ar.IsStoring()) {
ar << m_rect;
ar << m_center;
ar << m_radius;
ar << m_erased;
ar << m_inRange;
ar << m_visited;
ar << m_dist;
ar << m_angle;
}
else {
ar >> m_rect;
ar >> m_center;
ar >> m_radius;
ar >> m_erased;
ar >> m_inRange;
ar >> m_visited;
ar >> m_dist;
ar >> m_angle;
}
}
void CObstacle::Draw(CDC* pDC, BOOL drawErased)
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -