| 46 | namespace { |
| 47 | |
| 48 | SkeletonPtr createTwoLinkSkeleton(double childMass, double childInertia) |
| 49 | { |
| 50 | auto skeleton = Skeleton::create("invalid_dynamics_skeleton"); |
| 51 | |
| 52 | auto rootPair = skeleton->createJointAndBodyNodePair<RevoluteJoint>(); |
| 53 | auto* rootBody = rootPair.second; |
| 54 | rootBody->setMass(1.0); |
| 55 | rootBody->setMomentOfInertia(1.0, 1.0, 1.0, 0.0, 0.0, 0.0); |
| 56 | |
| 57 | auto childPair |
| 58 | = skeleton->createJointAndBodyNodePair<RevoluteJoint>(rootBody); |
| 59 | auto* childBody = childPair.second; |
| 60 | childBody->setMass(childMass); |
| 61 | childBody->setMomentOfInertia( |
| 62 | childInertia, childInertia, childInertia, 0.0, 0.0, 0.0); |
| 63 | |
| 64 | return skeleton; |
| 65 | } |
| 66 | |
| 67 | SkeletonPtr createBoxSkeleton( |
| 68 | const std::string& name, |
no test coverage detected