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

@@ -620,6 +620,19 @@ enum eStateLoggingFlags
STATE_LOG_JOINT_TORQUES = STATE_LOG_JOINT_MOTOR_TORQUES+STATE_LOG_JOINT_USER_TORQUES,
};
#define B3_MAX_PLUGIN_ARG_SIZE 128
#define B3_MAX_PLUGIN_ARG_TEXT_LEN 1024
struct b3PluginArguments
{
char m_text[B3_MAX_PLUGIN_ARG_TEXT_LEN];
int m_numInts;
int m_ints[B3_MAX_PLUGIN_ARG_SIZE];
int m_numFloats;
int m_floats[B3_MAX_PLUGIN_ARG_SIZE];
};
#endif//SHARED_MEMORY_PUBLIC_H