📄 box.h
字号:
//////////////////////////////////////////////////////////////////////
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -