2017-09-23 16:25:00 +00:00
|
|
|
#ifndef B3_PLUGIN_CONTEXT_H
|
|
|
|
#define B3_PLUGIN_CONTEXT_H
|
|
|
|
|
|
|
|
#include "../PhysicsClientC_API.h"
|
|
|
|
|
|
|
|
struct b3PluginContext
|
|
|
|
{
|
2018-09-23 21:17:31 +00:00
|
|
|
b3PhysicsClientHandle m_physClient;
|
2017-09-24 01:05:23 +00:00
|
|
|
|
|
|
|
//plugin can modify the m_userPointer to store persistent object pointer (class or struct instance etc)
|
|
|
|
void* m_userPointer;
|
2018-09-23 21:17:31 +00:00
|
|
|
|
2020-10-07 03:19:39 +00:00
|
|
|
//plugin can provide additional return data for executePluginCommand.
|
|
|
|
//Lifetime of this m_returnData pointer is minimum of
|
|
|
|
//next call to the next executePluginCommand or plugin termination.
|
|
|
|
b3UserDataValue* m_returnData;
|
|
|
|
|
2017-10-03 22:00:52 +00:00
|
|
|
const struct b3VRControllerEvent* m_vrControllerEvents;
|
|
|
|
int m_numVRControllerEvents;
|
|
|
|
const struct b3KeyboardEvent* m_keyEvents;
|
|
|
|
int m_numKeyEvents;
|
|
|
|
const struct b3MouseEvent* m_mouseEvents;
|
|
|
|
int m_numMouseEvents;
|
2018-07-24 12:12:16 +00:00
|
|
|
const struct b3Notification* m_notifications;
|
|
|
|
int m_numNotifications;
|
2018-09-23 21:17:31 +00:00
|
|
|
|
2018-09-06 00:58:14 +00:00
|
|
|
//only used for grpc/processClientCommands
|
|
|
|
class PhysicsCommandProcessorInterface* m_rpcCommandProcessorInterface;
|
2017-09-23 16:25:00 +00:00
|
|
|
};
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
#endif //B3_PLUGIN_CONTEXT_H
|