Verified Commit 0f63b0fb authored by Justin Carpentier's avatar Justin Carpentier
Browse files

python/all: fix return of Eigen::Matrix using new EigenPy >= 2.2.0 feature

parent cf5feb8d
......@@ -35,6 +35,7 @@
#include <boost/python.hpp>
#include <eigenpy/registration.hpp>
#include <eigenpy/eigen-to-python.hpp>
#include "fcl.hh"
......@@ -138,10 +139,9 @@ void exposeShapes ()
.def (dv::init<Box>())
.def (dv::init<Box, FCL_REAL,FCL_REAL,FCL_REAL>())
.def (dv::init<Box, const Vec3f&>())
.add_property("halfSide",
make_getter(&Box::halfSide, return_value_policy<return_by_value>()),
make_setter(&Box::halfSide, return_value_policy<return_by_value>()),
doxygen::class_attrib_doc<Box>("halfSide"))
.def_readwrite("halfSide",
&Box::halfSide,
doxygen::class_attrib_doc<Box>("halfSide"))
;
class_ <Capsule, bases<ShapeBase>, shared_ptr<Capsule> >
......
//
// Software License Agreement (BSD License)
//
// Copyright (c) 2019 CNRS-LAAS INRIA
// Copyright (c) 2019-2020 CNRS-LAAS INRIA
// Author: Joseph Mirabel
// All rights reserved.
//
......@@ -35,6 +35,7 @@
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <eigenpy/eigen-to-python.hpp>
#include <eigenpy/registration.hpp>
#include <hpp/fcl/fwd.hh>
......
......@@ -36,6 +36,7 @@
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <eigenpy/registration.hpp>
#include <eigenpy/eigen-to-python.hpp>
#include "fcl.hh"
......@@ -89,10 +90,7 @@ void exposeDistanceAPI ()
class_ <DistanceResult> ("DistanceResult",
doxygen::class_doc<DistanceResult>(), init<>())
.DEF_RW_CLASS_ATTRIB (DistanceResult, min_distance)
.add_property("normal",
make_getter(&DistanceResult::normal, return_value_policy<return_by_value>()),
make_setter(&DistanceResult::normal, return_value_policy<return_by_value>()),
doxygen::class_attrib_doc<DistanceResult>("normal"))
.DEF_RW_CLASS_ATTRIB(DistanceResult, normal)
//.def_readwrite ("nearest_points", &DistanceResult::nearest_points)
.def("getNearestPoint1",&DistanceRequestWrapper::getNearestPoint1,
doxygen::class_attrib_doc<DistanceResult>("nearest_points"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment