📄 simulatordoc.h
字号:
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// simulatorDoc.h : interface of the CSimulatorDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(SIMULATORDOC_H)
#define SIMULATORDOC_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Afxtempl.h"
#include "Robot.h"
#include "Box.h"
#include <afxmt.h>
class CSimulatorDoc : public CDocument
{
public:
DECLARE_DYNCREATE(CSimulatorDoc)
CSimulatorDoc();
virtual ~CSimulatorDoc();
void AddRobot(CRobot *);
void AddObstacle(CObstacle *);
void SerializeGlobals(CArchive& ar);
void Initialize();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSimulatorDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
virtual void DeleteContents();
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
CArray<CRobot*, CRobot*> m_robots; // array with all the robots
CBox *m_box; // box of the manipulation task
double m_simTime; // simulation time
CWinThread *m_updateThread; // update thread
CMapPath *m_globalMap; // global map structure of the application
CMapView m_mapView; // window to show the map
CScrollView *m_view; // pointer to the main window (view)
int m_selectedButton; // button that is selected in the toolbar
BOOL m_drawErased; // True if the erased obstacles should be drawn
BOOL m_drawRange; // True if the sensor range should be drawn
BOOL m_drawPath; // True if the robot trajectory should be drawn
BOOL m_isRunning; // True if the simulations is running
BOOL m_threadIsCreated; // True if the update thread is created
int m_selectedRobot; // -1 if no robot is selected. else contain the robot id
int m_selectedObst; // -1 if no obstacle is selected. else contain the obstacle id
// Generated message map functions
protected:
//{{AFX_MSG(CSimulatorDoc)
afx_msg void OnDrawRange();
afx_msg void OnUpdateDrawRange(CCmdUI* pCmdUI);
afx_msg void OnDrawErased();
afx_msg void OnUpdateDrawErased(CCmdUI* pCmdUI);
afx_msg void OnApplicationsForage();
afx_msg void OnSelect();
afx_msg void OnUpdateSelect(CCmdUI* pCmdUI);
afx_msg void OnCreateObstacleCircle();
afx_msg void OnUpdateCreateObstacleCircle(CCmdUI* pCmdUI);
afx_msg void OnCreateObstacleRect();
afx_msg void OnUpdateCreateObstacleRect(CCmdUI* pCmdUI);
afx_msg void OnCreateObstaclePolygon();
afx_msg void OnUpdateCreateObstaclePolygon(CCmdUI* pCmdUI);
afx_msg void OnCreateBoxPolygon();
afx_msg void OnUpdateCreateBoxPolygon(CCmdUI* pCmdUI);
afx_msg void OnCreateBoxRect();
afx_msg void OnUpdateCreateBoxRect(CCmdUI* pCmdUI);
afx_msg void OnCreateLabmate();
afx_msg void OnUpdateCreateLabmate(CCmdUI* pCmdUI);
afx_msg void OnCreateBoxCircle();
afx_msg void OnUpdateCreateBoxCircle(CCmdUI* pCmdUI);
afx_msg void OnInitTimer();
afx_msg void OnUpdateInitTimer(CCmdUI* pCmdUI);
afx_msg void OnFinishTimer();
afx_msg void OnUpdateFinishTimer(CCmdUI* pCmdUI);
afx_msg void OnApplications100();
afx_msg void OnDrawpath();
afx_msg void OnUpdateDrawpath(CCmdUI* pCmdUI);
afx_msg void OnCreaterobotholonomic();
afx_msg void OnUpdateCreaterobotholonomic(CCmdUI* pCmdUI);
afx_msg void OnCreaterobotnonholonomic();
afx_msg void OnUpdateCreaterobotnonholonomic(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -