Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bulletphysics/bullet3
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Jul 18, 2020
2 parents 6af885a + b67bf28 commit 1685aae
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/SharedMemory/PhysicsServerCommandProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,12 @@ PhysicsServerCommandProcessor::~PhysicsServerCommandProcessor()
if (m_data->m_threadPool)
delete m_data->m_threadPool;

for (int i = 0; i < m_data->m_savedStates.size(); i++)
{
delete m_data->m_savedStates[i].m_bulletFile;
delete m_data->m_savedStates[i].m_serializer;
}

delete m_data;
}

Expand Down
21 changes: 21 additions & 0 deletions examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,27 @@ void b3RobotSimulatorClientAPI_NoDirect::restoreStateFromMemory(int stateId)
statusType = b3GetStatusType(statusHandle);
}

void b3RobotSimulatorClientAPI_NoDirect::removeState(int stateUniqueId)
{
b3PhysicsClientHandle sm = m_data->m_physicsClientHandle;
if (sm == 0)
{
b3Warning("Not connected");
return;
}

if (stateUniqueId >= 0)
{
b3SharedMemoryStatusHandle statusHandle;
int statusType;
if (b3CanSubmitCommand(sm))
{
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, b3InitRemoveStateCommand(sm, stateUniqueId));
statusType = b3GetStatusType(statusHandle);
}
}
}

bool b3RobotSimulatorClientAPI_NoDirect::getVisualShapeData(int bodyUniqueId, b3VisualShapeInformation& visualShapeInfo)
{
b3PhysicsClientHandle sm = m_data->m_physicsClientHandle;
Expand Down
1 change: 1 addition & 0 deletions examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ class b3RobotSimulatorClientAPI_NoDirect

int saveStateToMemory();
void restoreStateFromMemory(int stateId);
void removeState(int stateUniqueId);

int getAPIVersion() const
{
Expand Down

0 comments on commit 1685aae

Please sign in to comment.