MCPcopy Create free account
hub / github.com/dartsim/dart / createRigidRing

Function createRigidRing

tutorials/tutorial_collisions/main.cpp:374–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374SkeletonPtr createRigidRing()
375{
376 SkeletonPtr ring = Skeleton::create("rigid_ring");
377
378 // Add bodies to the ring
379 BodyNode* bn = addRigidBody<FreeJoint>(ring, "rigid box 1", Shape::BOX);
380 bn = addRigidBody<BallJoint>(ring, "rigid cyl 2", Shape::CYLINDER, bn);
381 bn = addRigidBody<BallJoint>(ring, "rigid box 3", Shape::BOX, bn);
382 bn = addRigidBody<BallJoint>(ring, "rigid cyl 4", Shape::CYLINDER, bn);
383 bn = addRigidBody<BallJoint>(ring, "rigid box 5", Shape::BOX, bn);
384 bn = addRigidBody<BallJoint>(ring, "rigid cyl 6", Shape::CYLINDER, bn);
385
386 setAllColors(ring, dart::Color::Blue());
387
388 return ring;
389}
390
391SkeletonPtr createSoftBody()
392{

Callers 1

mainFunction · 0.70

Calls 1

setAllColorsFunction · 0.70

Tested by

no test coverage detected