Add filename as an argument in the softbody loading function.

This commit is contained in:
yunfeibai
2018-01-07 19:56:46 -08:00
parent d077bdec07
commit d3bc98e245
7 changed files with 41 additions and 18 deletions

View File

@@ -1143,7 +1143,7 @@ void b3RobotSimulatorClientAPI::submitProfileTiming(const std::string& profileN
b3SubmitClientCommandAndWaitStatus(m_data->m_physicsClientHandle, commandHandle);
}
void b3RobotSimulatorClientAPI::loadSoftBody(double scale, double mass, double collisionMargin)
void b3RobotSimulatorClientAPI::loadSoftBody(const std::string& fileName, double scale, double mass, double collisionMargin)
{
if (!isConnected())
{
@@ -1151,7 +1151,7 @@ void b3RobotSimulatorClientAPI::loadSoftBody(double scale, double mass, double c
return;
}
b3SharedMemoryCommandHandle command = b3LoadSoftBodyCommandInit(m_data->m_physicsClientHandle);
b3SharedMemoryCommandHandle command = b3LoadSoftBodyCommandInit(m_data->m_physicsClientHandle, fileName.c_str());
b3LoadSoftBodySetScale(command, scale);
b3LoadSoftBodySetMass(command, mass);
b3LoadSoftBodySetCollisionMargin(command, collisionMargin);

View File

@@ -229,7 +229,7 @@ public:
//////////////// INTERNAL
void loadSoftBody(double scale, double mass, double collisionMargin);
void loadSoftBody(const std::string& fileName, double scale, double mass, double collisionMargin);
//setGuiHelper is only used when embedded in existing example browser
void setGuiHelper(struct GUIHelperInterface* guiHelper);