More work on the C/C++ plugin system for pybullet/C-API:

Add preTickPluginCallback/postTickPluginCallback
User pointer for b3PluginContext, to store objects (class/struct instances)
Pass ints and floats as optional argument for plugin executePluginCommand
This commit is contained in:
erwincoumans
2017-09-23 18:05:23 -07:00
parent 5373ca39e1
commit 8e496036c6
13 changed files with 380 additions and 97 deletions

View File

@@ -8,9 +8,16 @@ extern "C"
{
#endif
B3_SHARED_API int initPlugin();
B3_SHARED_API void exitPlugin();
B3_SHARED_API int executePluginCommand(struct b3PluginContext* context);
//initPlugin, exitPlugin and executePluginCommand are required, otherwise plugin won't load
B3_SHARED_API int initPlugin(struct b3PluginContext* context);
B3_SHARED_API void exitPlugin(struct b3PluginContext* context);
B3_SHARED_API int executePluginCommand(struct b3PluginContext* context, const struct b3PluginArguments* arguments);
//preTickPluginCallback and postTickPluginCallback are optional.
B3_SHARED_API int preTickPluginCallback(struct b3PluginContext* context);
B3_SHARED_API int postTickPluginCallback(struct b3PluginContext* context);
#ifdef __cplusplus
};