#include <SimRobotDocument.h>
Definition at line 24 of file SimRobotDocument.h.
CSimRobotDocument::CSimRobotDocument | ( | ) |
Definition at line 33 of file SimRobotDocument.cpp.
References FALSE, m_bRunning, m_bStep, m_pController, m_pSim, m_sStatusMessage, and pSimulatorObjectViewerDlgBar.
CSimRobotDocument::~CSimRobotDocument | ( | ) | [virtual] |
Definition at line 43 of file SimRobotDocument.cpp.
References m_pController, m_pSim, and CONTROLLER::OnDestroy().
void CSimRobotDocument::activateSwitch | ( | SensorData::sensors | sensor, | |
bool | activate = true | |||
) | [inline] |
Activates or diactivates a certain switch on the robot.
sensor | The switch. Allowed values are: headBack, headFront, mouth, chin, and back. | |
activate | Decides whether to activate or deactivate the switch. |
Definition at line 72 of file SimRobotDocument.h.
References CONTROLLER::activateSwitch(), and m_pController.
Referenced by CSimulatedRobotsToolBar::handleCommand().
void CSimRobotDocument::Compile | ( | ) |
Definition at line 64 of file SimRobotDocument.cpp.
References CONNECTION::CreateController(), ErrorMessage, GenerateSceneFile(), SIM3DElement::GetName(), SIMULATION::GetObject(), m_filePath, m_pController, CONNECTION::m_pNext, CONNECTION::m_pScene, m_pSim, m_sStatusMessage, pStart, sim3DErrorOutputOff(), sim3DErrorOutputOn(), and sim3DTakeLastError().
Referenced by OnSimReset().
void CSimRobotDocument::GenerateSceneFile | ( | const CString & | from, | |
const CString & | to | |||
) | [private] |
Definition at line 112 of file SimRobotDocument.cpp.
References CRobotControlSimulatedRobots::activeWithImages, CRobotControlSimulatedRobots::activeWithoutImages, getSimulatedRobots(), CRobotControlSimulatedRobots::getState(), and CRobotControlSimulatedRobots::passive.
Referenced by Compile().
CONTROLLER* CSimRobotDocument::GetController | ( | ) | [inline] |
int CSimRobotDocument::GetNumberFromWindow | ( | CWnd * | pWnd | ) | [private] |
STRING CSimRobotDocument::GetSelectedObject | ( | ) |
Definition at line 143 of file SimRobotDocument.cpp.
SIMULATION* CSimRobotDocument::GetSimulation | ( | ) | [inline] |
Definition at line 54 of file SimRobotDocument.h.
References m_pSim.
Referenced by CONTROLLER::CONTROLLER(), and CSimulatorObjectViewerDlgBar::DoDraw().
CView* CSimRobotDocument::GetViewFromNumber | ( | int | n | ) | [private] |
BOOL CSimRobotDocument::IsRunning | ( | ) |
Definition at line 189 of file SimRobotDocument.cpp.
References m_bRunning.
Referenced by CSimulatedRobotsToolBar::handleCommand(), and CRobotControlSimulatedRobots::stop().
bool CSimRobotDocument::isSwitchActivated | ( | SensorData::sensors | sensor | ) | const [inline] |
The function checks whether a certain switch is activated.
sensor | The switch to check. |
Definition at line 80 of file SimRobotDocument.h.
References CONTROLLER::isSwitchActivated(), and m_pController.
Referenced by CSimulatedRobotsToolBar::updateUI().
void CSimRobotDocument::NewSection | ( | const STRING & | sSection | ) |
void CSimRobotDocument::OnBeginDrag | ( | const CLICKINFO & | ) |
Definition at line 308 of file SimRobotDocument.cpp.
References m_pController, and CONTROLLER::OnBeginDrag().
Referenced by CSimulatorObjectViewerDlgBar::OnLButtonDown().
void CSimRobotDocument::OnDrag | ( | const CLICKINFO & | ) |
Definition at line 314 of file SimRobotDocument.cpp.
References m_pController, and CONTROLLER::OnDrag().
Referenced by CSimulatorObjectViewerDlgBar::OnMouseMove().
void CSimRobotDocument::OnEndDrag | ( | const CLICKINFO & | ) |
Definition at line 320 of file SimRobotDocument.cpp.
References m_pController, and CONTROLLER::OnEndDrag().
Referenced by CSimulatorObjectViewerDlgBar::OnDestroy(), and CSimulatorObjectViewerDlgBar::OnLButtonUp().
void CSimRobotDocument::OnIdle | ( | ) |
Definition at line 244 of file SimRobotDocument.cpp.
References SIMULATION::DoTimeStep(), FALSE, m_bRunning, m_bStep, m_pController, m_pSim, m_sStatusMessage, pSimulatorObjectViewerDlgBar, CSimulatorObjectViewerDlgBar::Repaint(), CONTROLLER::SetActors(), and sim3DTakeLastError().
Referenced by CRobotControlSimulatedRobots::onIdle().
void CSimRobotDocument::OnMouseClick | ( | const CLICKINFO & | ) |
Definition at line 296 of file SimRobotDocument.cpp.
References m_pController, and CONTROLLER::OnMouseClick().
Referenced by CSimulatorObjectViewerDlgBar::OnLButtonDown().
void CSimRobotDocument::OnMouseDoubleClick | ( | const CLICKINFO & | ) |
Definition at line 302 of file SimRobotDocument.cpp.
References m_pController, and CONTROLLER::OnMouseDoubleClick().
Referenced by CSimulatorObjectViewerDlgBar::OnLButtonDblClk().
void CSimRobotDocument::OnSimReset | ( | ) |
Definition at line 194 of file SimRobotDocument.cpp.
References BOOL(), Compile(), FALSE, m_bRunning, m_pController, m_pSim, CONTROLLER::OnDestroy(), and sim3DTakeLastError().
Referenced by CRobotControlSimulatedRobots::create(), CRobotControlSimulatedRobots::OnSimReset(), OnSimStart(), and OnSimStep().
void CSimRobotDocument::OnSimStart | ( | ) |
Definition at line 219 of file SimRobotDocument.cpp.
References FALSE, m_bRunning, m_pSim, OnSimReset(), and TRUE.
Referenced by CRobotControlSimulatedRobots::OnSimStart(), and CRobotControlSimulatedRobots::stop().
void CSimRobotDocument::OnSimStep | ( | ) |
Definition at line 233 of file SimRobotDocument.cpp.
References m_bRunning, m_bStep, m_pSim, OnSimReset(), and TRUE.
Referenced by CRobotControlSimulatedRobots::OnSimStep().
int CSimRobotDocument::ReadInt | ( | const STRING & | sName | ) |
Definition at line 173 of file SimRobotDocument.cpp.
References m_sSection.
Referenced by ReadInt().
void CSimRobotDocument::SetFilePath | ( | CString | path | ) | [inline] |
Definition at line 53 of file SimRobotDocument.h.
References m_filePath.
Referenced by CRobotControlSimulatedRobots::create().
void CSimRobotDocument::UpdateFrameCounts | ( | ) | [private, virtual] |
Definition at line 292 of file SimRobotDocument.cpp.
void CSimRobotDocument::WriteInt | ( | const STRING & | sName, | |
int | nValue | |||
) |
Definition at line 161 of file SimRobotDocument.cpp.
References m_sSection.
Referenced by WriteInt().
BOOL CSimRobotDocument::m_bRunning [private] |
Definition at line 27 of file SimRobotDocument.h.
Referenced by CSimRobotDocument(), IsRunning(), OnIdle(), OnSimReset(), OnSimStart(), and OnSimStep().
BOOL CSimRobotDocument::m_bStep [private] |
Definition at line 27 of file SimRobotDocument.h.
Referenced by CSimRobotDocument(), OnIdle(), and OnSimStep().
CString CSimRobotDocument::m_filePath [private] |
CMapStringToPtr CSimRobotDocument::m_map [private] |
CONTROLLER* CSimRobotDocument::m_pController [private] |
Definition at line 29 of file SimRobotDocument.h.
Referenced by activateSwitch(), Compile(), CSimRobotDocument(), GetController(), isSwitchActivated(), OnBeginDrag(), OnDrag(), OnEndDrag(), OnIdle(), OnMouseClick(), OnMouseDoubleClick(), OnSimReset(), and ~CSimRobotDocument().
SIMULATION* CSimRobotDocument::m_pSim [private] |
Definition at line 30 of file SimRobotDocument.h.
Referenced by Compile(), CSimRobotDocument(), GetSimulation(), OnIdle(), OnSimReset(), OnSimStart(), OnSimStep(), and ~CSimRobotDocument().
STRING CSimRobotDocument::m_sSection [private] |
Definition at line 32 of file SimRobotDocument.h.
Referenced by NewSection(), ReadString(), and WriteString().
CString CSimRobotDocument::m_sStatusMessage [private] |
Definition at line 31 of file SimRobotDocument.h.
Referenced by Compile(), CSimRobotDocument(), and OnIdle().
Definition at line 64 of file SimRobotDocument.h.
Referenced by CSimRobotDocument(), CSimulatorObjectViewerDlgBar::CSimulatorObjectViewerDlgBar(), OnIdle(), and CRobotControlSimulatedRobots::OnSimReset().