From 74fca2418b945e4160b1d830b474a5e00e829b35 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Tue, 9 Oct 2018 08:00:31 -0700 Subject: [PATCH] fix egl plugin build, with fileIO changes --- data/multibody.bullet | Bin 16836 -> 16836 bytes .../eglRendererVisualShapeConverter.cpp | 12 ++++++------ .../eglRendererVisualShapeConverter.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/multibody.bullet b/data/multibody.bullet index 67a198781354dc6fe4b50f2eacea68bf035f1e9b..0283009946cd6302966b345ef4522b929709667e 100644 GIT binary patch delta 404 zcmX@o%y^`kaRUz{2LnTcJp&L-7GYd4`2>@|0{eIyX6mQEajuE5~FhW~q9RCS=T!)Bn|evlf7c*CZ&v@{^QVH1cC6G!N0Xn^?&C~eCC(u}MS z$llDraKH{E1_G&*ok14czX&?IS8?}rJD}nAvu4f&$~V|g{=l5#IYD0*91I1XpFe|w z0|pwQ41sW4uzbR69WXs%iwc-#Fox&@Dg#>(I609~fASd?4h~~eJp%(Bh04u$SS;8W L-)t7;UT+2fVf0=? delta 175 zcmX@o%y^`kaRUz{M^cG%er`d2>0}Yc1(ORH1tuS1lmOB^ELG-;_LCDC)wqlqpg>`= z4ATP^o5!;DlbB5m@)m diff --git a/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.cpp b/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.cpp index 70548b301..367fb3b50 100644 --- a/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.cpp +++ b/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.cpp @@ -270,7 +270,7 @@ void EGLRendererVisualShapeConverter::setLightSpecularCoeff(float specularCoeff) } ///todo: merge into single file with TinyRendererVisualShapeConverter -static void convertURDFToVisualShape2(const UrdfShape* visual, const char* urdfPathPrefix, const btTransform& visualTransform, btAlignedObjectArray& verticesOut, btAlignedObjectArray& indicesOut, btAlignedObjectArray& texturesOut, b3VisualShapeData& visualShapeOut) +static void convertURDFToVisualShape2(const UrdfShape* visual, const char* urdfPathPrefix, const btTransform& visualTransform, btAlignedObjectArray& verticesOut, btAlignedObjectArray& indicesOut, btAlignedObjectArray& texturesOut, b3VisualShapeData& visualShapeOut, struct CommonFileIOInterface* fileIO) { visualShapeOut.m_visualGeometryType = visual->m_geometry.m_type; visualShapeOut.m_dimensions[0] = 0; @@ -410,7 +410,7 @@ static void convertURDFToVisualShape2(const UrdfShape* visual, const char* urdfP { //glmesh = LoadMeshFromObj(fullPath,visualPathPrefix); b3ImportMeshData meshData; - if (b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(visual->m_geometry.m_meshFileName, meshData)) + if (b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(visual->m_geometry.m_meshFileName, meshData, fileIO)) { if (meshData.m_textureImage1) { @@ -426,7 +426,7 @@ static void convertURDFToVisualShape2(const UrdfShape* visual, const char* urdfP break; } case UrdfGeometry::FILE_STL: - glmesh = LoadMeshFromSTL(visual->m_geometry.m_meshFileName.c_str()); + glmesh = LoadMeshFromSTL(visual->m_geometry.m_meshFileName.c_str(), fileIO); break; case UrdfGeometry::FILE_COLLADA: { @@ -442,7 +442,7 @@ static void convertURDFToVisualShape2(const UrdfShape* visual, const char* urdfP visualShapeInstances, upAxisTrans, unitMeterScaling, - upAxis); + upAxis, fileIO); glmesh = new GLInstanceGraphicsShape; // int index = 0; @@ -633,7 +633,7 @@ static btVector4 sColors[4] = void EGLRendererVisualShapeConverter::convertVisualShapes( int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, const UrdfLink* linkPtr, const UrdfModel* model, - int collisionObjectUniqueId, int bodyUniqueId) + int collisionObjectUniqueId, int bodyUniqueId, struct CommonFileIOInterface* fileIO) { btAssert(linkPtr); // TODO: remove if (not doing it now, because diff will be 50+ lines) if (linkPtr) @@ -752,7 +752,7 @@ void EGLRendererVisualShapeConverter::convertVisualShapes( visualShape.m_rgbaColor[3] = rgbaColor[3]; { B3_PROFILE("convertURDFToVisualShape2"); - convertURDFToVisualShape2(vis, pathPrefix, localInertiaFrame.inverse() * childTrans, vertices, indices, textures, visualShape); + convertURDFToVisualShape2(vis, pathPrefix, localInertiaFrame.inverse() * childTrans, vertices, indices, textures, visualShape, fileIO); } m_data->m_visualShapes.push_back(visualShape); diff --git a/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.h b/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.h index d0aefb68a..1d74a8a09 100644 --- a/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.h +++ b/examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.h @@ -11,7 +11,7 @@ struct EGLRendererVisualShapeConverter : public UrdfRenderingInterface virtual ~EGLRendererVisualShapeConverter(); - virtual void convertVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, const UrdfLink* linkPtr, const UrdfModel* model, int shapeUid, int objectIndex); + virtual void convertVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, const UrdfLink* linkPtr, const UrdfModel* model, int collisionObjectUniqueId, int bodyUniqueId, struct CommonFileIOInterface* fileIO); virtual int getNumVisualShapes(int bodyUniqueId);