Added keyboardUpCallback,
Thanks to Erik Weitnauer http://code.google.com/p/bullet/issues/detail?id=215#c1 Fixed ccdMotionThreshold (wrongly squared input value) Thanks to Mark Carlson for the report/fix. http://code.google.com/p/bullet/issues/detail?id=216#c1
This commit is contained in:
@@ -197,7 +197,9 @@ public:
|
|||||||
///callback methods by glut
|
///callback methods by glut
|
||||||
|
|
||||||
virtual void keyboardCallback(unsigned char key, int x, int y);
|
virtual void keyboardCallback(unsigned char key, int x, int y);
|
||||||
|
|
||||||
|
virtual void keyboardUpCallback(unsigned char key, int x, int y) {}
|
||||||
|
|
||||||
virtual void specialKeyboard(int key, int x, int y){}
|
virtual void specialKeyboard(int key, int x, int y){}
|
||||||
|
|
||||||
virtual void specialKeyboardUp(int key, int x, int y){}
|
virtual void specialKeyboardUp(int key, int x, int y){}
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ static void glutKeyboardCallback(unsigned char key, int x, int y)
|
|||||||
gDemoApplication->keyboardCallback(key,x,y);
|
gDemoApplication->keyboardCallback(key,x,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void glutKeyboardUpCallback(unsigned char key, int x, int y)
|
||||||
|
{
|
||||||
|
gDemoApplication->keyboardUpCallback(key,x,y);
|
||||||
|
}
|
||||||
|
|
||||||
static void glutSpecialKeyboardCallback(int key, int x, int y)
|
static void glutSpecialKeyboardCallback(int key, int x, int y)
|
||||||
{
|
{
|
||||||
gDemoApplication->specialKeyboard(key,x,y);
|
gDemoApplication->specialKeyboard(key,x,y);
|
||||||
@@ -82,6 +87,7 @@ int glutmain(int argc, char **argv,int width,int height,const char* title,DemoAp
|
|||||||
gDemoApplication->myinit();
|
gDemoApplication->myinit();
|
||||||
|
|
||||||
glutKeyboardFunc(glutKeyboardCallback);
|
glutKeyboardFunc(glutKeyboardCallback);
|
||||||
|
glutKeyboardUpFunc(glutKeyboardUpCallback);
|
||||||
glutSpecialFunc(glutSpecialKeyboardCallback);
|
glutSpecialFunc(glutSpecialKeyboardCallback);
|
||||||
glutSpecialUpFunc(glutSpecialKeyboardUpCallback);
|
glutSpecialUpFunc(glutSpecialKeyboardUpCallback);
|
||||||
|
|
||||||
@@ -98,4 +104,4 @@ int glutmain(int argc, char **argv,int width,int height,const char* title,DemoAp
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //_WINDOWS
|
#endif //_WINDOWS
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ public:
|
|||||||
/// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
|
/// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
|
||||||
void setCcdMotionThreshold(btScalar ccdMotionThreshold)
|
void setCcdMotionThreshold(btScalar ccdMotionThreshold)
|
||||||
{
|
{
|
||||||
m_ccdMotionThreshold = ccdMotionThreshold*ccdMotionThreshold;
|
m_ccdMotionThreshold = ccdMotionThreshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
///users can point to their objects, userPointer is not used by Bullet
|
///users can point to their objects, userPointer is not used by Bullet
|
||||||
|
|||||||
Reference in New Issue
Block a user