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

Method unloadPlugin

examples/SharedMemory/b3PluginManager.cpp:341–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341void b3PluginManager::unloadPlugin(int pluginUniqueId)
342{
343 b3PluginHandle* plugin = m_data->m_plugins.getHandle(pluginUniqueId);
344 if (plugin)
345 {
346 if (plugin->m_processNotificationsFunc)
347 {
348 m_data->m_numNotificationPlugins--;
349 }
350 b3PluginContext context = {0};
351 context.m_userPointer = plugin->m_userPointer;
352 context.m_physClient = (b3PhysicsClientHandle)m_data->m_physicsDirect;
353
354 if (plugin->m_isInitialized)
355 {
356 plugin->m_exitFunc(&context);
357 plugin->m_userPointer = 0;
358 plugin->m_returnData = 0;
359 plugin->m_isInitialized = false;
360 }
361 m_data->m_pluginMap.remove(plugin->GetMapKey());
362 m_data->m_plugins.freeHandle(pluginUniqueId);
363 }
364}
365
366void b3PluginManager::tickPlugins(double timeStep, b3PluginManagerTickMode tickMode)
367{

Callers 3

eglRenderTest.pyFile · 0.80
processCustomCommandMethod · 0.80
processCustomCommandMethod · 0.80

Calls 4

GetMapKeyMethod · 0.80
getHandleMethod · 0.45
removeMethod · 0.45
freeHandleMethod · 0.45

Tested by

no test coverage detected