Merge pull request #1927 from erwincoumans/master

backward compatibility fix
This commit is contained in:
erwincoumans
2018-10-09 21:45:48 -07:00
committed by GitHub
4 changed files with 11 additions and 3 deletions

View File

@@ -173,7 +173,7 @@ bool BulletURDFImporter::loadURDF(const char* fileName, bool forceFixedBase)
}
}
while (line);
m_data->m_fileIO->fileClose(fileId);
#if 0
std::fstream xml_file(relativeFileName, std::fstream::in);
while (xml_file.good())

View File

@@ -19,7 +19,7 @@ class BulletURDFImporter : public URDFImporterInterface
struct BulletURDFInternalData* m_data;
public:
BulletURDFImporter(struct GUIHelperInterface* helper, UrdfRenderingInterface* customConverter, struct CommonFileIOInterface* fileIO,double globalScaling, int flags);
BulletURDFImporter(struct GUIHelperInterface* helper, UrdfRenderingInterface* customConverter, struct CommonFileIOInterface* fileIO=0,double globalScaling=1, int flags=0);
virtual ~BulletURDFImporter();

View File

@@ -14,6 +14,8 @@
#include "LinearMath/btVector3.h"
#include "Bullet3Common/b3Logging.h"
#include "../CommonInterfaces/CommonFileIOInterface.h"
#include "../Utils/b3BulletDefaultFileIO.h"
struct DepthShader : public IShader
{
Model* m_model;
@@ -370,6 +372,12 @@ void TinyRenderObjectData::registerMesh2(btAlignedObjectArray<btVector3>& vertic
void TinyRenderObjectData::createCube(float halfExtentsX, float halfExtentsY, float halfExtentsZ, CommonFileIOInterface* fileIO)
{
b3BulletDefaultFileIO defaultFileIO;
if (fileIO==0)
{
fileIO = &defaultFileIO;
}
m_model = new Model();
char relativeFileName[1024];

View File

@@ -42,7 +42,7 @@ struct TinyRenderObjectData
virtual ~TinyRenderObjectData();
void loadModel(const char* fileName, struct CommonFileIOInterface* fileIO);
void createCube(float HalfExtentsX, float HalfExtentsY, float HalfExtentsZ, struct CommonFileIOInterface* fileIO);
void createCube(float HalfExtentsX, float HalfExtentsY, float HalfExtentsZ, struct CommonFileIOInterface* fileIO=0);
void registerMeshShape(const float* vertices, int numVertices, const int* indices, int numIndices, const float rgbaColor[4],
unsigned char* textureImage = 0, int textureWidth = 0, int textureHeight = 0);