re-enable wireframe in PhysicsClient

inintialize variables in constructor of PhysicsClient
This commit is contained in:
Erwin Coumans
2015-10-30 13:24:02 -07:00
parent c68c215ead
commit 6e042b1901
2 changed files with 5 additions and 3 deletions

View File

@@ -128,7 +128,6 @@
{ {
'ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"', 'ARCHS = "$(ARCHS_STANDARD_32_BIT) $(ARCHS_STANDARD_64_BIT)"',
'VALID_ARCHS = "x86_64 i386"', 'VALID_ARCHS = "x86_64 i386"',
'SDKROOT = "macosx10.9"',
} }
end end
end end

View File

@@ -337,6 +337,9 @@ void PhysicsClientExample::prepareAndSubmitCommand(int commandId)
PhysicsClientExample::PhysicsClientExample(GUIHelperInterface* helper) PhysicsClientExample::PhysicsClientExample(GUIHelperInterface* helper)
:SharedMemoryCommon(helper), :SharedMemoryCommon(helper),
m_physicsClientHandle(0),
m_selectedBody(-1),
m_prevSelectedBody(-1),
m_wantsTermination(false), m_wantsTermination(false),
m_sharedMemoryKey(SHARED_MEMORY_KEY), m_sharedMemoryKey(SHARED_MEMORY_KEY),
m_numMotors(0) m_numMotors(0)
@@ -381,7 +384,7 @@ void PhysicsClientExample::createButtons()
createButton("Initialize Pose",CMD_INIT_POSE, isTrigger); createButton("Initialize Pose",CMD_INIT_POSE, isTrigger);
if (m_selectedBody>=0) if (m_physicsClientHandle && m_selectedBody>=0)
{ {
int numJoints = b3GetNumJoints(m_physicsClientHandle,m_selectedBody); int numJoints = b3GetNumJoints(m_physicsClientHandle,m_selectedBody);
for (int i=0;i<numJoints;i++) for (int i=0;i<numJoints;i++)
@@ -532,7 +535,7 @@ void PhysicsClientExample::stepSimulation(float deltaTime)
{ {
enqueueCommand(CMD_SEND_DESIRED_STATE); enqueueCommand(CMD_SEND_DESIRED_STATE);
enqueueCommand(CMD_STEP_FORWARD_SIMULATION); enqueueCommand(CMD_STEP_FORWARD_SIMULATION);
//enqueueCommand(CMD_REQUEST_DEBUG_LINES); enqueueCommand(CMD_REQUEST_DEBUG_LINES);
//enqueueCommand(CMD_REQUEST_ACTUAL_STATE); //enqueueCommand(CMD_REQUEST_ACTUAL_STATE);
} }
} }