box.h
来自「多机器人合作中的动态角色分配仿真算法是多机器人合作领域的一个比较著名的仿真软件」· C头文件 代码 · 共 61 行
H
61 行
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// Box.h: interface for the CBox class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(BOX_H)
#define BOX_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Afxtempl.h"
#include "mappath.h"
class CRobot;
class CBox : public CObject
{
public:
DECLARE_SERIAL(CBox)
CBox();
CBox(CRect rect);
virtual ~CBox();
void Serialize(CArchive& archive );
virtual void Draw(CDC *pDC);
void Update(double Forces[3], double dt);
virtual void Update(CArray<CRobot*, CRobot*> *robots, double dt, CMapPath *map);
double m_x; // Position and orientation
double m_y;
double m_theta;
BOOL m_exist; // True if there is a box in the application
double m_v[3]; // Velocities: vx, vy, w
CRect m_rect; // Box rectangle (***** should put inside child class)
double m_radius; // Box radius (***** should put inside child class)
double m_mass; // Box Mass
double m_f[3]; // Applied forces (x,y,theta)
double m_a[3]; // Accelerations (x,y,theta)
CArray<CPoint, CPoint> m_path; // Array of points that keeps track of the box path
};
#endif
#include "robot.h"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?