diff --git a/examples/RoboticsLearning/b3RobotSimAPI.cpp b/examples/RoboticsLearning/b3RobotSimAPI.cpp index 84e939716..eff8110b8 100644 --- a/examples/RoboticsLearning/b3RobotSimAPI.cpp +++ b/examples/RoboticsLearning/b3RobotSimAPI.cpp @@ -596,7 +596,7 @@ bool b3RobotSimAPI::getJointInfo(int bodyUniqueId, int jointIndex, b3JointInfo* return (b3GetJointInfo(m_data->m_physicsClient,bodyUniqueId, jointIndex,jointInfo)!=0); } -void b3RobotSimAPI::createJoint(int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const b3JointInfo* jointInfo) +void b3RobotSimAPI::createJoint(int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const struct b3JointInfo& jointInfo) { b3SharedMemoryStatusHandle statusHandle; b3Assert(b3CanSubmitCommand(m_data->m_physicsClient)); diff --git a/examples/RoboticsLearning/b3RobotSimAPI.h b/examples/RoboticsLearning/b3RobotSimAPI.h index e42c3d6ea..cb7e3106b 100644 --- a/examples/RoboticsLearning/b3RobotSimAPI.h +++ b/examples/RoboticsLearning/b3RobotSimAPI.h @@ -88,7 +88,7 @@ public: bool getJointInfo(int bodyUniqueId, int jointIndex, b3JointInfo* jointInfo); - void createJoint(int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const b3JointInfo* jointInfo); + void createJoint(int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const struct b3JointInfo& jointInfo); void setJointMotorControl(int bodyUniqueId, int jointIndex, const struct b3JointMotorArgs& args); diff --git a/examples/SharedMemory/PhysicsClientC_API.cpp b/examples/SharedMemory/PhysicsClientC_API.cpp index 2e1e841b1..9ae13275a 100644 --- a/examples/SharedMemory/PhysicsClientC_API.cpp +++ b/examples/SharedMemory/PhysicsClientC_API.cpp @@ -730,7 +730,7 @@ int b3GetJointInfo(b3PhysicsClientHandle physClient, int bodyIndex, int jointInd return cl->getJointInfo(bodyIndex, jointIndex, *info); } -b3SharedMemoryCommandHandle b3CreateJoint(b3PhysicsClientHandle physClient, int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const b3JointInfo* info) +b3SharedMemoryCommandHandle b3CreateJoint(b3PhysicsClientHandle physClient, int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const struct b3JointInfo& info) { PhysicsClient* cl = (PhysicsClient* ) physClient; b3Assert(cl); @@ -744,11 +744,11 @@ b3SharedMemoryCommandHandle b3CreateJoint(b3PhysicsClientHandle physClient, int command->m_createJointArguments.m_childBodyIndex = childBodyIndex; command->m_createJointArguments.m_childJointIndex = childJointIndex; for (int i = 0; i < 7; ++i) { - command->m_createJointArguments.m_parentFrame[i] = info->m_parentFrame[i]; - command->m_createJointArguments.m_childFrame[i] = info->m_childFrame[i]; + command->m_createJointArguments.m_parentFrame[i] = info.m_parentFrame[i]; + command->m_createJointArguments.m_childFrame[i] = info.m_childFrame[i]; } for (int i = 0; i < 3; ++i) { - command->m_createJointArguments.m_jointAxis[i] = info->m_jointAxis[i]; + command->m_createJointArguments.m_jointAxis[i] = info.m_jointAxis[i]; } return (b3SharedMemoryCommandHandle)command; } diff --git a/examples/SharedMemory/PhysicsClientC_API.h b/examples/SharedMemory/PhysicsClientC_API.h index 21a9d9b77..2b2ca6b92 100644 --- a/examples/SharedMemory/PhysicsClientC_API.h +++ b/examples/SharedMemory/PhysicsClientC_API.h @@ -59,7 +59,7 @@ int b3GetNumJoints(b3PhysicsClientHandle physClient, int bodyIndex); ///given a body and joint index, return the joint information. See b3JointInfo in SharedMemoryPublic.h int b3GetJointInfo(b3PhysicsClientHandle physClient, int bodyIndex, int jointIndex, struct b3JointInfo* info); -b3SharedMemoryCommandHandle b3CreateJoint(b3PhysicsClientHandle physClient, int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const b3JointInfo* info); +b3SharedMemoryCommandHandle b3CreateJoint(b3PhysicsClientHandle physClient, int parentBodyIndex, int parentJointIndex, int childBodyIndex, int childJointIndex, const struct b3JointInfo& info); ///Request debug lines for debug visualization. The flags in debugMode are the same as used in Bullet ///See btIDebugDraw::DebugDrawModes in Bullet/src/LinearMath/btIDebugDraw.h