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

Function createGround

tutorials/tutorial_collisions/main.cpp:422–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422SkeletonPtr createGround()
423{
424 SkeletonPtr ground = Skeleton::create("ground");
425
426 BodyNode* bn = ground->createJointAndBodyNodePair<WeldJoint>().second;
427
428 std::shared_ptr<BoxShape> shape = std::make_shared<BoxShape>(Eigen::Vector3d(
429 default_ground_width, default_ground_width, default_wall_thickness));
430 auto shapeNode
431 = bn->createShapeNodeWith<VisualAspect, CollisionAspect, DynamicsAspect>(
432 shape);
433 shapeNode->getVisualAspect()->setColor(Eigen::Vector3d(1.0, 1.0, 1.0));
434
435 return ground;
436}
437
438SkeletonPtr createWall()
439{

Callers 1

mainFunction · 0.70

Calls 2

getVisualAspectMethod · 0.80
setColorMethod · 0.45

Tested by

no test coverage detected