mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-25 18:15:38 +00:00
Allow to compile pybullet using btDiscreteDynamicsWorld (no multibodies and no deformables), this allows to create Jacobian and Mass matrix (and A=J*M-1*J_transpose) with MLCP solvers
Add examples/pybullet/gym/pybullet_utils/readwriteurdf.py, this allows to read a URDF and write the URDF with more reasonable inertia tensors (based on mass and collision volumes)
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#include "GwenParameterInterface.h"
|
||||
#include "gwenInternalData.h"
|
||||
#include <cstring>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define safe_printf _snprintf
|
||||
#else
|
||||
#define safe_printf snprintf
|
||||
#endif
|
||||
struct MyButtonEventHandler : public Gwen::Event::Handler
|
||||
{
|
||||
Gwen::Controls::Button* m_buttonControl;
|
||||
@@ -85,7 +89,7 @@ struct MySliderEventHandler : public Gwen::Event::Handler
|
||||
if (m_showValue)
|
||||
{
|
||||
char txt[1024];
|
||||
snprintf(txt, sizeof(txt), "%s : %.3f", m_variableName, val);
|
||||
safe_printf(txt, sizeof(txt), "%s : %.3f", m_variableName, val);
|
||||
m_label->SetText(txt);
|
||||
}
|
||||
}
|
||||
@@ -231,7 +235,7 @@ void GwenParameterInterface::registerSliderFloatParameter(SliderParams& params)
|
||||
}
|
||||
pSlider->SetValue(*params.m_paramValuePointer); //dimensions[i] );
|
||||
char labelName[1024];
|
||||
snprintf(labelName, sizeof(labelName), "%s", params.m_name); //axisNames[0]);
|
||||
safe_printf(labelName, sizeof(labelName), "%s", params.m_name); //axisNames[0]);
|
||||
MySliderEventHandler<btScalar>* handler = new MySliderEventHandler<btScalar>(labelName, label, pSlider, params.m_paramValuePointer, params.m_callback, params.m_userPointer);
|
||||
handler->m_showValue = params.m_showValues;
|
||||
m_paramInternalData->m_sliderEventHandlers.push_back(handler);
|
||||
|
||||
Reference in New Issue
Block a user