implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.
pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor Bug fixes in b3ResourcePath::findResourcePath resolution. add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium minor fixes to obj2sdf
This commit is contained in:
@@ -123,6 +123,7 @@ enum MultiThreadedGUIHelperCommunicationEnums
|
||||
eGUIDumpFramesToVideo,
|
||||
eGUIHelperRemoveGraphicsInstance,
|
||||
eGUIHelperChangeGraphicsInstanceRGBAColor,
|
||||
eGUIHelperChangeGraphicsInstanceSpecularColor,
|
||||
eGUIHelperSetVisualizerFlag,
|
||||
};
|
||||
|
||||
@@ -918,6 +919,19 @@ public:
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
double m_specularColor[3];
|
||||
int m_graphicsInstanceChangeSpecular;
|
||||
virtual void changeSpecularColor(int instanceUid, const double specularColor[3])
|
||||
{
|
||||
m_graphicsInstanceChangeSpecular = instanceUid;
|
||||
m_specularColor[0] = specularColor[0];
|
||||
m_specularColor[1] = specularColor[1];
|
||||
m_specularColor[2] = specularColor[2];
|
||||
m_cs->lock();
|
||||
m_cs->setSharedParam(1,eGUIHelperChangeGraphicsInstanceSpecularColor);
|
||||
workerThreadWait();
|
||||
}
|
||||
|
||||
virtual Common2dCanvasInterface* get2dCanvasInterface()
|
||||
{
|
||||
return 0;
|
||||
@@ -1734,6 +1748,13 @@ void PhysicsServerExample::updateGraphics()
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
}
|
||||
case eGUIHelperChangeGraphicsInstanceSpecularColor:
|
||||
{
|
||||
m_multiThreadedHelper->m_childGuiHelper->changeSpecularColor(m_multiThreadedHelper->m_graphicsInstanceChangeSpecular,m_multiThreadedHelper->m_specularColor);
|
||||
m_multiThreadedHelper->mainThreadRelease();
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
case eGUIHelperCopyCameraImageData:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user