obstacle.h

来自「多机器人合作中的动态角色分配仿真算法是多机器人合作领域的一个比较著名的仿真软件」· C头文件 代码 · 共 47 行

H
47
字号
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// Obstacle.h: interface for the CObstacle class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(OBSTACLE_H)
#define OBSTACLE_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CObstacle : public CObject  
{
public:
    DECLARE_SERIAL( CObstacle )

	CObstacle();
	virtual ~CObstacle();
	virtual void SetObstacle(const CObstacle *obst);

    void Serialize( CArchive& archive );
	virtual void Draw(CDC* pDC, BOOL drawErased);

	BOOL m_erased;		// True if the obstacle has been erased
	BOOL m_inRange;		// True if the obstacle is inside the sensor range
	BOOL m_visited;		// True if the obstacle has been detected by the robot some  time
	BOOL m_inContact;	// True if the obstacle is in contact with the robot

	double m_angle;		// angle from the robot to the obstacle
	double m_dist;		// distance  from the robot to the obstacle

	// ***** should be put in the child classes
	CRect m_rect;		// obstacle rectangle
	CPoint m_center;	// obstacle center
	double m_radius;	// obstacle radius
};


#endif 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?