Commit 7108b747 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

[Python] Add StdVec_DistanceResult and StdVec_CollisionResult

parent cdb0a72d
......@@ -92,6 +92,10 @@ void exposeCollisionAPI ()
.def ("clear", &CollisionResult::clear)
;
class_< std::vector<CollisionResult> >("CollisionResult")
.def(vector_indexing_suite< std::vector<CollisionResult> >())
;
def ("collide", static_cast< std::size_t (*)(const CollisionObject*, const CollisionObject*,
const CollisionRequest&, CollisionResult&) > (&collide));
def ("collide", static_cast< std::size_t (*)(
......
......@@ -33,6 +33,7 @@
// POSSIBILITY OF SUCH DAMAGE.
#include <boost/python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include "fcl.hh"
......@@ -73,6 +74,10 @@ void exposeDistanceAPI ()
.def ("clear", &DistanceResult::clear)
;
class_< std::vector<DistanceResult> >("StdVec_DistanceResult")
.def(vector_indexing_suite< std::vector<DistanceResult> >())
;
def ("distance", static_cast< FCL_REAL (*)(const CollisionObject*, const CollisionObject*,
const DistanceRequest&, DistanceResult&) > (&distance));
def ("distance", static_cast< FCL_REAL (*)(
......
Supports Markdown
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