mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 06:00:12 +00:00
Merge pull request #3 from fuchuyuan/pathfix
update example to use absolute path
This commit is contained in:
commit
457ed0e735
@ -28,6 +28,7 @@
|
|||||||
#include "../Importers/ImportURDFDemo/BulletUrdfImporter.h"
|
#include "../Importers/ImportURDFDemo/BulletUrdfImporter.h"
|
||||||
#include "../Importers/ImportURDFDemo/MyMultiBodyCreator.h"
|
#include "../Importers/ImportURDFDemo/MyMultiBodyCreator.h"
|
||||||
#include "../Importers/ImportURDFDemo/URDF2Bullet.h"
|
#include "../Importers/ImportURDFDemo/URDF2Bullet.h"
|
||||||
|
#include "../Utils/b3BulletDefaultFileIO.h"
|
||||||
#include "../CommonInterfaces/CommonMultiBodyBase.h"
|
#include "../CommonInterfaces/CommonMultiBodyBase.h"
|
||||||
#include "../CommonInterfaces/CommonGraphicsAppInterface.h"
|
#include "../CommonInterfaces/CommonGraphicsAppInterface.h"
|
||||||
#include "../CommonInterfaces/CommonParameterInterface.h"
|
#include "../CommonInterfaces/CommonParameterInterface.h"
|
||||||
@ -270,25 +271,26 @@ void GraspDeformable::initPhysics()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create a soft block
|
// create a soft block
|
||||||
if(1)
|
if (1)
|
||||||
{
|
{
|
||||||
char relative_path[1024];
|
char absolute_path[1024];
|
||||||
// b3FileUtils::findFile("banana.vtk", relative_path, 1024);
|
b3BulletDefaultFileIO fileio;
|
||||||
// b3FileUtils::findFile("ball.vtk", relative_path, 1024);
|
fileio.findResourcePath("ditto.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("deformable_crumpled_napkin_sim.vtk", relative_path, 1024);
|
// fileio.findResourcePath("banana.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("single_tet.vtk", relative_path, 1024);
|
// fileio.findResourcePath("ball.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("tube.vtk", relative_path, 1024);
|
// fileio.findResourcePath("deformable_crumpled_napkin_sim.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("torus.vtk", relative_path, 1024);
|
// fileio.findResourcePath("single_tet.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("paper_roll.vtk", relative_path, 1024);
|
// fileio.findResourcePath("tube.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("bread.vtk", relative_path, 1024);
|
// fileio.findResourcePath("torus.vtk", absolute_path, 1024);
|
||||||
b3FileUtils::findFile("ditto.vtk", relative_path, 1024);
|
// fileio.findResourcePath("paper_roll.vtk", absolute_path, 1024);
|
||||||
// b3FileUtils::findFile("boot.vtk", relative_path, 1024);
|
// fileio.findResourcePath("bread.vtk", absolute_path, 1024);
|
||||||
// btSoftBody* psb = btSoftBodyHelpers::CreateFromTetGenData(getDeformableDynamicsWorld()->getWorldInfo(),
|
// fileio.findResourcePath("boot.vtk", absolute_path, 1024);
|
||||||
// TetraCube::getElements(),
|
// btSoftBody* psb = btSoftBodyHelpers::CreateFromTetGenData(getDeformableDynamicsWorld()->getWorldInfo(),
|
||||||
// 0,
|
// TetraCube::getElements(),
|
||||||
// TetraCube::getNodes(),
|
// 0,
|
||||||
// false, true, true);
|
// TetraCube::getNodes(),
|
||||||
btSoftBody* psb = btSoftBodyHelpers::CreateFromVtkFile(getDeformableDynamicsWorld()->getWorldInfo(), relative_path);
|
// false, true, true);
|
||||||
|
btSoftBody* psb = btSoftBodyHelpers::CreateFromVtkFile(getDeformableDynamicsWorld()->getWorldInfo(), absolute_path);
|
||||||
|
|
||||||
// psb->scale(btVector3(30, 30, 30)); // for banana
|
// psb->scale(btVector3(30, 30, 30)); // for banana
|
||||||
psb->scale(btVector3(.7, .7, .7));
|
psb->scale(btVector3(.7, .7, .7));
|
||||||
|
Loading…
Reference in New Issue
Block a user