Added a basic COLLADA .dae importer mainly to support URDF loading (URDF can refer to COLLADA .dae or STL .stl for mesh support)
It is fairly limited, only supports loading <geometry> with triangulated meshes, no material loading I will extend this with COLLADA Physics support.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include "../ImportURDFDemo/ImportURDFSetup.h"
|
||||
#include "../ImportObjDemo/ImportObjSetup.h"
|
||||
#include "../ImportSTLDemo/ImportSTLSetup.h"
|
||||
#include "../ImportColladaDemo/ImportColladaSetup.h"
|
||||
|
||||
#include "../../Demos/SerializeDemo/SerializeSetup.h"
|
||||
#include "../bullet2/MultiBodyDemo/TestJointTorqueSetup.h"
|
||||
#include "../bullet2/CollisionDetection/SupportFuncDemo.h"
|
||||
@@ -72,6 +74,12 @@ static BulletDemoInterface* MyImportSTLCreateFunc(CommonGraphicsApp* app)
|
||||
return new BasicDemo(app, physicsSetup);
|
||||
}
|
||||
|
||||
static BulletDemoInterface* MyImportColladaCreateFunc(CommonGraphicsApp* app)
|
||||
{
|
||||
CommonPhysicsSetup* physicsSetup = new ImportColladaSetup(app);
|
||||
return new BasicDemo(app, physicsSetup);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +100,6 @@ static BulletDemoEntry allDemos[]=
|
||||
//{"emptydemo",EmptyBulletDemo::MyCreateFunc},
|
||||
{0,"API Demos", 0},
|
||||
|
||||
|
||||
{1,"BasicDemo",BasicDemo::MyCreateFunc},
|
||||
{ 1, "CcdDemo", MyCcdPhysicsDemoCreateFunc },
|
||||
{ 1, "Kinematic", MyKinematicObjectCreateFunc },
|
||||
@@ -100,11 +107,12 @@ static BulletDemoEntry allDemos[]=
|
||||
{ 1, "LuaDemo",LuaDemoCreateFunc},
|
||||
|
||||
{0,"File Formats", 0},
|
||||
//@todo(erwincoumans) { 1, "bullet", MyImportSTLCreateFunc},
|
||||
|
||||
{ 1, ".bullet",MySerializeCreateFunc},
|
||||
{ 1, "Wavefront Obj", MyImportObjCreateFunc},
|
||||
{ 1, "URDF", MyImportUrdfCreateFunc },
|
||||
{ 1, "STL", MyImportSTLCreateFunc},
|
||||
{ 1, "COLLADA", MyImportColladaCreateFunc},
|
||||
|
||||
/* {1,"ChainDemo",ChainDemo::MyCreateFunc},
|
||||
// {0, "Stress tests", 0 },
|
||||
|
||||
@@ -43,6 +43,8 @@ SET(App_AllBullet2Demos_SRCS
|
||||
../ImportURDFDemo/ImportURDFSetup.h
|
||||
../ImportObjDemo/ImportObjSetup.cpp
|
||||
../ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp
|
||||
../ImportColladaDemo/ImportColladaSetup.cpp
|
||||
../ImportColladaDemo/LoadMeshFromCollada.cpp
|
||||
../ImportSTLDemo/ImportSTLSetup.cpp
|
||||
../Wavefront/tiny_obj_loader.cpp
|
||||
../Wavefront/tiny_obj_loader.h
|
||||
|
||||
@@ -57,7 +57,9 @@
|
||||
"../../Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp",
|
||||
"../../Extras/Serialize/BulletWorldImporter/btWorldImporter.cpp",
|
||||
"../bullet2/ConstraintDemo/ConstraintPhysicsSetup.cpp",
|
||||
"../bullet2/ConstraintDemo/ConstraintPhysicsSetup.h",
|
||||
"../bullet2/ConstraintDemo/ConstraintPhysicsSetup.h",
|
||||
"../ImportColladaDemo/LoadMeshFromCollada.cpp",
|
||||
"../ImportColladaDemo/ImportColladaSetup.cpp",
|
||||
"../ImportURDFDemo/ImportURDFSetup.cpp",
|
||||
"../ImportObjDemo/ImportObjSetup.cpp",
|
||||
"../ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp",
|
||||
|
||||
Reference in New Issue
Block a user