allow to disable/enable default keyboard shortcuts ('w', 'd' 's' etc) and default mouse picking
pybullet.getMouseEvents / b3RequestMouseEventsCommandInit
This commit is contained in:
@@ -3208,6 +3208,31 @@ void b3GetKeyboardEventsData(b3PhysicsClientHandle physClient, struct b3Keyboard
|
||||
}
|
||||
}
|
||||
|
||||
b3SharedMemoryCommandHandle b3RequestMouseEventsCommandInit(b3PhysicsClientHandle physClient)
|
||||
{
|
||||
PhysicsClient* cl = (PhysicsClient*)physClient;
|
||||
b3Assert(cl);
|
||||
b3Assert(cl->canSubmitCommand());
|
||||
struct SharedMemoryCommand* command = cl->getAvailableSharedMemoryCommand();
|
||||
b3Assert(command);
|
||||
|
||||
command->m_type = CMD_REQUEST_MOUSE_EVENTS_DATA;
|
||||
command->m_updateFlags = 0;
|
||||
|
||||
return (b3SharedMemoryCommandHandle)command;
|
||||
}
|
||||
|
||||
void b3GetMouseEventsData(b3PhysicsClientHandle physClient, struct b3MouseEventsData* mouseEventsData)
|
||||
{
|
||||
PhysicsClient* cl = (PhysicsClient* ) physClient;
|
||||
if (cl)
|
||||
{
|
||||
cl->getCachedMouseEvents(mouseEventsData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
b3SharedMemoryCommandHandle b3ProfileTimingCommandInit(b3PhysicsClientHandle physClient, const char* name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user