remove PhysXClient.*, it was not needed (use PhysicsDirect instead)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef PHYSICS_CLIENT_SHARED_MEMORY2_H
|
||||
#define PHYSICS_CLIENT_SHARED_MEMORY2_H
|
||||
#ifndef PHYSICS_CLIENT_SHARED_MEMORY3_H
|
||||
#define PHYSICS_CLIENT_SHARED_MEMORY3_H
|
||||
|
||||
#include "PhysicsDirect.h"
|
||||
|
||||
@@ -14,4 +14,4 @@ public:
|
||||
void setSharedMemoryInterface(class SharedMemoryInterface* sharedMem);
|
||||
};
|
||||
|
||||
#endif //PHYSICS_CLIENT_SHARED_MEMORY2_H
|
||||
#endif //PHYSICS_CLIENT_SHARED_MEMORY3_H
|
||||
@@ -1,13 +1,14 @@
|
||||
#ifdef BT_ENABLE_PHYSX
|
||||
#include "PhysXC_API.h"
|
||||
#include "../PhysicsDirect.h"
|
||||
#include "PhysXServerCommandProcessor.h"
|
||||
#include "PhysXClient.h"
|
||||
|
||||
|
||||
B3_SHARED_API b3PhysicsClientHandle b3ConnectPhysX()
|
||||
{
|
||||
PhysXServerCommandProcessor* sdk = new PhysXServerCommandProcessor;
|
||||
|
||||
PhysXClient* direct = new PhysXClient(sdk, true);
|
||||
PhysicsDirect* direct = new PhysicsDirect(sdk, true);
|
||||
bool connected;
|
||||
connected = direct->connect();
|
||||
return (b3PhysicsClientHandle)direct;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,135 +0,0 @@
|
||||
#ifndef PHYSX_CLIENT_H
|
||||
#define PHYSX_CLIENT_H
|
||||
|
||||
#include "../PhysicsClient.h"
|
||||
|
||||
///PhysicsDirect executes the commands directly, without transporting them or having a separate server executing commands
|
||||
class PhysXClient : public PhysicsClient
|
||||
{
|
||||
protected:
|
||||
struct PhysXDirectInternalData* m_data;
|
||||
|
||||
bool processDebugLines(const struct SharedMemoryCommand& orgCommand);
|
||||
|
||||
bool processCamera(const struct SharedMemoryCommand& orgCommand);
|
||||
|
||||
bool processContactPointData(const struct SharedMemoryCommand& orgCommand);
|
||||
|
||||
bool processOverlappingObjects(const struct SharedMemoryCommand& orgCommand);
|
||||
|
||||
bool processVisualShapeData(const struct SharedMemoryCommand& orgCommand);
|
||||
|
||||
void processBodyJointInfo(int bodyUniqueId, const struct SharedMemoryStatus& serverCmd);
|
||||
|
||||
void processAddUserData(const struct SharedMemoryStatus& serverCmd);
|
||||
|
||||
void postProcessStatus(const struct SharedMemoryStatus& serverCmd);
|
||||
|
||||
void resetData();
|
||||
|
||||
void removeCachedBody(int bodyUniqueId);
|
||||
|
||||
public:
|
||||
PhysXClient(class PhysicsCommandProcessorInterface* physSdk, bool passSdkOwnership);
|
||||
|
||||
virtual ~PhysXClient();
|
||||
|
||||
// return true if connection succesfull, can also check 'isConnected'
|
||||
//it is OK to pass a null pointer for the gui helper
|
||||
virtual bool connect();
|
||||
|
||||
////todo: rename to 'disconnect'
|
||||
virtual void disconnectSharedMemory();
|
||||
|
||||
virtual bool isConnected() const;
|
||||
|
||||
// return non-null if there is a status, nullptr otherwise
|
||||
virtual const SharedMemoryStatus* processServerStatus();
|
||||
|
||||
virtual SharedMemoryCommand* getAvailableSharedMemoryCommand();
|
||||
|
||||
virtual bool canSubmitCommand() const;
|
||||
|
||||
virtual bool submitClientCommand(const struct SharedMemoryCommand& command);
|
||||
|
||||
virtual int getNumBodies() const;
|
||||
|
||||
virtual int getBodyUniqueId(int serialIndex) const;
|
||||
|
||||
virtual bool getBodyInfo(int bodyUniqueId, struct b3BodyInfo& info) const;
|
||||
|
||||
virtual int getNumJoints(int bodyIndex) const;
|
||||
|
||||
virtual bool getJointInfo(int bodyIndex, int jointIndex, struct b3JointInfo& info) const;
|
||||
|
||||
virtual int getNumUserConstraints() const;
|
||||
|
||||
virtual int getUserConstraintInfo(int constraintUniqueId, struct b3UserConstraint& info) const;
|
||||
|
||||
virtual int getUserConstraintId(int serialIndex) const;
|
||||
|
||||
///todo: move this out of the
|
||||
virtual void setSharedMemoryKey(int key);
|
||||
|
||||
void uploadBulletFileToSharedMemory(const char* data, int len);
|
||||
|
||||
virtual void uploadRaysToSharedMemory(struct SharedMemoryCommand& command, const double* rayFromWorldArray, const double* rayToWorldArray, int numRays);
|
||||
|
||||
virtual int getNumDebugLines() const;
|
||||
|
||||
virtual const float* getDebugLinesFrom() const;
|
||||
virtual const float* getDebugLinesTo() const;
|
||||
virtual const float* getDebugLinesColor() const;
|
||||
|
||||
virtual void getCachedCameraImage(b3CameraImageData* cameraData);
|
||||
|
||||
virtual void getCachedContactPointInformation(struct b3ContactInformation* contactPointData);
|
||||
|
||||
virtual void getCachedOverlappingObjects(struct b3AABBOverlapData* overlappingObjects);
|
||||
|
||||
virtual void getCachedVisualShapeInformation(struct b3VisualShapeInformation* visualShapesInfo);
|
||||
|
||||
virtual void getCachedCollisionShapeInformation(struct b3CollisionShapeInformation* collisionShapesInfo);
|
||||
|
||||
virtual void getCachedVREvents(struct b3VREventsData* vrEventsData);
|
||||
|
||||
virtual void getCachedKeyboardEvents(struct b3KeyboardEventsData* keyboardEventsData);
|
||||
|
||||
virtual void getCachedMouseEvents(struct b3MouseEventsData* mouseEventsData);
|
||||
|
||||
virtual void getCachedRaycastHits(struct b3RaycastInformation* raycastHits);
|
||||
|
||||
virtual void getCachedMassMatrix(int dofCountCheck, double* massMatrix);
|
||||
|
||||
//the following APIs are for internal use for visualization:
|
||||
virtual bool connect(struct GUIHelperInterface* guiHelper);
|
||||
virtual void renderScene();
|
||||
virtual void debugDraw(int debugDrawMode);
|
||||
|
||||
virtual void setTimeOut(double timeOutInSeconds);
|
||||
virtual double getTimeOut() const;
|
||||
|
||||
virtual bool getCachedUserData(int userDataId, struct b3UserDataValue& valueOut) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual int getCachedUserDataId(int bodyUniqueId, int linkIndex, int visualShapeIndex, const char* key) const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
virtual int getNumUserData(int bodyUniqueId) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual void getUserDataInfo(int bodyUniqueId, int userDataIndex, const char** keyOut, int* userDataIdOut, int* linkIndexOut, int* visualShapeIndexOut) const
|
||||
{
|
||||
*keyOut = 0;
|
||||
*userDataIdOut = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
virtual void pushProfileTiming(const char* timingName);
|
||||
virtual void popProfileTiming();
|
||||
};
|
||||
|
||||
#endif //PHYSX_CLIENT_H
|
||||
@@ -223,12 +223,10 @@ if not _OPTIONS["no-enet"] then
|
||||
"../../examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.cpp",
|
||||
"../../examples/SharedMemory/plugins/eglPlugin/eglRendererVisualShapeConverter.h",
|
||||
"../../examples/SharedMemory/physx/PhysXC_API.cpp",
|
||||
"../../examples/SharedMemory/physx/PhysXClient.cpp",
|
||||
"../../examples/SharedMemory/physx/PhysXServerCommandProcessor.cpp",
|
||||
"../../examples/SharedMemory/physx/PhysXUrdfImporter.cpp",
|
||||
"../../examples/SharedMemory/physx/URDF2PhysX.cpp",
|
||||
"../../examples/SharedMemory/physx/PhysXC_API.h",
|
||||
"../../examples/SharedMemory/physx/PhysXClient.h",
|
||||
"../../examples/SharedMemory/physx/PhysXServerCommandProcessor.h",
|
||||
"../../examples/SharedMemory/physx/PhysXUrdfImporter.h",
|
||||
"../../examples/SharedMemory/physx/URDF2PhysX.h",
|
||||
|
||||
1
setup.py
1
setup.py
@@ -142,7 +142,6 @@ else:
|
||||
|
||||
sources = ["examples/pybullet/pybullet.c"]\
|
||||
+["examples/SharedMemory/physx/PhysXC_API.cpp"]\
|
||||
+["examples/SharedMemory/physx/PhysXClient.cpp"]\
|
||||
+["examples/SharedMemory/physx/PhysXServerCommandProcessor.cpp"]\
|
||||
+["examples/SharedMemory/physx/PhysXUrdfImporter.cpp"]\
|
||||
+["examples/SharedMemory/physx/URDF2PhysX.cpp"]\
|
||||
|
||||
Reference in New Issue
Block a user