Esempio n. 1
0
void MainWindow::OnRobotSimGoTo(wxCommandEvent& WXUNUSED(event))
{
	wxTreeItemId itemId = tree->GetSelection();
	NodeTree *itemData = itemId.IsOk() ? (NodeTree *) tree->GetItemData(itemId):NULL;
	if(itemData->pointer.robotsim)
	{
		if(managewindow->CheckWindowsExist(itemData))
		{
			RobotSimGoTo* robotSimGoTarget;
			robotSimGoTarget = new RobotSimGoTo(this,wxID_ANY,wxT("GO TO TARGET"),itemData);
			robotSimGoTarget->getTitle()->SetLabel(itemData->getNameTree());
			robotSimGoTarget->setManageWindow(managewindow);
			robotSimGoTarget->Show(true);	
			wxLogStatus(wxT("Robot Sim Go To Target"));
		}
		
	}
}
Esempio n. 2
0
void MainWindow::OnRobotSimPanelCtrl(wxCommandEvent& WXUNUSED(event))
{
	wxTreeItemId itemId = tree->GetSelection();
	NodeTree *itemData = itemId.IsOk() ? (NodeTree *) tree->GetItemData(itemId):NULL;
	if(itemData->pointer.robotsim)
	{
		if(managewindow->CheckWindowsExist(itemData))
		{
			RobotSimPanel* robotSimCtrl;
			robotSimCtrl = new RobotSimPanel(this,wxID_ANY,wxT("Move all Joints"),itemData);
			robotSimCtrl->getTitle()->SetLabel(wxString(itemData->getNameTree()));
			robotSimCtrl->setManageWindow(managewindow);
			robotSimCtrl->Show(true);	
			wxLogStatus(wxT("Robot Sim Panel"));
		}
		
	}
}
Esempio n. 3
0
void MainWindow::OnSimpleJointMove( wxCommandEvent& WXUNUSED(event))
{
	wxTreeItemId itemId = tree->GetSelection();
	NodeTree *itemData = itemId.IsOk() ? (NodeTree *) tree->GetItemData(itemId):NULL;

	wxTreeItemId parentItem=tree->GetItemParent(itemId);
	NodeTree *parentData = parentItem.IsOk() ? (NodeTree *) tree->GetItemData(parentItem):NULL;

	if(itemData->pointer.simplejoint)
	{
		if(managewindow->CheckWindowsExist(itemData))
		{
			RobotSimPanel* robotSimCtrl;
			robotSimCtrl = new RobotSimPanel(this,wxID_ANY,wxT ("Move only one Joint"),itemData,parentData,true);
			robotSimCtrl->getTitle()->SetLabel(wxString(itemData->getNameTree()));
			robotSimCtrl->setManageWindow(managewindow);
			robotSimCtrl->Show(true);	
			wxLogStatus(wxT("Robot Sim Panel/Joint"));
		}
		
	}
}