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:
@@ -4244,10 +4244,13 @@ static PyObject* pybullet_changeVisualShape(PyObject* self, PyObject* args, PyOb
|
||||
int statusType;
|
||||
int physicsClientId = 0;
|
||||
PyObject* rgbaColorObj = 0;
|
||||
PyObject* specularColorObj = 0;
|
||||
|
||||
|
||||
|
||||
b3PhysicsClientHandle sm = 0;
|
||||
static char* kwlist[] = {"objectUniqueId", "linkIndex", "shapeIndex", "textureUniqueId", "rgbaColor", "physicsClientId", NULL};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "ii|iiOi", kwlist, &objectUniqueId, &jointIndex, &shapeIndex, &textureUniqueId, &rgbaColorObj, &physicsClientId))
|
||||
static char* kwlist[] = {"objectUniqueId", "linkIndex", "shapeIndex", "textureUniqueId", "rgbaColor", "specularColor", "physicsClientId", NULL};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "ii|iiOOi", kwlist, &objectUniqueId, &jointIndex, &shapeIndex, &textureUniqueId, &rgbaColorObj, &specularColorObj, &physicsClientId))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -4261,6 +4264,14 @@ static PyObject* pybullet_changeVisualShape(PyObject* self, PyObject* args, PyOb
|
||||
{
|
||||
commandHandle = b3InitUpdateVisualShape(sm, objectUniqueId, jointIndex, shapeIndex, textureUniqueId);
|
||||
|
||||
if (specularColorObj)
|
||||
{
|
||||
double specularColor[3] = {1,1,1};
|
||||
pybullet_internalSetVectord(specularColorObj, specularColor);
|
||||
b3UpdateVisualShapeSpecularColor(commandHandle,specularColor);
|
||||
|
||||
}
|
||||
|
||||
if (rgbaColorObj)
|
||||
{
|
||||
double rgbaColor[4] = {1,1,1,1};
|
||||
|
||||
Reference in New Issue
Block a user