2020-05-21 09:27:47 -07:00
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
|
|
|
# ##### # # # #
|
|
|
|
# #### ##### ###### # # # # # # # #
|
|
|
|
# # # # # # ## # # # # # #
|
|
|
|
# # # # # ##### # # # # #### # ### #
|
|
|
|
# # # ##### # # # # # # # # # # #
|
|
|
|
# # # # # # ## # # # # # # #
|
|
|
|
# #### # ###### # # ##### ##### # # #
|
|
|
|
# #
|
|
|
|
# This file is part of openGJK. #
|
|
|
|
# #
|
|
|
|
# OpenGJK is free software: you can redistribute it and/or modify #
|
|
|
|
# it under the terms of the GNU General Public License as published by #
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or #
|
|
|
|
# any later version. #
|
|
|
|
# #
|
|
|
|
# OpenGJK is distributed in the hope that it will be useful, #
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See The #
|
|
|
|
# GNU General Public License for more details. #
|
|
|
|
# #
|
|
|
|
# You should have received a copy of the GNU General Public License #
|
|
|
|
# along with OpenGJK. If not, see <https://www.gnu.org/licenses/>. #
|
|
|
|
# #
|
|
|
|
# openGJK: open-source Gilbert-Johnson-Keerthi algorithm #
|
|
|
|
# Copyright (C) Mattia Montanari 2018 - 2020 #
|
|
|
|
# http://iel.eng.ox.ac.uk/?page_id=504 #
|
|
|
|
# #
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
|
|
|
|
2020-05-21 08:26:38 -07:00
|
|
|
# Declare C function and data types
|
|
|
|
cdef extern from "openGJK.h":
|
2022-09-22 14:24:57 -07:00
|
|
|
struct gkPolytope_:
|
2020-05-21 08:26:38 -07:00
|
|
|
int numpoints
|
|
|
|
double s[3]
|
|
|
|
double ** coord
|
|
|
|
|
2022-09-22 14:24:57 -07:00
|
|
|
struct gkSimplex_:
|
2020-05-21 08:26:38 -07:00
|
|
|
int nvrtx
|
|
|
|
double vrtx[4][3]
|
|
|
|
int wids[4]
|
|
|
|
double lambdas[4]
|
|
|
|
|
2022-09-22 14:24:57 -07:00
|
|
|
double compute_minimum_distance(gkPolytope_ bd1, gkPolytope_ bd2, gkSimplex_ *s)
|