MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / ~PhysicsClientExample

Method ~PhysicsClientExample

examples/SharedMemory/PhysicsClientExample.cpp:557–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557PhysicsClientExample::~PhysicsClientExample()
558{
559 if (m_physicsClientHandle)
560 {
561 b3ProcessServerStatus(m_physicsClientHandle);
562 b3DisconnectSharedMemory(m_physicsClientHandle);
563 }
564
565 if (m_options == eCLIENTEXAMPLE_SERVER)
566 {
567 bool deInitializeSharedMemory = true;
568 m_physicsServer.disconnectSharedMemory(deInitializeSharedMemory);
569 }
570
571 if (m_canvas)
572 {
573 if (m_canvasRGBIndex >= 0)
574 m_canvas->destroyCanvas(m_canvasRGBIndex);
575 if (m_canvasDepthIndex >= 0)
576 m_canvas->destroyCanvas(m_canvasDepthIndex);
577 if (m_canvasSegMaskIndex >= 0)
578 m_canvas->destroyCanvas(m_canvasSegMaskIndex);
579 }
580
581 b3Printf("~PhysicsClientExample\n");
582}
583
584void PhysicsClientExample::createButton(const char* name, int buttonId, bool isTrigger)
585{

Callers

nothing calls this directly

Calls 3

b3DisconnectSharedMemoryFunction · 0.85
destroyCanvasMethod · 0.45

Tested by

no test coverage detected