get mesh data api

fix compile

fix typo
This commit is contained in:
Chuyuan Fu
2019-06-17 17:32:01 -07:00
parent 1061b3d816
commit 229e87c3c9
14 changed files with 268 additions and 5 deletions

View File

@@ -1210,6 +1210,33 @@ B3_SHARED_API int b3CreateCollisionShapeAddSphere(b3SharedMemoryCommandHandle co
return -1;
}
B3_SHARED_API b3SharedMemoryCommandHandle b3GetMeshDataCommandInit(b3PhysicsClientHandle physClient, int bodyUniqueId){
PhysicsClient* cl = (PhysicsClient*)physClient;
b3Assert(cl);
b3Assert(cl->canSubmitCommand());
if (cl)
{
struct SharedMemoryCommand* command = cl->getAvailableSharedMemoryCommand();
b3Assert(command);
command->m_type = CMD_REQUEST_MESH_DATA;
command->m_updateFlags = 0;
command->m_requestMeshDataArgs.m_bodyUniqueId = bodyUniqueId;
return (b3SharedMemoryCommandHandle)command;
}
return 0;
}
B3_SHARED_API void b3GetMeshData(b3PhysicsClientHandle physClient, struct b3MeshData* meshData){
PhysicsClient* cl = (PhysicsClient*)physClient;
if (cl)
{
cl->getCachedMeshData(meshData);
}
}
B3_SHARED_API int b3CreateVisualShapeAddSphere(b3SharedMemoryCommandHandle commandHandle, double radius)
{
return b3CreateCollisionShapeAddSphere(commandHandle, radius);