mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-11-17 13:16:06 +00:00
use white as default undefined color instead of the googley colors.
use loadURDF(..., flags = pybullet.URDF_GOOGLEY_UNDEFINED_COLORS) to get Googley colors when colors are undefined.
This commit is contained in:
@@ -931,6 +931,7 @@ enum eURDF_Flags
|
||||
URDF_IGNORE_VISUAL_SHAPES = 1 << 20,
|
||||
URDF_IGNORE_COLLISION_SHAPES = 1 << 21,
|
||||
URDF_PRINT_URDF_INFO = 1 << 22,
|
||||
URDF_GOOGLEY_UNDEFINED_COLORS = 1 << 23,
|
||||
};
|
||||
|
||||
enum eUrdfGeomTypes //sync with UrdfParser UrdfGeomTypes
|
||||
|
||||
+2
-2
@@ -646,7 +646,7 @@ static void convertURDFToVisualShape(const UrdfShape* visual, const char* urdfPa
|
||||
delete glmesh;
|
||||
}
|
||||
|
||||
static btVector4 sColors[4] =
|
||||
static btVector4 sGoogleyColors[4] =
|
||||
{
|
||||
btVector4(60. / 256., 186. / 256., 84. / 256., 1),
|
||||
btVector4(244. / 256., 194. / 256., 13. / 256., 1),
|
||||
@@ -705,7 +705,7 @@ int TinyRendererVisualShapeConverter::convertVisualShapes(
|
||||
colorIndex = 0;
|
||||
colorIndex &= 3;
|
||||
btVector4 color;
|
||||
color = sColors[colorIndex];
|
||||
color = (m_data->m_flags & URDF_GOOGLEY_UNDEFINED_COLORS) ? sGoogleyColors[colorIndex] : btVector4(1, 1, 1, 1);
|
||||
float rgbaColor[4] = {(float)color[0], (float)color[1], (float)color[2], (float)color[3]};
|
||||
//if (colObj->getCollisionShape()->getShapeType()==STATIC_PLANE_PROXYTYPE)
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user