added body parameter to loadPhy()
git-svn-id: svn://anubis/misc/OdeWorld@156 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
fcdbce9829
commit
6a6ad94c71
11
OdeWorld.cc
11
OdeWorld.cc
@ -80,10 +80,9 @@ void OdeWorld::worldStep()
|
||||
}
|
||||
|
||||
vector<dGeomID> OdeWorld::loadPhy(const std::string & path,
|
||||
bool static_data)
|
||||
dBodyID * body, bool static_data)
|
||||
{
|
||||
vector<dGeomID> ret;
|
||||
dBodyID body = 0;
|
||||
|
||||
ifstream ifs(path.c_str());
|
||||
if (ifs.is_open())
|
||||
@ -123,19 +122,19 @@ vector<dGeomID> OdeWorld::loadPhy(const std::string & path,
|
||||
}
|
||||
if (type == "cube")
|
||||
{
|
||||
ret.push_back(addCube(name, static_data, &body, args));
|
||||
ret.push_back(addCube(name, static_data, body, args));
|
||||
}
|
||||
else if (type == "sphere")
|
||||
{
|
||||
ret.push_back(addSphere(name, static_data, &body, args));
|
||||
ret.push_back(addSphere(name, static_data, body, args));
|
||||
}
|
||||
else if (type == "cylinder")
|
||||
{
|
||||
ret.push_back(addCylinder(name, static_data, &body, args));
|
||||
ret.push_back(addCylinder(name, static_data, body, args));
|
||||
}
|
||||
else if (type == "plane")
|
||||
{
|
||||
ret.push_back(addPlane(name, static_data, &body, args));
|
||||
ret.push_back(addPlane(name, static_data, body, args));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ class OdeWorld
|
||||
}
|
||||
void worldStep();
|
||||
std::vector<dGeomID> loadPhy(const std::string & path,
|
||||
bool static_data = false);
|
||||
dBodyID * body, bool static_data = false);
|
||||
dGeomID addCube(const std::string & name, bool static_data,
|
||||
dBodyID * body, const std::vector<float> args);
|
||||
dGeomID addSphere(const std::string & name, bool static_data,
|
||||
|
Loading…
x
Reference in New Issue
Block a user