diff --git a/OdeWorld.cc b/OdeWorld.cc index 397a88d..10d6d87 100644 --- a/OdeWorld.cc +++ b/OdeWorld.cc @@ -185,7 +185,7 @@ dGeomID OdeWorld::Object::cloneGeom(dGeomID geom, dBodyID body) id = dCreateBox(space, size[0], size[1], size[2]); } break; - case dCCylinderClass: + case dCapsuleClass: { dReal radius, length; dGeomCylinderGetParams(geom, &radius, &length); @@ -195,8 +195,8 @@ dGeomID OdeWorld::Object::cloneGeom(dGeomID geom, dBodyID body) case dCylinderClass: { dReal radius, length; - dGeomCCylinderGetParams(geom, &radius, &length); - id = dCreateCCylinder(space, radius, length); + dGeomCapsuleGetParams(geom, &radius, &length); + id = dCreateCapsule(space, radius, length); } break; case dPlaneClass: @@ -294,11 +294,11 @@ bool OdeWorld::Object::addCylinder(refptr< std::vector > args) return true; } -bool OdeWorld::Object::addCCylinder(refptr< std::vector > args) +bool OdeWorld::Object::addCapsule(refptr< std::vector > args) { if (args->size() != 8) return false; - dGeomID id = dCreateCCylinder(0, + dGeomID id = dCreateCapsule(0, m_scale * (*args)[0], m_scale * (*args)[1]); dMass mass; dMassSetCappedCylinder(&mass, 1.0, 3, m_scale * (*args)[0], diff --git a/OdeWorld.h b/OdeWorld.h index 7813cab..69a7f36 100644 --- a/OdeWorld.h +++ b/OdeWorld.h @@ -32,7 +32,7 @@ class OdeWorld bool addBox(refptr< std::vector > args); bool addSphere(refptr< std::vector > args); bool addCylinder(refptr< std::vector > args); - bool addCCylinder(refptr< std::vector > args); + bool addCapsule(refptr< std::vector > args); bool addPlane(refptr< std::vector > args); void addForce(dReal fx, dReal fy, dReal fz); void addRelForce(dReal fx, dReal fy, dReal fz);