create premake/cmake file for Bullet/Extras/obj2sdf

add missing 1.sdf for Bullet/data/kitchens/1.sdf
add support for getting keyboard events (pybullet.getKeyboardEvents and b3RobotSimulatorClientAPI::getKeyboardEvents)
This commit is contained in:
Erwin Coumans
2017-03-02 12:33:22 -08:00
parent 255b21a776
commit 34fc2fb589
29 changed files with 7317 additions and 40 deletions

View File

@@ -65,10 +65,15 @@ int getSpecialKeyFromVirtualKeycode(int virtualKeyCode)
{
return virtualKeyCode+32;//todo: fix the ascii A vs a input
}
if (virtualKeyCode >= '0' && virtualKeyCode <= '9')
{
return virtualKeyCode;
}
switch (virtualKeyCode)
{
case VK_RETURN: {keycode = B3G_RETURN; break; };
case VK_ESCAPE: {keycode = B3G_ESCAPE; break; };
case VK_F1: {keycode = B3G_F1; break;}
case VK_F2: {keycode = B3G_F2; break;}
case VK_F3: {keycode = B3G_F3; break;}
@@ -217,6 +222,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
case WM_CHAR:
{
#if 0
//skip 'enter' key, it is processed in WM_KEYUP/WM_KEYDOWN
int keycode = getAsciiCodeFromVirtualKeycode(wParam);
if (keycode < 0)
@@ -227,6 +233,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
(*sData->m_keyboardCallback)(wParam, state);
}
}
#endif
return 0;
}
case WM_SYSKEYDOWN: