add support to btHingeConstraint to set/get ERP, example use:
hinge->setParam(BT_CONSTRAINT_ERP,0.5); btScalar erp = hinge->getParam(BT_CONSTRAINT_ERP); Also, preliminary support for status bar messages in demo framework.
This commit is contained in:
@@ -356,6 +356,11 @@ void selectDemo(int demoIndex)
|
||||
sCurrentDemo = (*allDemos[demoIndex].m_createFunc)(app);
|
||||
if (sCurrentDemo)
|
||||
{
|
||||
if (gui)
|
||||
{
|
||||
bool isLeft = true;
|
||||
gui->setStatusBarMessage("Status: OK", false);
|
||||
}
|
||||
sCurrentDemo->initPhysics();
|
||||
}
|
||||
}
|
||||
@@ -382,6 +387,28 @@ void MyComboBoxCallback(int comboId, const char* item)
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MyStatusBarPrintf(const char* msg)
|
||||
{
|
||||
printf("b3Printf: %s\n", msg);
|
||||
if (gui)
|
||||
{
|
||||
bool isLeft = true;
|
||||
gui->setStatusBarMessage(msg,isLeft);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MyStatusBarWarning(const char* msg)
|
||||
{
|
||||
printf("Warning: %s\n", msg);
|
||||
if (gui)
|
||||
{
|
||||
bool isLeft = false;
|
||||
gui->setStatusBarMessage(msg,isLeft);
|
||||
}
|
||||
}
|
||||
|
||||
struct MyMenuItemHander :public Gwen::Event::Handler
|
||||
{
|
||||
int m_buttonId;
|
||||
@@ -530,6 +557,10 @@ int main(int argc, char* argv[])
|
||||
app->m_renderer->setCameraPitch(0);
|
||||
app->m_renderer->setCameraTargetPosition(0,0,0);
|
||||
|
||||
b3SetCustomWarningMessageFunc(MyStatusBarWarning);
|
||||
b3SetCustomPrintfFunc(MyStatusBarPrintf);
|
||||
|
||||
|
||||
/*
|
||||
SimpleOpenGL3App* app = new SimpleOpenGL3App("AllBullet2Demos",width,height);
|
||||
s_instancingRenderer->setCameraDistance(13);
|
||||
|
||||
Reference in New Issue
Block a user