small progress towards shared memory C-api and test.c.

This commit is contained in:
erwincoumans
2015-07-30 23:22:44 -07:00
parent 26531f3fbc
commit 19c5be5646
11 changed files with 346 additions and 256 deletions

View File

@@ -6,12 +6,13 @@
#define B3_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
B3_DECLARE_HANDLE(b3PhysicsClientHandle);
B3_DECLARE_HANDLE(b3PhysicsRobotHandle);
#ifdef __cplusplus
extern "C" {
#endif
b3PhysicsClientHandle b3ConnectSharedMemory(int memKey, int allowSharedMemoryInitialization);
b3PhysicsClientHandle b3ConnectSharedMemory(int allowSharedMemoryInitialization);
void b3DisconnectSharedMemory(b3PhysicsClientHandle physClient);
@@ -23,10 +24,21 @@ int b3SubmitClientCommand(b3PhysicsClientHandle physClient, struct SharedMemoryC
int b3GetNumPoweredJoints(b3PhysicsClientHandle physClient);
void b3GetPoweredJointInfo(int linkIndex, struct PoweredJointInfo* info);
void b3GetPoweredJointInfo(b3PhysicsClientHandle physClient, int linkIndex, struct PoweredJointInfo* info);
int b3InitPhysicsParamCommand(struct SharedMemoryCommand* command);
int b3PhysicsParamSetGravity(struct SharedMemoryCommand* command, double gravx,double gravy, double gravz);
int b3PhysicsParamSetTimeStep(struct SharedMemoryCommand* command, double timeStep);
int b3InitStepSimulationCommand(struct SharedMemoryCommand* command);
int b3LoadUrdfCommandInit(struct SharedMemoryCommand* command, const char* urdfFileName);
///all those commands are optional, except for the *Init
int b3LoadUrdfCommandSetStartPosition(struct SharedMemoryCommand* command, double startPosX,double startPosY,double startPosZ);
int b3LoadUrdfCommandSetStartOrientation(struct SharedMemoryCommand* command, double startOrnX,double startOrnY,double startOrnZ, double startOrnW);
int b3LoadUrdfCommandSetUseMultiBody(struct SharedMemoryCommand* command, int useMultiBody);
int b3LoadUrdfCommandSetUseFixedBase(struct SharedMemoryCommand* command, int useFixedBase);
#ifdef __cplusplus
}