make setJointPosMultiDof and setJointVelMultiDof argument const.
add PyBullet.resetJointStateMultiDof / getJointStateMultiDof, for preliminary support for spherical and planar joints
This commit is contained in:
@@ -149,6 +149,32 @@ bool PhysicsClientSharedMemory::getJointInfo(int bodyUniqueId, int jointIndex, b
|
||||
if ((jointIndex >= 0) && (jointIndex < bodyJoints->m_jointInfo.size()))
|
||||
{
|
||||
info = bodyJoints->m_jointInfo[jointIndex];
|
||||
switch (info.m_jointType)
|
||||
{
|
||||
case eSphericalType:
|
||||
{
|
||||
info.m_qSize = 4;//quaterion x,y,z,w
|
||||
info.m_uSize = 3;
|
||||
break;
|
||||
}
|
||||
case ePlanarType:
|
||||
{
|
||||
info.m_qSize = 2;
|
||||
info.m_uSize = 2;
|
||||
break;
|
||||
}
|
||||
case ePrismaticType:
|
||||
case eRevoluteType:
|
||||
{
|
||||
info.m_qSize = 1;
|
||||
info.m_uSize = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user