allow to use the useMultiBody argument for loadMJCF command

note that for dynamic and static objects (without joints) it is best to set useMultiBody=False
This commit is contained in:
erwin coumans
2021-04-19 20:37:26 -07:00
parent 910c20334f
commit 84a63cf221
3 changed files with 22 additions and 3 deletions

View File

@@ -260,6 +260,17 @@ B3_SHARED_API void b3LoadMJCFCommandSetFlags(b3SharedMemoryCommandHandle command
}
}
B3_SHARED_API void b3LoadMJCFCommandSetUseMultiBody(b3SharedMemoryCommandHandle commandHandle, int useMultiBody)
{
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*)commandHandle;
b3Assert(command->m_type == CMD_LOAD_MJCF);
if (command->m_type == CMD_LOAD_MJCF)
{
command->m_updateFlags |= URDF_ARGS_USE_MULTIBODY;
command->m_mjcfArguments.m_useMultiBody = useMultiBody;
}
}
B3_SHARED_API b3SharedMemoryCommandHandle b3LoadSoftBodyCommandInit(b3PhysicsClientHandle physClient, const char* fileName)
{
PhysicsClient* cl = (PhysicsClient*)physClient;