18 #ifndef _GAZEBO_DARTCYLINDERSHAPE_HH_
19 #define _GAZEBO_DARTCYLINDERSHAPE_HH_
43 public:
void SetSize(
double _radius,
double _length)
47 gzerr <<
"Cylinder shape does not support negative radius\n";
53 gzerr <<
"Cylinder shape does not support negative length\n";
62 gzwarn <<
"Setting cylinder shape's radius to zero not supported "
63 <<
"in DART, using 1e-4.\n";
69 gzwarn <<
"Setting cylinder shape's length to zero not supported "
70 <<
"in DART, using 1e-4.\n";
77 boost::dynamic_pointer_cast<
DARTCollision>(this->collisionParent);
79 if (dartCollisionParent->GetDARTCollisionShape() ==
NULL)
81 dart::dynamics::BodyNode *dtBodyNode =
83 dart::dynamics::CylinderShape *dtCylinderShape =
84 new dart::dynamics::CylinderShape(_radius, _length);
85 dtBodyNode->addCollisionShape(dtCylinderShape);
86 dartCollisionParent->SetDARTCollisionShape(dtCylinderShape);
90 dart::dynamics::CylinderShape *dtCylinderShape =
91 dynamic_cast<dart::dynamics::CylinderShape*
>(
92 dartCollisionParent->GetDARTCollisionShape());
93 dtCylinderShape->setRadius(_radius);
94 dtCylinderShape->setHeight(_length);