mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-06-08 08:13:55 +00:00
Merge branch 'master' of github.com:bulletphysics/bullet3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -889,6 +889,7 @@ public:
|
||||
|
||||
int saveStateToMemory();
|
||||
void restoreStateFromMemory(int stateId);
|
||||
void removeState(int stateUniqueId);
|
||||
|
||||
int getAPIVersion() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user