add single step simulation, using 'o' key. use 'i' key to suspend simulation first

default background color a bit darker, to show debug lines
tweaked contact point rendering a bit
This commit is contained in:
erwin coumans
2016-08-19 10:30:02 -07:00
parent a68c9ca845
commit 62d5b7c5c0
9 changed files with 174 additions and 122 deletions

View File

@@ -69,9 +69,27 @@ PhysicsDirect::~PhysicsDirect()
bool PhysicsDirect::connect()
{
m_data->m_commandProcessor->setGuiHelper(&m_data->m_noGfx);
return true;
}
// return true if connection succesfull, can also check 'isConnected'
bool PhysicsDirect::connect(struct GUIHelperInterface* guiHelper)
{
m_data->m_commandProcessor->setGuiHelper(guiHelper);
return true;
}
void PhysicsDirect::renderScene()
{
m_data->m_commandProcessor->renderScene();
}
void PhysicsDirect::debugDraw(int debugDrawMode)
{
m_data->m_commandProcessor->physicsDebugDraw(debugDrawMode);
}
////todo: rename to 'disconnect'
void PhysicsDirect::disconnectSharedMemory()
{

View File

@@ -29,9 +29,10 @@ public:
virtual ~PhysicsDirect();
// return true if connection succesfull, can also check 'isConnected'
// 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();
@@ -62,7 +63,12 @@ public:
virtual const float* getDebugLinesColor() const;
virtual void getCachedCameraImage(b3CameraImageData* cameraData);
//those 2 APIs are for internal use for visualization
virtual bool connect(struct GUIHelperInterface* guiHelper);
virtual void renderScene();
virtual void debugDraw(int debugDrawMode);
};
#endif //PHYSICS_DIRECT_H