add Obj and STL import demo, work on URDF import

This commit is contained in:
Erwin Coumans
2014-08-03 13:45:05 -07:00
parent 35fa146f13
commit ae98ffe218
18 changed files with 1196 additions and 71 deletions

View File

@@ -16,6 +16,8 @@
#include "../../Demos/CcdPhysicsDemo/CcdPhysicsSetup.h"
#include "../../Demos/ConstraintDemo/ConstraintPhysicsSetup.h"
#include "../ImportURDFDemo/ImportURDFSetup.h"
#include "../ImportObjDemo/ImportObjSetup.h"
#include "../ImportSTLDemo/ImportSTLSetup.h"
static BulletDemoInterface* MyCcdPhysicsDemoCreateFunc(SimpleOpenGL3App* app)
@@ -41,6 +43,17 @@ static BulletDemoInterface* MyImportUrdfCreateFunc(SimpleOpenGL3App* app)
CommonPhysicsSetup* physicsSetup = new ImportUrdfDemo();
return new BasicDemo(app, physicsSetup);
}
static BulletDemoInterface* MyImportObjCreateFunc(SimpleOpenGL3App* app)
{
CommonPhysicsSetup* physicsSetup = new ImportObjDemo(app);
return new BasicDemo(app, physicsSetup);
}
static BulletDemoInterface* MyImportSTLCreateFunc(SimpleOpenGL3App* app)
{
CommonPhysicsSetup* physicsSetup = new ImportSTLDemo(app);
return new BasicDemo(app, physicsSetup);
}
struct BulletDemoEntry
{
@@ -60,7 +73,11 @@ static BulletDemoEntry allDemos[]=
{ 1, "CcdDemo", MyCcdPhysicsDemoCreateFunc },
{ 1, "Kinematic", MyKinematicObjectCreateFunc },
{ 1, "Constraints", MyConstraintCreateFunc },
{0,"File Formats", 0},
//@todo(erwincoumans) { 1, "bullet", MyImportSTLCreateFunc},
{ 1, "Wavefront Obj", MyImportObjCreateFunc},
{ 1, "URDF", MyImportUrdfCreateFunc },
{ 1, "STL", MyImportSTLCreateFunc},
/* {1,"ChainDemo",ChainDemo::MyCreateFunc},
// {0, "Stress tests", 0 },