MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / getJointInfo

Method getJointInfo

examples/SharedMemory/PhysicsDirect.cpp:1558–1602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1556}
1557
1558bool PhysicsDirect::getJointInfo(int bodyIndex, int jointIndex, struct b3JointInfo& info) const
1559{
1560 BodyJointInfoCache2** bodyJointsPtr = m_data->m_bodyJointMap[bodyIndex];
1561 if (bodyJointsPtr && *bodyJointsPtr)
1562 {
1563 BodyJointInfoCache2* bodyJoints = *bodyJointsPtr;
1564 if ((jointIndex >= 0) && (jointIndex < bodyJoints->m_jointInfo.size()))
1565 {
1566 info = bodyJoints->m_jointInfo[jointIndex];
1567 info.m_qSize = 0;
1568 info.m_uSize = 0;
1569
1570 switch (info.m_jointType)
1571 {
1572 case eSphericalType:
1573 {
1574 info.m_qSize = 4;//quaterion x,y,z,w
1575 info.m_uSize = 3;
1576 break;
1577 }
1578 case ePlanarType:
1579 {
1580 info.m_qSize = 2;
1581 info.m_uSize = 2;
1582 break;
1583 }
1584 case ePrismaticType:
1585 case eRevoluteType:
1586 {
1587 info.m_qSize = 1;
1588 info.m_uSize = 1;
1589 break;
1590 }
1591
1592 default:
1593 {
1594 }
1595 }
1596
1597
1598 return true;
1599 }
1600 }
1601 return false;
1602}
1603
1604void PhysicsDirect::setSharedMemoryKey(int key)
1605{

Callers 15

vision.pyFile · 0.45
setupMinitaurMethod · 0.45
getMotorJointStatesMethod · 0.45
getMotorJointStatesFunction · 0.45
multiplyJacobianFunction · 0.45
StepFunction · 0.45
heightfield.pyFile · 0.45

Calls 1

sizeMethod · 0.45

Tested by 1

getMotorJointStatesMethod · 0.36