mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 22:00:05 +00:00
8e163c984d
more refactor of shared memory joint control API
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
#ifndef BT_PHYSICS_CLIENT_API_H
|
|
#define BT_PHYSICS_CLIENT_API_H
|
|
|
|
#include "SharedMemoryCommands.h"
|
|
|
|
#include <string>
|
|
|
|
struct PoweredJointInfo
|
|
{
|
|
std::string m_linkName;
|
|
std::string m_jointName;
|
|
int m_jointType;
|
|
int m_qIndex;
|
|
int m_uIndex;
|
|
};
|
|
|
|
|
|
class PhysicsClientSharedMemory //: public CommonPhysicsClientInterface
|
|
{
|
|
struct PhysicsClientSharedMemoryInternalData* m_data;
|
|
protected:
|
|
|
|
public:
|
|
|
|
PhysicsClientSharedMemory();
|
|
virtual ~PhysicsClientSharedMemory();
|
|
|
|
//return true if connection succesfull, can also check 'isConnected'
|
|
virtual bool connect(bool allowSharedMemoryInitialization = true);
|
|
|
|
virtual bool isConnected() const;
|
|
|
|
// return true if there is a status, and fill in 'serverStatus'
|
|
virtual bool processServerStatus(ServerStatus& serverStatus);
|
|
|
|
virtual bool canSubmitCommand() const;
|
|
|
|
virtual bool submitClientCommand(const SharedMemoryCommand& command);
|
|
|
|
virtual int getNumPoweredJoints() const;
|
|
|
|
virtual void getPoweredJointInfo(int index, PoweredJointInfo& info) const;
|
|
|
|
};
|
|
|
|
#endif //BT_PHYSICS_CLIENT_API_H
|