diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc7fdd8..591e8be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,25 @@
# # # # # # ## # # # # # # #
# #### # ###### # # ##### ##### # # #
# #
-# Mattia Montanari | University of Oxford 2018 #
+# 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 Foobar. If not, see . #
+# #
+# openGJK: open-source Gilbert-Johnson-Keerthi algorithm #
+# Copyright (C) Mattia Montanari 2018 - 2019 #
+# http://iel.eng.ox.ac.uk/?page_id=504 #
+# #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
cmake_minimum_required(VERSION 3.5)
diff --git a/LICENSE b/COPYING
similarity index 100%
rename from LICENSE
rename to COPYING
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 5598df3..582a2b4 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -1,17 +1,32 @@
-# Doxyfile 1.8.14
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
+# ##### # # # #
+# #### ##### ###### # # # # # # # #
+# # # # # # ## # # # # # #
+# # # # # ##### # # # # #### # ### #
+# # # ##### # # # # # # # # # # #
+# # # # # # ## # # # # # # #
+# #### # ###### # # ##### ##### # # #
+# #
+# 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 Foobar. If not, see . #
+# #
+# openGJK: open-source Gilbert-Johnson-Keerthi algorithm #
+# Copyright (C) Mattia Montanari 2018 - 2019 #
+# http://iel.eng.ox.ac.uk/?page_id=504 #
+# #
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
#---------------------------------------------------------------------------
# Project related configuration options
diff --git a/doc/openGJKcustomfooter.html b/doc/openGJKcustomfooter.html
index 152fb77..6662fcb 100644
--- a/doc/openGJKcustomfooter.html
+++ b/doc/openGJKcustomfooter.html
@@ -1,5 +1,32 @@
-
-
+
diff --git a/doc/openGJKcustomheader.html b/doc/openGJKcustomheader.html
index 975bf3a..9f58884 100644
--- a/doc/openGJKcustomheader.html
+++ b/doc/openGJKcustomheader.html
@@ -1,4 +1,34 @@
-
+
+
+
diff --git a/doc/openGJKcustomstyle.css b/doc/openGJKcustomstyle.css
index 248a9de..f02c101 100644
--- a/doc/openGJKcustomstyle.css
+++ b/doc/openGJKcustomstyle.css
@@ -1,4 +1,32 @@
-/* The standard CSS for doxygen 1.8.14 */
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
+ * ##### # # # *
+ * #### ##### ###### # # # # # # # *
+ * # # # # # ## # # # # # *
+ * # # # # ##### # # # # #### # ### *
+ * # # ##### # # # # # # # # # # *
+ * # # # # # ## # # # # # # *
+ * #### # ###### # # ##### ##### # # *
+ * *
+ * 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 Foobar. If not, see . *
+ * *
+ * openGJK: open-source Gilbert-Johnson-Keerthi algorithm *
+ * Copyright (C) Mattia Montanari 2018 - 2019 *
+ * http://iel.eng.ox.ac.uk/?page_id=504 *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
diff --git a/example1_c/CMakeLists.txt b/example1_c/CMakeLists.txt
index 66f1cb0..b9c3497 100644
--- a/example1_c/CMakeLists.txt
+++ b/example1_c/CMakeLists.txt
@@ -7,10 +7,27 @@
# # # # # # ## # # # # # # #
# #### # ###### # # ##### ##### # # #
# #
-# Mattia Montanari | University of Oxford 2018 #
+# 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 Foobar. If not, see . #
+# #
+# openGJK: open-source Gilbert-Johnson-Keerthi algorithm #
+# Copyright (C) Mattia Montanari 2018 - 2019 #
+# http://iel.eng.ox.ac.uk/?page_id=504 #
+# #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
-
project(openGJKdemo)
message( "[${CMAKE_PROJECT_NAME}] Compiling the executable ..")
diff --git a/example1_c/main.c b/example1_c/main.c
index 10175bb..82701a6 100644
--- a/example1_c/main.c
+++ b/example1_c/main.c
@@ -1,22 +1,40 @@
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-* ##### # # # *
-* #### ##### ###### # # # # # # # *
-* # # # # # ## # # # # # *
-* # # # # ##### # # # # #### # ### *
-* # # ##### # # # # # # # # # # *
-* # # # # # ## # # # # # # *
-* #### # ###### # # ##### ##### # # *
-* *
-* Mattia Montanari | University of Oxford 2019 *
-* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-* *
-* This file runs an example to illustrate how to invoke the openGJK lib *
-* within a C program. An executable called 'demo' can be compiled with *
-* CMake. This reads the coordinates of two polytopes from the input *
-* files userP.dat and userQ.dat, respectively, and returns the minimum *
-* distance between them computed using the openGJK library. *
-* *
-* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+ * ##### # # # *
+ * #### ##### ###### # # # # # # # *
+ * # # # # # ## # # # # # *
+ * # # # # ##### # # # # #### # ### *
+ * # # ##### # # # # # # # # # # *
+ * # # # # # ## # # # # # # *
+ * #### # ###### # # ##### ##### # # *
+ * *
+ * 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 Foobar. If not, see . *
+ * *
+ * openGJK: open-source Gilbert-Johnson-Keerthi algorithm *
+ * Copyright (C) Mattia Montanari 2018 - 2019 *
+ * http://iel.eng.ox.ac.uk/?page_id=504 *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
+ * *
+ * This file runs an example to illustrate how to invoke the openGJK lib *
+ * within a C program. An executable called 'demo' can be compiled with *
+ * CMake. This reads the coordinates of two polytopes from the input *
+ * files userP.dat and userQ.dat, respectively, and returns the minimum *
+ * distance between them computed using the openGJK library. *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/**
* @file main.c
@@ -32,7 +50,6 @@
/* For importing openGJK this is Step 1: include header in subfolder. */
#include "openGJK/openGJK.h"
-
#ifndef WIN32
#define fscanf_s fscanf
#endif
diff --git a/example2_mex/main.m b/example2_mex/main.m
index 59c3706..b979c8b 100644
--- a/example2_mex/main.m
+++ b/example2_mex/main.m
@@ -7,11 +7,29 @@
% # # # # # ## # # # # # # %
% #### # ###### # # ##### ##### # # %
% %
-% Mattia Montanari | University of Oxford 2018 %
+% 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 Foobar. If not, see . %
+% %
+% openGJK: open-source Gilbert-Johnson-Keerthi algorithm %
+% Copyright (C) Mattia Montanari 2018 - 2019 %
+% http://iel.eng.ox.ac.uk/?page_id=504 %
+% %
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
% %
-% This file runs an example to illustrate how to invoke the openGJK lib %
-% withing Matlab. It that assumes a mex file openGJK is availalbe, see %
+% This file runs an example to illustrate how to cll the openGJK library %
+% withing Matlab. It assumes that a mex file openGJK is availalbe, see %
% the runme.m script for information on how to compile it. %
% The example computes the minimum distance between two polytopes in 3D, %
% A and B, both defined as a list of points. %
diff --git a/example2_mex/runme.m b/example2_mex/runme.m
index 6545ebe..a90f6d8 100644
--- a/example2_mex/runme.m
+++ b/example2_mex/runme.m
@@ -7,7 +7,25 @@
% # # # # # ## # # # # # # %
% #### # ###### # # ##### ##### # # %
% %
-% Mattia Montanari | University of Oxford 2019 %
+% 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 Foobar. If not, see . %
+% %
+% openGJK: open-source Gilbert-Johnson-Keerthi algorithm %
+% Copyright (C) Mattia Montanari 2018 - 2019 %
+% http://iel.eng.ox.ac.uk/?page_id=504 %
+% %
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
% %
% This file compiles a mex function from the openGJK library and runs an %
@@ -50,7 +68,6 @@ mex(fullfile('..','lib','src','openGJK.c'),... % Source of openGJK
catch
% Build failed, refer to documentation
fprintf('\n\n ERROR DETECTED! Mex file cannot be compiled.\n')
- fprintf('\tThoubleshooting: chance your current folder to ..\openGJK\1_src\example2_mex')
fprintf('\tFor more information, see ')
fprintf('this documentation page.\n\n')
return
diff --git a/example3_csharp/main.cs b/example3_csharp/main.cs
index f188dda..a342be9 100644
--- a/example3_csharp/main.cs
+++ b/example3_csharp/main.cs
@@ -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 Foobar. If not, see . *
+ * *
+ * openGJK: open-source Gilbert-Johnson-Keerthi algorithm *
+ * Copyright (C) Mattia Montanari 2018 - 2019 *
+ * http://iel.eng.ox.ac.uk/?page_id=504 *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
using System;
using System.Runtime.InteropServices;
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 984356c..7748490 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -7,7 +7,25 @@
# # # # # # ## # # # # # # #
# #### # ###### # # ##### ##### # # #
# #
-# Mattia Montanari | University of Oxford 2019 #
+# 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 Foobar. If not, see . #
+# #
+# openGJK: open-source Gilbert-Johnson-Keerthi algorithm #
+# Copyright (C) Mattia Montanari 2018 - 2019 #
+# http://iel.eng.ox.ac.uk/?page_id=504 #
+# #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
diff --git a/lib/ext/predicates.h b/lib/ext/predicates.h
index 82b6324..95bedae 100644
--- a/lib/ext/predicates.h
+++ b/lib/ext/predicates.h
@@ -1,6 +1,31 @@
-//
-// Created by mmontanari on 29/06/16.
-//
+/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
+ * ##### # # # *
+ * #### ##### ###### # # # # # # # *
+ * # # # # # ## # # # # # *
+ * # # # # ##### # # # # #### # ### *
+ * # # ##### # # # # # # # # # # *
+ * # # # # # ## # # # # # # *
+ * #### # ###### # # ##### ##### # # *
+ * *
+ * 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 Foobar. If not, see . *
+ * *
+ * openGJK: open-source Gilbert-Johnson-Keerthi algorithm *
+ * Copyright (C) Mattia Montanari 2018 - 2019 *
+ * http://iel.eng.ox.ac.uk/?page_id=504 *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#include
#include
diff --git a/lib/include/openGJK/openGJK.h b/lib/include/openGJK/openGJK.h
index 22c62e5..49bea49 100644
--- a/lib/include/openGJK/openGJK.h
+++ b/lib/include/openGJK/openGJK.h
@@ -1,19 +1,37 @@
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-* ##### # # # *
-* #### ##### ###### # # # # # # # *
-* # # # # # ## # # # # # *
-* # # # # ##### # # # # #### # ### *
-* # # ##### # # # # # # # # # # *
-* # # # # # ## # # # # # # *
-* #### # ###### # # ##### ##### # # *
-* *
-* Mattia Montanari | University of Oxford 2019 *
-* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-* *
-* This is the header file for the openGJK.c file. It defines the openGJK *
-* function and it two important structures: bd and simplex. *
-* *
-* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+ * ##### # # # *
+ * #### ##### ###### # # # # # # # *
+ * # # # # # ## # # # # # *
+ * # # # # ##### # # # # #### # ### *
+ * # # ##### # # # # # # # # # # *
+ * # # # # # ## # # # # # # *
+ * #### # ###### # # ##### ##### # # *
+ * *
+ * 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 Foobar. If not, see . *
+ * *
+ * openGJK: open-source Gilbert-Johnson-Keerthi algorithm *
+ * Copyright (C) Mattia Montanari 2018 - 2019 *
+ * http://iel.eng.ox.ac.uk/?page_id=504 *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
+ * *
+ * This is the header file for the openGJK.c file. It defines the *
+ * openGJK function and its structures. *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#ifndef __OPENGJK_H__
#define __OPENGJK_H__
diff --git a/lib/src/openGJK.c b/lib/src/openGJK.c
index 0abe0a1..b9bbee3 100644
--- a/lib/src/openGJK.c
+++ b/lib/src/openGJK.c
@@ -1,23 +1,40 @@
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-* ##### # # # *
-* #### ##### ###### # # # # # # # *
-* # # # # # ## # # # # # *
-* # # # # ##### # # # # #### # ### *
-* # # ##### # # # # # # # # # # *
-* # # # # # ## # # # # # # *
-* #### # ###### # # ##### ##### # # *
-* *
-* *
-* Mattia Montanari | University of Oxford 2019 *
-* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
-* *
-* This file implements the GJK algorithm and the Signed Volumes method as *
-* presented in: *
-* M. Montanari, N. Petrinic, E. Barbieri, "Improving the GJK Algorithm *
-* for Faster and More Reliable Distance Queries Between Convex Objects" *
-* ACM Transactions on Graphics, vol. 36, no. 3, Jun. 2017. *
-* *
-* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+ * ##### # # # *
+ * #### ##### ###### # # # # # # # *
+ * # # # # # ## # # # # # *
+ * # # # # ##### # # # # #### # ### *
+ * # # ##### # # # # # # # # # # *
+ * # # # # # ## # # # # # # *
+ * #### # ###### # # ##### ##### # # *
+ * *
+ * 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 Foobar. If not, see . *
+ * *
+ * openGJK: open-source Gilbert-Johnson-Keerthi algorithm *
+ * Copyright (C) Mattia Montanari 2018 - 2019 *
+ * http://iel.eng.ox.ac.uk/?page_id=504 *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
+ * *
+ * This file implements the GJK algorithm and the Signed Volumes method as*
+ * presented in: *
+ * M. Montanari, N. Petrinic, E. Barbieri, "Improving the GJK Algorithm *
+ * for Faster and More Reliable Distance Queries Between Convex Objects"*
+ * ACM Transactions on Graphics, vol. 36, no. 3, Jun. 2017. *
+ * *
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/**
* @file openGJK.c