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

Method submitClientCommand

examples/SharedMemory/PhysicsDirect.cpp:1410–1462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1408}
1409
1410bool PhysicsDirect::submitClientCommand(const struct SharedMemoryCommand& command)
1411{
1412 if (command.m_type == CMD_CUSTOM_COMMAND)
1413 {
1414 return processCustomCommand(command);
1415 }
1416 if (command.m_type == CMD_REQUEST_DEBUG_LINES)
1417 {
1418 return processDebugLines(command);
1419 }
1420
1421 if (command.m_type == CMD_REQUEST_CAMERA_IMAGE_DATA)
1422 {
1423 return processCamera(command);
1424 }
1425 if (command.m_type == CMD_REQUEST_CONTACT_POINT_INFORMATION)
1426 {
1427 return processContactPointData(command);
1428 }
1429
1430 if (command.m_type == CMD_REQUEST_VISUAL_SHAPE_INFO)
1431 {
1432 return processVisualShapeData(command);
1433 }
1434 if (command.m_type == CMD_REQUEST_AABB_OVERLAP)
1435 {
1436 return processOverlappingObjects(command);
1437 }
1438
1439 if (command.m_type == CMD_REQUEST_MESH_DATA)
1440 {
1441 return processMeshData(command);
1442 }
1443 if (command.m_type == CMD_REQUEST_BODY_INFO)
1444 {
1445 return processRequestBodyInfo(command, m_data->m_serverStatus);
1446 }
1447
1448 bool hasStatus = m_data->m_commandProcessor->processCommand(command, m_data->m_serverStatus, &m_data->m_bulletStreamDataServerToClient[0], SHARED_MEMORY_MAX_STREAM_CHUNK_SIZE);
1449 m_data->m_hasStatus = hasStatus;
1450
1451 if (m_data->m_ownsCommandProcessor)
1452 {
1453 m_data->m_commandProcessor->reportNotifications();
1454 }
1455 /*if (hasStatus)
1456 {
1457 postProcessStatus(m_data->m_serverStatus);
1458 m_data->m_hasStatus = false;
1459 }
1460 */
1461 return hasStatus;
1462}
1463
1464int PhysicsDirect::getNumBodies() const
1465{

Callers 2

stepSimulationMethod · 0.45
b3SubmitClientCommandFunction · 0.45

Calls 2

processCommandMethod · 0.45
reportNotificationsMethod · 0.45

Tested by

no test coverage detected