Add pybullet.configureDebugVisualizer(rgbBackground=[red,green,blue]) (each component a float in the range [0,1])

This is an alternative to passing options="--background_color_red=red --background_color_green=green --background_color_blue=blue" in the connect method.
This commit is contained in:
erwin coumans
2021-05-06 18:08:22 -07:00
parent 8e85dedaa9
commit e952ac6f63
13 changed files with 73 additions and 7 deletions

View File

@@ -6064,6 +6064,21 @@ B3_SHARED_API void b3ConfigureOpenGLVisualizerSetLightPosition(b3SharedMemoryCom
}
}
B3_SHARED_API void b3ConfigureOpenGLVisualizerSetLightRgbBackground(b3SharedMemoryCommandHandle commandHandle, const float rgbBackground[3])
{
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*)commandHandle;
b3Assert(command);
b3Assert(command->m_type == CMD_CONFIGURE_OPENGL_VISUALIZER);
if (command->m_type == CMD_CONFIGURE_OPENGL_VISUALIZER)
{
command->m_updateFlags |= COV_SET_RGB_BACKGROUND;
command->m_configureOpenGLVisualizerArguments.m_rgbBackground[0] = rgbBackground[0];
command->m_configureOpenGLVisualizerArguments.m_rgbBackground[1] = rgbBackground[1];
command->m_configureOpenGLVisualizerArguments.m_rgbBackground[2] = rgbBackground[2];
}
}
B3_SHARED_API void b3ConfigureOpenGLVisualizerSetShadowMapResolution(b3SharedMemoryCommandHandle commandHandle, int shadowMapResolution)
{
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*)commandHandle;