Skip to content
Snippets Groups Projects
Commit 585cc406 authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

[Python] Added static method in geometry API to create a capsule object and add it to GeomModel.

parent a4454e84
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,8 @@ namespace se3
;
}
/* --- Expose --------------------------------------------------------- */
static void expose()
{
......
......@@ -55,9 +55,20 @@ namespace se3
.def_readonly("meshPath", &GeometryObject::meshPath, "Absolute path to the mesh file")
.def_readonly("overrideMaterial", &GeometryObject::overrideMaterial, "Boolean that tells whether material information is stored in Geometry object")
.def_readonly("meshTexturePath", &GeometryObject::meshTexturePath, "Absolute path to the mesh texture file")
.def("CreateCapsule", &GeometryObjectPythonVisitor::maker_capsule)
.staticmethod("CreateCapsule")
;
}
static GeometryObject maker_capsule( const double radius , const double length)
{
return GeometryObject("",FrameIndex(0),JointIndex(0),
boost::shared_ptr<fcl::CollisionGeometry>(new fcl::Capsule (radius, length)),
SE3::Identity());
}
static void expose()
{
bp::class_<GeometryObject>("GeometryObject",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment