4#ifndef __multicontact_api_python_geometry_ellipsoid_hpp__
5#define __multicontact_api_python_geometry_ellipsoid_hpp__
7#include <pinocchio/fwd.hpp>
15namespace bp = boost::python;
17template <
typename Ellipso
id>
19 :
public boost::python::def_visitor<EllipsoidPythonVisitor<Ellipsoid> > {
20 typedef typename Ellipsoid::Matrix
Matrix;
21 typedef typename Ellipsoid::Vector
Vector;
23 template <
class PyClass>
25 cl.def(bp::init<Matrix, Vector>((bp::arg(
"A"), bp::arg(
"center"))))
27 .def(
"lhsValue", &Ellipsoid::lhsValue, bp::arg(
"point"),
28 "Returns the value of norm(A*(x-c)).")
30 "Accessor to the center property.")
31 .add_property(
"A", &
get_A, &
set_A,
"Accessor to the A property.");
39 static void set_A(Ellipsoid& e,
const Matrix& A) { e.A() = A; }
42 static void expose(
const std::string& class_name) {
43 std::string doc =
"Ellipsoid of dimension " + Ellipsoid::dim;
44 doc +=
" defined by its matrix A and its center.";
45 bp::class_<Ellipsoid>(class_name.c_str(), doc.c_str(), bp::no_init)
50 static std::string
toString(
const Ellipsoid& e) {