mods for compatibility with older compiler
This commit is contained in:
@@ -330,13 +330,12 @@ void GraspDeformable::initPhysics()
|
|||||||
// b3FileUtils::findFile("bread.vtk", relative_path, 1024);
|
// b3FileUtils::findFile("bread.vtk", relative_path, 1024);
|
||||||
// b3FileUtils::findFile("ditto.vtk", relative_path, 1024);
|
// b3FileUtils::findFile("ditto.vtk", relative_path, 1024);
|
||||||
// b3FileUtils::findFile("boot.vtk", relative_path, 1024);
|
// b3FileUtils::findFile("boot.vtk", relative_path, 1024);
|
||||||
std::string path(relative_path);
|
|
||||||
// btSoftBody* psb = btSoftBodyHelpers::CreateFromTetGenData(getDeformableDynamicsWorld()->getWorldInfo(),
|
// btSoftBody* psb = btSoftBodyHelpers::CreateFromTetGenData(getDeformableDynamicsWorld()->getWorldInfo(),
|
||||||
// TetraCube::getElements(),
|
// TetraCube::getElements(),
|
||||||
// 0,
|
// 0,
|
||||||
// TetraCube::getNodes(),
|
// TetraCube::getNodes(),
|
||||||
// false, true, true);
|
// false, true, true);
|
||||||
btSoftBody* psb = btSoftBodyHelpers::CreateFromVtkFile(getDeformableDynamicsWorld()->getWorldInfo(), path);
|
btSoftBody* psb = btSoftBodyHelpers::CreateFromVtkFile(getDeformableDynamicsWorld()->getWorldInfo(), relative_path);
|
||||||
|
|
||||||
// psb->scale(btVector3(30, 30, 30)); // for banana
|
// psb->scale(btVector3(30, 30, 30)); // for banana
|
||||||
psb->scale(btVector3(.25, .25, .25));
|
psb->scale(btVector3(.25, .25, .25));
|
||||||
|
|||||||
@@ -746,9 +746,9 @@ btSoftBody* btSoftBodyHelpers::CreatePatch(btSoftBodyWorldInfo& worldInfo, const
|
|||||||
{
|
{
|
||||||
const btScalar tx = ix / (btScalar)(rx - 1);
|
const btScalar tx = ix / (btScalar)(rx - 1);
|
||||||
btScalar pert = perturbation * btScalar(rand())/RAND_MAX;
|
btScalar pert = perturbation * btScalar(rand())/RAND_MAX;
|
||||||
btVector4 temp1 = py1;
|
btVector3 temp1 = py1;
|
||||||
temp1.setY(py1.getY() + pert);
|
temp1.setY(py1.getY() + pert);
|
||||||
btVector4 temp = py0;
|
btVector3 temp = py0;
|
||||||
pert = perturbation * btScalar(rand())/RAND_MAX;
|
pert = perturbation * btScalar(rand())/RAND_MAX;
|
||||||
temp.setY(py0.getY() + pert);
|
temp.setY(py0.getY() + pert);
|
||||||
x[IDX(ix, iy)] = lerp(temp, temp1, tx);
|
x[IDX(ix, iy)] = lerp(temp, temp1, tx);
|
||||||
@@ -1239,7 +1239,7 @@ if(face&&face[0])
|
|||||||
return (psb);
|
return (psb);
|
||||||
}
|
}
|
||||||
|
|
||||||
btSoftBody* btSoftBodyHelpers::CreateFromVtkFile(btSoftBodyWorldInfo& worldInfo, const std::string& vtk_file)
|
btSoftBody* btSoftBodyHelpers::CreateFromVtkFile(btSoftBodyWorldInfo& worldInfo, const char* vtk_file)
|
||||||
{
|
{
|
||||||
std::ifstream fs;
|
std::ifstream fs;
|
||||||
fs.open(vtk_file);
|
fs.open(vtk_file);
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ struct btSoftBodyHelpers
|
|||||||
bool bfacelinks,
|
bool bfacelinks,
|
||||||
bool btetralinks,
|
bool btetralinks,
|
||||||
bool bfacesfromtetras);
|
bool bfacesfromtetras);
|
||||||
static btSoftBody* CreateFromVtkFile(btSoftBodyWorldInfo& worldInfo, const std::string& vtk_file);
|
static btSoftBody* CreateFromVtkFile(btSoftBodyWorldInfo& worldInfo, const char* vtk_file);
|
||||||
static btSoftBody* CreateFromVtkFile(btSoftBodyWorldInfo& worldInfo, std::istream& in);
|
static btSoftBody* CreateFromVtkFile(btSoftBodyWorldInfo& worldInfo, std::istream& in);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user