diff --git a/CMakeLists.txt b/CMakeLists.txt index e5d6913..e28ac70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,21 +9,21 @@ # # # This file is part of openGJK. # # # -# openGJK is free software: you can redistribute it and/or modify # +# 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, # +# 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 . # +# along with OpenGJK. If not, see . # # # # openGJK: open-source Gilbert-Johnson-Keerthi algorithm # -# Copyright (C) Mattia Montanari 2018 - 2019 # +# Copyright (C) Mattia Montanari 2018 - 2020 # # http://iel.eng.ox.ac.uk/?page_id=504 # # # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # diff --git a/examples/cython/openGJK_cython.pxd b/examples/cython/openGJK_cython.pxd index 724ab00..ea7a1ae 100644 --- a/examples/cython/openGJK_cython.pxd +++ b/examples/cython/openGJK_cython.pxd @@ -1,3 +1,33 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# ##### # # # # +# #### ##### ###### # # # # # # # # +# # # # # # ## # # # # # # +# # # # # ##### # # # # #### # ### # +# # # ##### # # # # # # # # # # # +# # # # # # ## # # # # # # # +# #### # ###### # # ##### ##### # # # +# # +# 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 . # +# # +# openGJK: open-source Gilbert-Johnson-Keerthi algorithm # +# Copyright (C) Mattia Montanari 2018 - 2020 # +# http://iel.eng.ox.ac.uk/?page_id=504 # +# # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # + # Declare C function and data types cdef extern from "openGJK.h": struct bd: diff --git a/examples/cython/openGJK_cython.pyx b/examples/cython/openGJK_cython.pyx index a98f86f..4ee60e5 100644 --- a/examples/cython/openGJK_cython.pyx +++ b/examples/cython/openGJK_cython.pyx @@ -1,4 +1,34 @@ #!python +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# ##### # # # # +# #### ##### ###### # # # # # # # # +# # # # # # ## # # # # # # +# # # # # ##### # # # # #### # ### # +# # # ##### # # # # # # # # # # # +# # # # # # ## # # # # # # # +# #### # ###### # # ##### ##### # # # +# # +# 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 . # +# # +# openGJK: open-source Gilbert-Johnson-Keerthi algorithm # +# Copyright (C) Mattia Montanari 2018 - 2020 # +# http://iel.eng.ox.ac.uk/?page_id=504 # +# # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # + # cython: language_level=3 # distutils: sources = ../../src/openGJK.c # distutils: include_dirs = ../../include/openGJK diff --git a/examples/cython/pygjk_trial.py b/examples/cython/pygjk_trial.py index 4a7ebb0..3b68b7a 100644 --- a/examples/cython/pygjk_trial.py +++ b/examples/cython/pygjk_trial.py @@ -1,6 +1,38 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# ##### # # # # +# #### ##### ###### # # # # # # # # +# # # # # # ## # # # # # # +# # # # # ##### # # # # #### # ### # +# # # ##### # # # # # # # # # # # +# # # # # # ## # # # # # # # +# #### # ###### # # ##### ##### # # # +# # +# 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 . # +# # +# openGJK: open-source Gilbert-Johnson-Keerthi algorithm # +# Copyright (C) Mattia Montanari 2018 - 2020 # +# http://iel.eng.ox.ac.uk/?page_id=504 # +# # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # + import numpy as np import openGJK_cython as opengjk + a = np.array([[1.,1.,1.],[1.,1.,1.]]) b = np.array([[11.,1.,1.],[1.,1.,1.]]) d = opengjk.pygjk(a,b) + print(d) \ No newline at end of file diff --git a/examples/cython/setup.py b/examples/cython/setup.py index a5f738e..801ff67 100644 --- a/examples/cython/setup.py +++ b/examples/cython/setup.py @@ -1,3 +1,33 @@ +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # +# ##### # # # # +# #### ##### ###### # # # # # # # # +# # # # # # ## # # # # # # +# # # # # ##### # # # # #### # ### # +# # # ##### # # # # # # # # # # # +# # # # # # ## # # # # # # # +# #### # ###### # # ##### ##### # # # +# # +# 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 . # +# # +# openGJK: open-source Gilbert-Johnson-Keerthi algorithm # +# Copyright (C) Mattia Montanari 2018 - 2020 # +# http://iel.eng.ox.ac.uk/?page_id=504 # +# # +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # + from setuptools import Extension, setup from Cython.Build import cythonize