Merge pull request #637 from erwincoumans/master

avoid API change in URDFImporterInterface
This commit is contained in:
erwincoumans
2016-05-24 09:48:13 -07:00
11 changed files with 30 additions and 12 deletions

View File

@@ -1,4 +0,0 @@
cd `dirname $0`
./premake4_osx xcode4

7
build_and_run_cmake.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
rm CMakeCache.txt
mkdir build_cmake
cd build_cmake
cmake ..
make -j12
examples/ExampleBrowser/App_ExampleBrowser

7
build_and_run_premake.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
cd build3
./premake4_linux64 gmake
./premake4_osx gmake
cd gmake
make -j12
../../bin/App_BulletExampleBrowser_gmake_x64_release

View File

@@ -1,6 +1,7 @@
rem premake4 --with-pe vs2010
rem premake4 --bullet2demos vs2010
cd build3
premake4 --targetdir="../bin" vs2010
rem premake4 --targetdir="../server2bin" vs2010
rem cd vs2010
@@ -13,6 +14,6 @@ rem cd vs2010
rem rename 0_Bullet3Solution.sln 0_client.sln
rem cd ..
rem rename vs2010 vs2010_client
start vs2010/0_Bullet3Solution.sln
pause
pause

View File

@@ -10,5 +10,5 @@ newmtl cube
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka cube.tga
map_Kd cube_diffuse.tga
map_Kd floor_diffuse.tga

View File

@@ -95,7 +95,7 @@ int b3ImportMeshUtility::loadAndRegisterMeshFromFile(const std::string& fileName
b3ImportMeshData meshData;
if (b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(fileName, meshData))
{
int textureIndex = 0;
int textureIndex = -1;
if (meshData.m_textureImage)
{

View File

@@ -585,7 +585,7 @@ btCollisionShape* convertURDFToCollisionShape(const UrdfCollision* collision, co
return shape;
}
int BulletURDFImporter::convertLinkVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, class btCollisionShape* colShape) const
int BulletURDFImporter::convertLinkVisualShapes2(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, class btCollisionShape* colShape) const
{
int graphicsIndex = -1;

View File

@@ -46,7 +46,7 @@ public:
virtual bool getRootTransformInWorld(btTransform& rootTransformInWorld) const;
virtual int convertLinkVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame, class btCollisionShape* colShape) const;
virtual int convertLinkVisualShapes2(int linkIndex, const char* pathPrefix, const btTransform& inertialFrame, class btCollisionShape* colShape) const;
///todo(erwincoumans) refactor this convertLinkCollisionShapes/memory allocation

View File

@@ -213,7 +213,7 @@ void ConvertURDF2BulletInternal(const URDFImporterInterface& u2b, MultiBodyCreat
btCompoundShape* compoundShape = u2b.convertLinkCollisionShapes(urdfLinkIndex,pathPrefix,localInertialFrame);
int graphicsIndex = u2b.convertLinkVisualShapes(urdfLinkIndex,pathPrefix,localInertialFrame,compoundShape);
int graphicsIndex = u2b.convertLinkVisualShapes2(urdfLinkIndex,pathPrefix,localInertialFrame,compoundShape);
if (compoundShape)

View File

@@ -42,7 +42,9 @@ public:
virtual bool getRootTransformInWorld(btTransform& rootTransformInWorld) const =0;
///quick hack: need to rethink the API/dependencies of this
virtual int convertLinkVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& inertialFrame, class btCollisionShape* colShape) const = 0;
virtual int convertLinkVisualShapes(int linkIndex, const char* pathPrefix, const btTransform& inertialFrame) const { return -1;}
virtual int convertLinkVisualShapes2(int linkIndex, const char* pathPrefix, const btTransform& inertialFrame, class btCollisionShape* colShape) const = 0;
virtual class btCompoundShape* convertLinkCollisionShapes(int linkIndex, const char* pathPrefix, const btTransform& localInertiaFrame) const = 0;
};

5
xcode.command Executable file
View File

@@ -0,0 +1,5 @@
cd `dirname $0`
cd build3
./premake4_osx xcode4
open xcode4/0_Bullet3Solution.xcworkspace