From 8cac752e6a49f46a04ca75ae0a1bd6e5082c223e Mon Sep 17 00:00:00 2001 From: Chen Yuda <87894406+CYDXYYJ@users.noreply.github.com> Date: Tue, 1 Nov 2022 16:49:13 +0800 Subject: [PATCH] Change In Python Example I've tested that this change can make sense. --- examples/python/pyopenGJK.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/python/pyopenGJK.cpp b/examples/python/pyopenGJK.cpp index 514d7b8..a088106 100644 --- a/examples/python/pyopenGJK.cpp +++ b/examples/python/pyopenGJK.cpp @@ -8,9 +8,9 @@ PYBIND11_MODULE(opengjkc, m) { [](Eigen::Array &arr1, Eigen::Array &arr2) -> double { - struct simplex s; - struct bd bd1; - struct bd bd2; + gkSimplex s; + gkPolytope bd1; + gkPolytope bd2; bd1.numpoints = arr1.rows(); std::vector arr1_rows(arr1.rows()); for (int i = 0; i < arr1.rows(); ++i) @@ -23,8 +23,8 @@ PYBIND11_MODULE(opengjkc, m) { arr2_rows[i] = arr2.row(i).data(); bd2.coord = arr2_rows.data(); - double a = gjk(bd1, bd2, &s); + double a = compute_minimum_distance(bd1, bd2, &s); return a; }); -} \ No newline at end of file +}