MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / loadSdf

Method loadSdf

examples/SharedMemory/PhysicsServerCommandProcessor.cpp:3616–3638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3614}
3615
3616bool PhysicsServerCommandProcessor::loadSdf(const char* fileName, char* bufferServerToClient, int bufferSizeInBytes, bool useMultiBody, int flags, btScalar globalScaling)
3617{
3618 btAssert(m_data->m_dynamicsWorld);
3619 if (!m_data->m_dynamicsWorld)
3620 {
3621 b3Error("loadSdf: No valid m_dynamicsWorld");
3622 return false;
3623 }
3624
3625 m_data->m_sdfRecentLoadedBodies.clear();
3626 CommonFileIOInterface* fileIO = m_data->m_pluginManager.getFileIOInterface();
3627 BulletURDFImporter u2b(m_data->m_guiHelper, m_data->m_pluginManager.getRenderInterface(), fileIO, globalScaling, flags);
3628 u2b.setEnableTinyRenderer(m_data->m_enableTinyRenderer);
3629
3630 bool forceFixedBase = false;
3631 bool loadOk = u2b.loadSDF(fileName, forceFixedBase);
3632
3633 if (loadOk)
3634 {
3635 processImportedObjects(fileName, bufferServerToClient, bufferSizeInBytes, useMultiBody, flags, u2b);
3636 }
3637 return loadOk;
3638}
3639
3640bool PhysicsServerCommandProcessor::loadUrdf(const char* fileName, const btVector3& pos, const btQuaternion& orn,
3641 bool useMultiBody, bool useFixedBase, int* bodyUniqueIdPtr, char* bufferServerToClient, int bufferSizeInBytes, int orgFlags, btScalar globalScaling)

Callers

nothing calls this directly

Calls 5

clearMethod · 0.45
getFileIOInterfaceMethod · 0.45
getRenderInterfaceMethod · 0.45
setEnableTinyRendererMethod · 0.45
loadSDFMethod · 0.45

Tested by

no test coverage detected