[FreeSOLID] Initial import 787713
Martin Gansser
martinkg at fedoraproject.org
Mon Jul 16 17:34:02 UTC 2012
commit 31163c5bc0d9e9950db18ee2fd9538eb1c4d6937
Author: Martin Gansser <mgansser at alice.de>
Date: Mon Jul 16 19:32:42 2012 +0200
Initial import 787713
.gitignore | 1 +
FreeSOLID-2.1.1-Makefile.am-update.patch | 56 ++
FreeSOLID-2.1.1-autotools.patch | 72 ++
FreeSOLID-2.1.1-configure.patch | 49 ++
FreeSOLID-2.1.1-endpoint.patch | 207 +++++
FreeSOLID-2.1.1-freesolid-config.patch | 34 +
FreeSOLID-2.1.1-fsf-fix.patch | 624 +++++++++++++++
FreeSOLID-2.1.1-headers.patch | 229 ++++++
FreeSOLID-2.1.1-pkgconfig.patch | 64 ++
FreeSOLID-2.1.1-src.patch | 1275 ++++++++++++++++++++++++++++++
FreeSOLID.spec | 139 ++++
sources | 1 +
12 files changed, 2751 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ebd4963 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/FreeSOLID-2.1.1.zip
diff --git a/FreeSOLID-2.1.1-Makefile.am-update.patch b/FreeSOLID-2.1.1-Makefile.am-update.patch
new file mode 100644
index 0000000..26df59e
--- /dev/null
+++ b/FreeSOLID-2.1.1-Makefile.am-update.patch
@@ -0,0 +1,56 @@
+FreeSOLID-2.1.1-Makefile.am-update.patch
+
+From: Alec Leamas <alec at tests.notat.diaspora.com>
+
+
+---
+
+ Makefile.am | 20 ++++++++++++++++++--
+ libsolid/Makefile.am | 2 +-
+ 2 files changed, 19 insertions(+), 3 deletions(-)
+
+
+diff --git a/Makefile.am b/Makefile.am
+index 27a736c..2a817bf 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,8 +1,24 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+-EXTRA_DIST = include FreeSOLID.pc.in
++EXTRA_DIST = FreeSOLID.pc.in
+ bin_SCRIPTS = freesolid-config
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-dist_pkgconfig_DATA = FreeSOLID.pc
++nodist_pkgconfig_DATA = FreeSOLID.pc
++
++FreeSOLID_3Ddir = $(includedir)/FreeSOLID/3D
++FreeSOLID_3D_HEADERS =
++FreeSOLID_3D_HEADERS += include/3D/Basic.h
++FreeSOLID_3D_HEADERS += include/3D/Matrix.h
++FreeSOLID_3D_HEADERS += include/3D/Point.h
++FreeSOLID_3D_HEADERS += include/3D/Quaternion.h
++FreeSOLID_3D_HEADERS += include/3D/Tuple3.h
++FreeSOLID_3D_HEADERS += include/3D/Tuple4.h
++FreeSOLID_3D_HEADERS += include/3D/Vector.h
++
++FreeSOLID_SOLIDdir = $(includedir)/FreeSOLID/SOLID
++FreeSOLID_SOLID_HEADERS =
++FreeSOLID_SOLID_HEADERS += include/SOLID/solid.h
++FreeSOLID_SOLID_HEADERS += include/SOLID/broad.h
++FreeSOLID_SOLID_HEADERS += include/SOLID/types.h
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index f722be3..623b2e8 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -21,7 +21,7 @@ libFreeSOLID_la_SOURCES = \
+ ../libmoto/MT_Vector4.cpp
+
+
+-libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@ -release @VERSION@
++libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@
+
+ AM_CPPFLAGS = @CPPFLAGS@
+ LIBS = @QHULL_LIBS@ -lm
diff --git a/FreeSOLID-2.1.1-autotools.patch b/FreeSOLID-2.1.1-autotools.patch
new file mode 100644
index 0000000..82a190b
--- /dev/null
+++ b/FreeSOLID-2.1.1-autotools.patch
@@ -0,0 +1,72 @@
+diff --git a/Makefile.am b/Makefile.am
+index 4914f44..77b157a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,4 +1,5 @@
++ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+ EXTRA_DIST = include
+-bin_SCRIPTS = freesolid-config
+\ No newline at end of file
++bin_SCRIPTS = freesolid-config
+diff --git a/configure.in b/configure.in
+index 7d61ba5..41a761c 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1,5 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(sample/sample.cpp)
++AC_CONFIG_MACRO_DIR([m4])
+
+ AC_CANONICAL_SYSTEM
+ PACKAGE=FreeSOLID
+@@ -22,17 +23,14 @@ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
+ AC_PROG_LIBTOOL
+
+ CPPFLAGS="$CPPFLAGS -I../include -I./include -I. -I../libbroad -I../libmoto"
+ AC_SUBST(CPPFLAGS)
+
+ dnl Checks for libraries.
+-dnl Replace `main' with a function in -lm:
+-AC_CHECK_LIB(m, main)
+-dnl Replace `main' with a function in -lqhull:
+-AC_CHECK_LIB(qhull, main, s_have_qhull=yes)
++AC_CHECK_LIB(m, ceil)
++AC_CHECK_LIB(qhull, qh_initbuild, s_have_qhull=yes)
+
+ if test "X${s_have_qhull}" = Xyes; then
+ QHULL_LIBS="-lqhull"
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index cc295c7..f722be3 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -23,7 +23,7 @@ libFreeSOLID_la_SOURCES = \
+
+ libFreeSOLID_la_LDFLAGS = -no-undefined -version-info @FREESOLID_CURRENT@:@FREESOLID_REVISION@:@FREESOLID_AGE@ -release @VERSION@
+
+-CPPFLAGS = @CPPFLAGS@
++AM_CPPFLAGS = @CPPFLAGS@
+ LIBS = @QHULL_LIBS@ -lm
+
+ pkginclude_HEADERS = \
+diff --git a/m4/.gitkeep b/m4/.gitkeep
+new file mode 100644
+index 0000000..e69de29
+diff --git a/sample/Makefile.am b/sample/Makefile.am
+index 5559fb0..eaa705f 100644
+--- a/sample/Makefile.am
++++ b/sample/Makefile.am
+@@ -4,7 +4,7 @@ sample_SOURCES = sample.cpp
+ x_wing_SOURCES = x_wing.cpp
+ teapot_SOURCES = teapot.cpp
+
+-CPPFLAGS = @CPPFLAGS@
++AM_CPPFLAGS = @CPPFLAGS@
+
+ LDADD = ../libsolid/libFreeSOLID.la
+
diff --git a/FreeSOLID-2.1.1-configure.patch b/FreeSOLID-2.1.1-configure.patch
new file mode 100644
index 0000000..dc52eb5
--- /dev/null
+++ b/FreeSOLID-2.1.1-configure.patch
@@ -0,0 +1,49 @@
+--- FreeSOLID-2.1.1/configure.in.orig 2012-05-24 20:58:30.000000000 +0200
++++ FreeSOLID-2.1.1/configure.in 2012-05-24 21:08:00.932445488 +0200
+@@ -1,8 +1,11 @@
+ dnl Process this file with autoconf to produce a configure script.
+-AC_INIT(sample/sample.cpp)
++AC_INIT
+ AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_SRCDIR([sample/sample.cpp])
+
+-AC_CANONICAL_SYSTEM
++AC_CONFIG_MACRO_DIR([m4])
++
++AC_CANONICAL_TARGET
+ PACKAGE=FreeSOLID
+ VERSION=2.1.1
+ FREESOLID_CURRENT=2
+@@ -15,15 +18,14 @@
+
+ AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+-AM_CONFIG_HEADER(include/config.h)
++AC_CONFIG_HEADERS([include/config.h])
+
+ dnl Checks for programs.
+-AC_LIBTOOL_WIN32_DLL
+ AC_PROG_CXX
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+-AC_PROG_LIBTOOL
++LT_INIT([win32-dll])
+
+ CPPFLAGS="$CPPFLAGS -I../include -I./include -I. -I../libbroad -I../libmoto"
+ AC_SUBST(CPPFLAGS)
+@@ -52,11 +54,6 @@
+ AC_CHECK_FUNCS(sqrt)
+ AC_CHECK_FUNCS(fabs)
+
+-AC_OUTPUT([ doc/Makefile
+- sample/Makefile
+- Makefile
+- libbroad/Makefile
+- libmoto/Makefile
+- libsolid/Makefile
+- freesolid-config
+- FreeSOLID.pc])
++AC_CONFIG_FILES([doc/Makefile sample/Makefile Makefile libbroad/Makefile libmoto/Makefile libsolid/Makefile freesolid-config])
++AC_CONFIG_FILES([FreeSOLID.pc])
++AC_OUTPUT
diff --git a/FreeSOLID-2.1.1-endpoint.patch b/FreeSOLID-2.1.1-endpoint.patch
new file mode 100644
index 0000000..dd46a1a
--- /dev/null
+++ b/FreeSOLID-2.1.1-endpoint.patch
@@ -0,0 +1,207 @@
+diff --git a/libsolid/Endpoint.cpp b/libsolid/Endpoint.cpp
+new file mode 100644
+index 0000000..33c2030
+--- /dev/null
++++ b/libsolid/Endpoint.cpp
+@@ -0,0 +1,113 @@
++/*
++ SOLID - Software Library for Interference Detection
++ Copyright (C) 1997-1998 Gino van den Bergen
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library 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
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this library; if not, write to the Free
++ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ Please send remarks, questions and bug reports to gino at win.tue.nl,
++ or write to:
++ Gino van den Bergen
++ Department of Mathematics and Computing Science
++ Eindhoven University of Technology
++ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
++*/
++
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
++#include "Endpoint.h"
++#include "Object.h"
++#include "Encounter.h"
++
++#include <new>
++
++void addPair(ObjectPtr object1, ObjectPtr object2);
++void removePair(ObjectPtr object1, ObjectPtr object2);
++
++class EndpointList {
++public:
++ Endpoint head;
++ Endpoint tail;
++
++ EndpointList() {
++ head.succ = &tail;
++ head.pos = -INFINITY_;
++ tail.pred = &head;
++ tail.pos = INFINITY_;
++ }
++};
++
++static EndpointList endpointList[3];
++
++inline void Endpoint::insert(Endpoint *p) {
++ succ = p;
++ pred = p->pred;
++ succ->pred = this;
++ pred->succ = this;
++}
++
++inline bool operator<(const Endpoint& a, const Endpoint& b) {
++ return a.pos < b.pos || (a.pos == b.pos && a.side < b.side);
++}
++
++inline void update(const Endpoint& a, const Endpoint& b) {
++ if (a.side != b.side && a.objPtr != b.objPtr) {
++ if (a.side == MAX) {
++ if (intersect(a.objPtr->getBBox(), b.objPtr->getBBox()))
++ addPair(a.objPtr, b.objPtr);
++ }
++ else removePair(a.objPtr, b.objPtr);
++ }
++}
++
++Endpoint::Endpoint(int axis, Side s, const Object *obj) :
++ side(s),
++ objPtr(obj),
++ pos(INFINITY_)
++{ insert(&endpointList[axis].tail); }
++
++void Endpoint::move(Scalar x) {
++ int sign = sgn(x - pos);
++ pos = x;
++ switch (sign) {
++ case -1:
++ if (*this < *pred) {
++ remove();
++ do update(*pred, *this);
++ while (*this < *(pred = pred->pred));
++ succ = pred->succ;
++ pred->succ = this;
++ succ->pred = this;
++ }
++ break;
++ case 1:
++ if (*succ < *this) {
++ remove();
++ do update(*this, *succ);
++ while (*(succ = succ->succ) < *this);
++ pred = succ->pred;
++ succ->pred = this;
++ pred->succ = this;
++ }
++ break;
++ }
++}
++
++
++
++
++
++
+diff --git a/libsolid/Endpoint.h b/libsolid/Endpoint.h
+new file mode 100644
+index 0000000..83cdb74
+--- /dev/null
++++ b/libsolid/Endpoint.h
+@@ -0,0 +1,62 @@
++/*
++ SOLID - Software Library for Interference Detection
++ Copyright (C) 1997-1998 Gino van den Bergen
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library 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
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public
++ License along with this library; if not, write to the Free
++ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++
++ Please send remarks, questions and bug reports to gino at win.tue.nl,
++ or write to:
++ Gino van den Bergen
++ Department of Mathematics and Computing Science
++ Eindhoven University of Technology
++ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
++*/
++
++#ifndef ENDPOINT_H
++#define ENDPOINT_H
++
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
++#include <3D/Basic.h>
++
++enum { MIN = 0, MAX = 1 };
++typedef int Side;
++
++class Object;
++
++class Endpoint {
++public:
++ Endpoint *succ;
++ Endpoint *pred;
++ Side side;
++ const Object *objPtr;
++ Scalar pos;
++
++ Endpoint() : objPtr(0) {}
++ Endpoint(int axis, Side s, const Object *obj);
++ ~Endpoint() { if (objPtr) remove(); }
++
++ void move(Scalar x);
++
++private:
++ void insert(Endpoint *p);
++ void remove() { succ->pred = pred; pred->succ = succ; }
++};
++
++
++#endif
++
+diff --git a/libsolid/Makefile.am b/libsolid/Makefile.am
+index 5c4b818..cc295c7 100644
+--- a/libsolid/Makefile.am
++++ b/libsolid/Makefile.am
+@@ -2,6 +2,7 @@ lib_LTLIBRARIES = libFreeSOLID.la
+
+ libFreeSOLID_la_SOURCES = \
+ Transform.cpp Convex.cpp Box.cpp Cone.cpp Cylinder.cpp Sphere.cpp \
++ Endpoint.cpp \
+ Simplex.cpp Polygon.cpp Polyhedron.cpp Complex.cpp \
+ BBoxTree.cpp Object.cpp Response.cpp RespTable.cpp \
+ C-api.cpp \
+@@ -35,6 +36,7 @@ pkginclude_HEADERS = \
+ Convex.h \
+ Cylinder.h \
+ Encounter.h \
++ Endpoint.h \
+ IndexArray.h \
+ Object.h \
+ Polygon.h \
diff --git a/FreeSOLID-2.1.1-freesolid-config.patch b/FreeSOLID-2.1.1-freesolid-config.patch
new file mode 100644
index 0000000..4dcf26e
--- /dev/null
+++ b/FreeSOLID-2.1.1-freesolid-config.patch
@@ -0,0 +1,34 @@
+FreeSOLID-2.1.1-freesolid-config.patch
+
+From: Alec Leamas <alec at tests.notat.diaspora.com>
+
+
+---
+
+ freesolid-config.in | 8 +++-----
+ 1 files changed, 3 insertions(+), 5 deletions(-)
+
+
+diff --git a/freesolid-config.in b/freesolid-config.in
+index e6f4326..7bad5f3 100644
+--- a/freesolid-config.in
++++ b/freesolid-config.in
+@@ -36,15 +36,13 @@ while test $# -gt 0; do
+ echo $exec_prefix
+ ;;
+ --version)
+- echo @FREESOLID_VERSION@
++ pkg-config --modversion FreeSOLID
+ ;;
+ --cflags)
+- includedirs=""
+- echo $includedirs -I at includedir@/freesolid
++ pkg-config --cflags FreeSOLID
+ ;;
+ --libs)
+- libdirs=""
+- echo -L at libdir@ -lfreesolid $libdirs
++ pkg-config --libs FreeSOLID
+ ;;
+ *)
+ echo "${usage}" 1>&2
diff --git a/FreeSOLID-2.1.1-fsf-fix.patch b/FreeSOLID-2.1.1-fsf-fix.patch
new file mode 100644
index 0000000..75d32ab
--- /dev/null
+++ b/FreeSOLID-2.1.1-fsf-fix.patch
@@ -0,0 +1,624 @@
+diff --git a/include/3D/Basic.h b/include/3D/Basic.h
+index 6c1a9fa..9a9d811 100644
+--- a/include/3D/Basic.h
++++ b/include/3D/Basic.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/3D/Matrix.h b/include/3D/Matrix.h
+index 8ab6460..adc0993 100644
+--- a/include/3D/Matrix.h
++++ b/include/3D/Matrix.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/3D/Point.h b/include/3D/Point.h
+index 9fd4e5b..2b22ec8 100644
+--- a/include/3D/Point.h
++++ b/include/3D/Point.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/3D/Quaternion.h b/include/3D/Quaternion.h
+index 1a21dd4..f81f8b6 100644
+--- a/include/3D/Quaternion.h
++++ b/include/3D/Quaternion.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/3D/Tuple3.h b/include/3D/Tuple3.h
+index 60bb172..24dd31a 100644
+--- a/include/3D/Tuple3.h
++++ b/include/3D/Tuple3.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/3D/Tuple4.h b/include/3D/Tuple4.h
+index e1044b9..c778d59 100644
+--- a/include/3D/Tuple4.h
++++ b/include/3D/Tuple4.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/3D/Vector.h b/include/3D/Vector.h
+index 1e99c34..12ee676 100644
+--- a/include/3D/Vector.h
++++ b/include/3D/Vector.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/include/SOLID/solid.h b/include/SOLID/solid.h
+index bb87290..3fdd7f9 100644
+--- a/include/SOLID/solid.h
++++ b/include/SOLID/solid.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libmoto/GEN_List.h b/libmoto/GEN_List.h
+index 60b74eb..4733010 100644
+--- a/libmoto/GEN_List.h
++++ b/libmoto/GEN_List.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libmoto/GEN_random.cpp b/libmoto/GEN_random.cpp
+index dced59f..1d69ede 100644
+--- a/libmoto/GEN_random.cpp
++++ b/libmoto/GEN_random.cpp
+@@ -19,7 +19,7 @@
+ /* See the GNU Library General Public License for more details. */
+ /* You should have received a copy of the GNU Library General */
+ /* Public License along with this library; if not, write to the */
+-/* Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA */
++/* Free Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA */
+ /* 02111-1307 USA */
+
+ /* Copyright (C) 1997 Makoto Matsumoto and Takuji Nishimura. */
+diff --git a/libsolid/AlgoTable.h b/libsolid/AlgoTable.h
+index c261ce9..efc9622 100644
+--- a/libsolid/AlgoTable.h
++++ b/libsolid/AlgoTable.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/BBox.h b/libsolid/BBox.h
+index 545483b..f5810b9 100644
+--- a/libsolid/BBox.h
++++ b/libsolid/BBox.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/BBoxTree.cpp b/libsolid/BBoxTree.cpp
+index 36699a4..c4a6334 100644
+--- a/libsolid/BBoxTree.cpp
++++ b/libsolid/BBoxTree.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/BBoxTree.h b/libsolid/BBoxTree.h
+index e770270..7ddae09 100644
+--- a/libsolid/BBoxTree.h
++++ b/libsolid/BBoxTree.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Box.cpp b/libsolid/Box.cpp
+index ee2dfab..430c031 100644
+--- a/libsolid/Box.cpp
++++ b/libsolid/Box.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Box.h b/libsolid/Box.h
+index 77083c9..86724a7 100644
+--- a/libsolid/Box.h
++++ b/libsolid/Box.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/C-api.cpp b/libsolid/C-api.cpp
+index d93eb38..e311e3b 100644
+--- a/libsolid/C-api.cpp
++++ b/libsolid/C-api.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Complex.cpp b/libsolid/Complex.cpp
+index c1efa7d..cf9913a 100644
+--- a/libsolid/Complex.cpp
++++ b/libsolid/Complex.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Complex.h b/libsolid/Complex.h
+index 182143f..41dd7f8 100644
+--- a/libsolid/Complex.h
++++ b/libsolid/Complex.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Cone.cpp b/libsolid/Cone.cpp
+index a7f5691..47e1d2c 100644
+--- a/libsolid/Cone.cpp
++++ b/libsolid/Cone.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Cone.h b/libsolid/Cone.h
+index 047dc45..32422a2 100644
+--- a/libsolid/Cone.h
++++ b/libsolid/Cone.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Convex.cpp b/libsolid/Convex.cpp
+index caf8e11..fce9372 100644
+--- a/libsolid/Convex.cpp
++++ b/libsolid/Convex.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Convex.h b/libsolid/Convex.h
+index e238aab..cd6a256 100644
+--- a/libsolid/Convex.h
++++ b/libsolid/Convex.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Cylinder.cpp b/libsolid/Cylinder.cpp
+index 660115c..378781e 100644
+--- a/libsolid/Cylinder.cpp
++++ b/libsolid/Cylinder.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Cylinder.h b/libsolid/Cylinder.h
+index 21e305b..319798c 100644
+--- a/libsolid/Cylinder.h
++++ b/libsolid/Cylinder.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Encounter.h b/libsolid/Encounter.h
+index 60ad581..eff6cb6 100644
+--- a/libsolid/Encounter.h
++++ b/libsolid/Encounter.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Endpoint.cpp b/libsolid/Endpoint.cpp
+index 33c2030..187106a 100644
+--- a/libsolid/Endpoint.cpp
++++ b/libsolid/Endpoint.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Endpoint.h b/libsolid/Endpoint.h
+index 83cdb74..f7e6f85 100644
+--- a/libsolid/Endpoint.h
++++ b/libsolid/Endpoint.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/IndexArray.h b/libsolid/IndexArray.h
+index 417c034..ca1cde7 100644
+--- a/libsolid/IndexArray.h
++++ b/libsolid/IndexArray.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Object.cpp b/libsolid/Object.cpp
+index ada4dfa..3a59907 100644
+--- a/libsolid/Object.cpp
++++ b/libsolid/Object.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Object.h b/libsolid/Object.h
+index 24b9a2d..5739ec5 100644
+--- a/libsolid/Object.h
++++ b/libsolid/Object.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Polygon.cpp b/libsolid/Polygon.cpp
+index 5b225f0..5ceadfd 100644
+--- a/libsolid/Polygon.cpp
++++ b/libsolid/Polygon.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Polygon.h b/libsolid/Polygon.h
+index 0c182f4..488a25b 100644
+--- a/libsolid/Polygon.h
++++ b/libsolid/Polygon.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Polyhedron.cpp b/libsolid/Polyhedron.cpp
+index 28c873f..125c9b7 100644
+--- a/libsolid/Polyhedron.cpp
++++ b/libsolid/Polyhedron.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Polyhedron.h b/libsolid/Polyhedron.h
+index 4719d88..3ee474e 100644
+--- a/libsolid/Polyhedron.h
++++ b/libsolid/Polyhedron.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Polytope.h b/libsolid/Polytope.h
+index 480bbd3..8e2d331 100644
+--- a/libsolid/Polytope.h
++++ b/libsolid/Polytope.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/RespTable.cpp b/libsolid/RespTable.cpp
+index 7671bac..b4cb74a 100644
+--- a/libsolid/RespTable.cpp
++++ b/libsolid/RespTable.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/RespTable.h b/libsolid/RespTable.h
+index 776a4b2..363952f 100644
+--- a/libsolid/RespTable.h
++++ b/libsolid/RespTable.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Response.cpp b/libsolid/Response.cpp
+index 947133c..a1846ab 100644
+--- a/libsolid/Response.cpp
++++ b/libsolid/Response.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Response.h b/libsolid/Response.h
+index 5151c75..9e832eb 100644
+--- a/libsolid/Response.h
++++ b/libsolid/Response.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Shape.h b/libsolid/Shape.h
+index 7ef4529..177a252 100644
+--- a/libsolid/Shape.h
++++ b/libsolid/Shape.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Simplex.cpp b/libsolid/Simplex.cpp
+index 107011f..02d6af1 100644
+--- a/libsolid/Simplex.cpp
++++ b/libsolid/Simplex.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Simplex.h b/libsolid/Simplex.h
+index cb7804d..cb5e0bc 100644
+--- a/libsolid/Simplex.h
++++ b/libsolid/Simplex.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Sphere.cpp b/libsolid/Sphere.cpp
+index ccb2dfc..ac83f41 100644
+--- a/libsolid/Sphere.cpp
++++ b/libsolid/Sphere.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Sphere.h b/libsolid/Sphere.h
+index 1d33d03..010f460 100644
+--- a/libsolid/Sphere.h
++++ b/libsolid/Sphere.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Transform.cpp b/libsolid/Transform.cpp
+index 86af809..c52808f 100644
+--- a/libsolid/Transform.cpp
++++ b/libsolid/Transform.cpp
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/Transform.h b/libsolid/Transform.h
+index fbc6b9a..5a32da5 100644
+--- a/libsolid/Transform.h
++++ b/libsolid/Transform.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
+diff --git a/libsolid/VertexBase.h b/libsolid/VertexBase.h
+index 487a02a..6b801c3 100644
+--- a/libsolid/VertexBase.h
++++ b/libsolid/VertexBase.h
+@@ -14,7 +14,7 @@
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please send remarks, questions and bug reports to gino at win.tue.nl,
+ or write to:
diff --git a/FreeSOLID-2.1.1-headers.patch b/FreeSOLID-2.1.1-headers.patch
new file mode 100644
index 0000000..52740a9
--- /dev/null
+++ b/FreeSOLID-2.1.1-headers.patch
@@ -0,0 +1,229 @@
+diff --git a/include/3D/Basic.h b/include/3D/Basic.h
+index eb7ac87..6c1a9fa 100644
+--- a/include/3D/Basic.h
++++ b/include/3D/Basic.h
+@@ -29,26 +29,22 @@
+
+ #include <math.h>
+ #include <stdlib.h>
+-#include "config.h"
+
+-typedef double Scalar;
+-
+-#if HAVE_FABS
+-/* If Scalar is changed to a float, use fabsf instead */
+-#define abs(dbl) fabs(dbl)
+-#endif
++/* typedef double Scalar; */
++#define Scalar double
+
+ const Scalar DEGS_PER_RAD = 57.29577951308232286465;
+ const Scalar RADS_PER_DEG = 0.01745329251994329547;
+ const Scalar TWO_PI = 6.28318530717958623200;
+ const Scalar EPSILON = 1.0e-10;
+ const Scalar EPSILON2 = 1.0e-20;
+-const Scalar SOLID_INFINITY = 1.0e50;
++const Scalar INFINITY_ = 1.0e50;
++
+
++/* inline Scalar abs(Scalar x) { return x < 0 ? -x : x; } */
+ inline Scalar rnd() { return (Scalar(rand()) + 0.5) / (Scalar(RAND_MAX) + 1); }
+-inline Scalar sabs(Scalar x) { return x < 0 ? -x : x; }
+ inline int sgn(Scalar x) { return x < 0 ? -1 : x > 0 ? 1 : 0; }
+-inline bool eqz(Scalar x) { return (sabs(x) <= EPSILON); }
++inline bool eqz(Scalar x) { return fabs(x) <= EPSILON; }
+
+ inline Scalar min(Scalar x, Scalar y) { return x > y ? y : x; }
+ inline Scalar max(Scalar x, Scalar y) { return x < y ? y : x; }
+diff --git a/include/3D/Matrix.h b/include/3D/Matrix.h
+index e584a49..8ab6460 100644
+--- a/include/3D/Matrix.h
++++ b/include/3D/Matrix.h
+@@ -141,9 +141,9 @@ inline Scalar Matrix::determinant() const {
+ }
+
+ inline Matrix Matrix::absolute() const {
+- return Matrix(sabs(elem[X][X]), sabs(elem[X][Y]), sabs(elem[X][Z]),
+- sabs(elem[Y][X]), sabs(elem[Y][Y]), sabs(elem[Y][Z]),
+- sabs(elem[Z][X]), sabs(elem[Z][Y]), sabs(elem[Z][Z]));
++ return Matrix(fabs(elem[X][X]), fabs(elem[X][Y]), fabs(elem[X][Z]),
++ fabs(elem[Y][X]), fabs(elem[Y][Y]), fabs(elem[Y][Z]),
++ fabs(elem[Z][X]), fabs(elem[Z][Y]), fabs(elem[Z][Z]));
+ }
+
+ inline Matrix Matrix::transpose() const {
+diff --git a/include/3D/Vector.h b/include/3D/Vector.h
+index 7885316..1e99c34 100644
+--- a/include/3D/Vector.h
++++ b/include/3D/Vector.h
+@@ -132,8 +132,8 @@ inline Vector Vector::normalized() const { return *this / length(); }
+
+ inline int Vector::closestAxis() const {
+ Scalar a[2];
+- int axis = (a[X] = sabs(comp[X])) < (a[Y] = sabs(comp[Y])) ? Y : X;
+- return a[axis] < sabs(comp[Z]) ? Z : axis;
++ int axis = (a[X] = fabs(comp[X])) < (a[Y] = fabs(comp[Y])) ? Y : X;
++ return a[axis] < fabs(comp[Z]) ? Z : axis;
+ }
+
+ inline Vector Vector::random() {
+diff --git a/include/SOLID/solid.h b/include/SOLID/solid.h
+index 227db28..bb87290 100644
+--- a/include/SOLID/solid.h
++++ b/include/SOLID/solid.h
+@@ -24,17 +24,20 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
+-#ifndef SOLID_SOLID_H
+-#define SOLID_SOLID_H
++#ifndef _SOLID_H_
++#define _SOLID_H_
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+-#include "SOLID/types.h"
++typedef double DtScalar;
++typedef DtScalar DtVector[3];
++typedef unsigned int DtIndex;
++typedef unsigned int DtCount;
+
+ typedef void *DtObjectRef;
+-DT_DECLARE_HANDLE(DtShapeRef);
++typedef void *DtShapeRef;
+
+ typedef enum DtPolyType {
+ DT_SIMPLEX,
+@@ -50,9 +53,9 @@ typedef enum DtResponseType {
+ } DtResponseType;
+
+ typedef struct DtCollData {
+- DT_Vector3 point1;
+- DT_Vector3 point2;
+- DT_Vector3 normal;
++ DtVector point1;
++ DtVector point2;
++ DtVector normal;
+ } DtCollData;
+
+ typedef void (*DtResponse)(
+@@ -65,77 +68,76 @@ typedef void (*DtResponse)(
+
+ /* Shape definition */
+
+-extern DECLSPEC DtShapeRef dtBox(DT_Scalar x, DT_Scalar y, DT_Scalar z);
+-extern DECLSPEC DtShapeRef dtCone(DT_Scalar radius, DT_Scalar height);
+-extern DECLSPEC DtShapeRef dtCylinder(DT_Scalar radius, DT_Scalar height);
+-extern DECLSPEC DtShapeRef dtSphere(DT_Scalar radius);
++extern DtShapeRef dtBox(DtScalar x, DtScalar y, DtScalar z);
++extern DtShapeRef dtCone(DtScalar radius, DtScalar height);
++extern DtShapeRef dtCylinder(DtScalar radius, DtScalar height);
++extern DtShapeRef dtSphere(DtScalar radius);
+
+-extern DECLSPEC DtShapeRef dtNewComplexShape();
+-extern DECLSPEC void dtEndComplexShape();
++extern DtShapeRef dtNewComplexShape();
++extern void dtEndComplexShape();
+
+-extern DECLSPEC void dtBegin(DtPolyType type);
+-extern DECLSPEC void dtEnd();
++extern void dtBegin(DtPolyType type);
++extern void dtEnd();
+
+-extern DECLSPEC void dtVertex(DT_Scalar x, DT_Scalar y, DT_Scalar z);
+-extern DECLSPEC void dtVertexBase(const void *base);
+-extern DECLSPEC void dtVertexIndex(DT_Index index);
+-extern DECLSPEC void dtVertexIndices(DtPolyType type, DT_Count count,
+- const DT_Index *indices);
+-extern DECLSPEC void dtVertexRange(DtPolyType type, DT_Index first, DT_Count count);
++extern void dtVertex(DtScalar x, DtScalar y, DtScalar z);
++extern void dtVertexBase(const void *base);
++extern void dtVertexIndex(DtIndex index);
++extern void dtVertexIndices(DtPolyType type, DtCount count,
++ const DtIndex *indices);
++extern void dtVertexRange(DtPolyType type, DtIndex first, DtCount count);
+
+-extern DECLSPEC void dtChangeVertexBase(DtShapeRef shape, const void *base);
++extern void dtChangeVertexBase(DtShapeRef shape, const void *base);
+
+-extern DECLSPEC void dtDeleteShape(DtShapeRef shape);
++extern void dtDeleteShape(DtShapeRef shape);
+
+
+ /* Object */
+
+-extern DECLSPEC void dtCreateObject(DtObjectRef object, DtShapeRef shape);
+-extern DECLSPEC void dtDeleteObject(DtObjectRef object);
+-extern DECLSPEC void dtSelectObject(DtObjectRef object);
++extern void dtCreateObject(DtObjectRef object, DtShapeRef shape);
++extern void dtDeleteObject(DtObjectRef object);
++extern void dtSelectObject(DtObjectRef object);
+
+-extern DECLSPEC void dtLoadIdentity();
++extern void dtLoadIdentity();
+
+-extern DECLSPEC void dtLoadMatrixf(const float *m);
+-extern DECLSPEC void dtLoadMatrixd(const double *m);
++extern void dtLoadMatrixf(const float *m);
++extern void dtLoadMatrixd(const double *m);
+
+-extern DECLSPEC void dtMultMatrixf(const float *m);
+-extern DECLSPEC void dtMultMatrixd(const double *m);
++extern void dtMultMatrixf(const float *m);
++extern void dtMultMatrixd(const double *m);
+
+-extern DECLSPEC void dtTranslate(DT_Scalar x, DT_Scalar y, DT_Scalar z);
+-extern DECLSPEC void dtRotate(DT_Scalar x, DT_Scalar y, DT_Scalar z, DT_Scalar w);
+-extern DECLSPEC void dtScale(DT_Scalar x, DT_Scalar y, DT_Scalar z);
++extern void dtTranslate(DtScalar x, DtScalar y, DtScalar z);
++extern void dtRotate(DtScalar x, DtScalar y, DtScalar z, DtScalar w);
++extern void dtScale(DtScalar x, DtScalar y, DtScalar z);
+
+
+ /* Response */
+
+-extern DECLSPEC void dtSetDefaultResponse(DtResponse response, DtResponseType type,
++extern void dtSetDefaultResponse(DtResponse response, DtResponseType type,
+ void *client_data);
+
+-extern DECLSPEC void dtClearDefaultResponse();
++extern void dtClearDefaultResponse();
+
+-extern DECLSPEC void dtSetObjectResponse(DtObjectRef object, DtResponse response,
++extern void dtSetObjectResponse(DtObjectRef object, DtResponse response,
+ DtResponseType type, void *client_data);
+-extern DECLSPEC void dtClearObjectResponse(DtObjectRef object);
+-extern DECLSPEC void dtResetObjectResponse(DtObjectRef object);
++extern void dtClearObjectResponse(DtObjectRef object);
++extern void dtResetObjectResponse(DtObjectRef object);
+
+-extern DECLSPEC void dtSetPairResponse(DtObjectRef object1, DtObjectRef object2,
++extern void dtSetPairResponse(DtObjectRef object1, DtObjectRef object2,
+ DtResponse response, DtResponseType type,
+ void *client_data);
+-extern DECLSPEC void dtClearPairResponse(DtObjectRef object1, DtObjectRef object2);
+-extern DECLSPEC void dtResetPairResponse(DtObjectRef object1, DtObjectRef object2);
++extern void dtClearPairResponse(DtObjectRef object1, DtObjectRef object2);
++extern void dtResetPairResponse(DtObjectRef object1, DtObjectRef object2);
+
+
+ /* Global */
+
+-extern DECLSPEC DT_Count dtTest();
+-extern DECLSPEC void dtTestObjects(DtObjectRef object1, DtObjectRef object2);
+-extern DECLSPEC void dtProceed();
++extern DtCount dtTest();
++extern void dtProceed();
+
+-extern DECLSPEC void dtEnableCaching();
+-extern DECLSPEC void dtDisableCaching();
++extern void dtEnableCaching();
++extern void dtDisableCaching();
+
+-extern DECLSPEC void dtSetTolerance(DT_Scalar tol);
++extern void dtSetTolerance(DtScalar tol);
+
+ #ifdef __cplusplus
+ }
diff --git a/FreeSOLID-2.1.1-pkgconfig.patch b/FreeSOLID-2.1.1-pkgconfig.patch
new file mode 100644
index 0000000..9dbca05
--- /dev/null
+++ b/FreeSOLID-2.1.1-pkgconfig.patch
@@ -0,0 +1,64 @@
+diff --git a/FreeSOLID.pc b/FreeSOLID.pc
+new file mode 100644
+index 0000000..357f04e
+--- /dev/null
++++ b/FreeSOLID.pc
+@@ -0,0 +1,10 @@
++prefix=/usr
++exec_prefix=/usr
++libdir=/usr/lib
++includedir=/usr/include
++
++Name: FreeSolid
++Description: 3D collision detection C++ library
++Version: 2.1.1
++Libs: -L${libdir} -lFreeSOLID
++Cflags: -I${includedir} -I/usr/include/FreeSOLID
+diff --git a/FreeSOLID.pc.in b/FreeSOLID.pc.in
+new file mode 100644
+index 0000000..c354f05
+--- /dev/null
++++ b/FreeSOLID.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: FreeSolid
++Description: 3D collision detection C++ library
++Version: @VERSION@
++Requires: qhull
++Libs: -L${libdir} -lFreeSOLID @QHULL_LIBS@
++Cflags: -I${includedir} -I/usr/include/FreeSOLID
++
+diff --git a/Makefile.am b/Makefile.am
+index 77b157a..27a736c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,8 @@
+ ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS = libmoto libbroad libsolid sample doc
+
+-EXTRA_DIST = include
++EXTRA_DIST = include FreeSOLID.pc.in
+ bin_SCRIPTS = freesolid-config
++
++pkgconfigdir = $(libdir)/pkgconfig
++dist_pkgconfig_DATA = FreeSOLID.pc
+diff --git a/configure.in b/configure.in
+index 41a761c..a4bc7d4 100644
+--- a/configure.in
++++ b/configure.in
+@@ -52,4 +52,11 @@ dnl Checks for library functions.
+ AC_CHECK_FUNCS(sqrt)
+ AC_CHECK_FUNCS(fabs)
+
+-AC_OUTPUT(doc/Makefile sample/Makefile Makefile libbroad/Makefile libmoto/Makefile libsolid/Makefile freesolid-config)
++AC_OUTPUT([ doc/Makefile
++ sample/Makefile
++ Makefile
++ libbroad/Makefile
++ libmoto/Makefile
++ libsolid/Makefile
++ freesolid-config
++ FreeSOLID.pc])
diff --git a/FreeSOLID-2.1.1-src.patch b/FreeSOLID-2.1.1-src.patch
new file mode 100644
index 0000000..2647580
--- /dev/null
+++ b/FreeSOLID-2.1.1-src.patch
@@ -0,0 +1,1275 @@
+diff --git a/libsolid/AlgoTable.h b/libsolid/AlgoTable.h
+index e9ecd29..c261ce9 100644
+--- a/libsolid/AlgoTable.h
++++ b/libsolid/AlgoTable.h
+@@ -27,6 +27,10 @@
+ #ifndef _ALGOTABLE_H_
+ #define _ALGOTABLE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Shape.h"
+
+ const int NUM_TYPES = 8;
+diff --git a/libsolid/BBox.h b/libsolid/BBox.h
+index 187febc..545483b 100644
+--- a/libsolid/BBox.h
++++ b/libsolid/BBox.h
+@@ -27,20 +27,26 @@
+ #ifndef _BBOX_H_
+ #define _BBOX_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <3D/Point.h>
+
+ class BBox {
+ public:
+ BBox() {}
+- BBox(const Point& mini, const Point& maxi) { setValue(mini,maxi); }
++ BBox(const Point& min, const Point& max) { setValue(min, max); }
+
+ const Point& getCenter() const { return center; }
+ const Vector& getExtent() const { return extent; }
++
+ void setCenter(const Point& p) { center = p; }
+ void setExtent(const Vector& v) { extent = v; }
+- void setValue(const Point& mini,const Point& maxi) {
+- extent = (maxi-mini)/2;
+- center = mini+extent;
++
++ void setValue(const Point& min, const Point& max) {
++ extent = (max - min) / 2;
++ center = min + extent;
+ }
+
+ void enclose(const BBox& a, const BBox& b) {
+@@ -55,7 +61,7 @@ public:
+
+ void setEmpty() {
+ center.setValue(0, 0, 0);
+- extent.setValue(-SOLID_INFINITY,-SOLID_INFINITY,-SOLID_INFINITY);
++ extent.setValue(-INFINITY_, -INFINITY_, -INFINITY_);
+ }
+
+ void include (const Point& p) {
+@@ -73,9 +79,6 @@ public:
+ Scalar getLower(int i) const { return center[i] - extent[i]; }
+ Scalar getUpper(int i) const { return center[i] + extent[i]; }
+
+- Point getLower() const { return center - extent; }
+- Point getUpper() const { return center + extent; }
+-
+ Scalar size() const { return max(max(extent[X], extent[Y]), extent[Z]); }
+ int longestAxis() const { return extent.closestAxis(); }
+
+@@ -87,9 +90,9 @@ private:
+ };
+
+ inline bool intersect(const BBox& a, const BBox& b) {
+- return abs(a.center[X] - b.center[X]) <= a.extent[X] + b.extent[X] &&
+- abs(a.center[Y] - b.center[Y]) <= a.extent[Y] + b.extent[Y] &&
+- abs(a.center[Z] - b.center[Z]) <= a.extent[Z] + b.extent[Z];
++ return fabs(a.center[X] - b.center[X]) <= a.extent[X] + b.extent[X] &&
++ fabs(a.center[Y] - b.center[Y]) <= a.extent[Y] + b.extent[Y] &&
++ fabs(a.center[Z] - b.center[Z]) <= a.extent[Z] + b.extent[Z];
+ }
+
+ #endif
+diff --git a/libsolid/BBoxTree.cpp b/libsolid/BBoxTree.cpp
+index 5f4f52c..36699a4 100644
+--- a/libsolid/BBoxTree.cpp
++++ b/libsolid/BBoxTree.cpp
+@@ -24,6 +24,11 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#pragma warning(disable:4996) // std::_Copy_opt was declared as disaproved because unsafe
++#endif // _MSC_VER
++
+ #include "BBoxTree.h"
+ #include "Transform.h"
+
+@@ -87,13 +92,13 @@ inline bool sep_axes_test(const Vector& a, const Vector& b,
+ ++num_box_tests;
+ #endif
+
+- if (a[X] + dot(abs_b2a[X], b) < abs(pos_b2a[X])) return false;
+- if (a[Y] + dot(abs_b2a[Y], b) < abs(pos_b2a[Y])) return false;
+- if (a[Z] + dot(abs_b2a[Z], b) < abs(pos_b2a[Z])) return false;
++ if (a[X] + dot(abs_b2a[X], b) < fabs(pos_b2a[X])) return false;
++ if (a[Y] + dot(abs_b2a[Y], b) < fabs(pos_b2a[Y])) return false;
++ if (a[Z] + dot(abs_b2a[Z], b) < fabs(pos_b2a[Z])) return false;
+
+- if (b[X] + dot(abs_a2b[X], a) < abs(pos_a2b[X])) return false;
+- if (b[Y] + dot(abs_a2b[Y], a) < abs(pos_a2b[Y])) return false;
+- if (b[Z] + dot(abs_a2b[Z], a) < abs(pos_a2b[Z])) return false;
++ if (b[X] + dot(abs_a2b[X], a) < fabs(pos_a2b[X])) return false;
++ if (b[Y] + dot(abs_a2b[Y], a) < fabs(pos_a2b[Y])) return false;
++ if (b[Z] + dot(abs_a2b[Z], a) < fabs(pos_a2b[Z])) return false;
+
+ return true;
+ }
+diff --git a/libsolid/BBoxTree.h b/libsolid/BBoxTree.h
+index 4402718..e770270 100644
+--- a/libsolid/BBoxTree.h
++++ b/libsolid/BBoxTree.h
+@@ -27,6 +27,10 @@
+ #ifndef _BBOXTREE_H_
+ #define _BBOXTREE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "BBox.h"
+ #include "Polytope.h"
+
+diff --git a/libsolid/Box.cpp b/libsolid/Box.cpp
+index 8d2c40d..ee2dfab 100644
+--- a/libsolid/Box.cpp
++++ b/libsolid/Box.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Box.h"
+
+ Point Box::support(const Vector& v) const {
+diff --git a/libsolid/Box.h b/libsolid/Box.h
+index 0d489e1..77083c9 100644
+--- a/libsolid/Box.h
++++ b/libsolid/Box.h
+@@ -27,6 +27,10 @@
+ #ifndef _BOX_H_
+ #define _BOX_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Convex.h"
+
+ class Box : public Convex {
+diff --git a/libsolid/C-api.cpp b/libsolid/C-api.cpp
+index d1a67bd..d93eb38 100644
+--- a/libsolid/C-api.cpp
++++ b/libsolid/C-api.cpp
+@@ -24,8 +24,12 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#pragma warning(disable:4996) // std::_Copy_opt was declared as disaproved because unsafe
++#endif // _MSC_VER
++
+ #include <SOLID/solid.h>
+-#include <SOLID/broad.h>
+
+ #include <algorithm>
+
+@@ -41,13 +45,14 @@
+ #include "Polyhedron.h"
+ #include "Response.h"
+ #include "RespTable.h"
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++# include <sys/types.h>
++#endif
+
+ #include <map>
+ #include <set>
+ #include <vector>
+
+-#include <stdio.h>
+-
+ typedef vector<Point> PointBuf;
+ typedef vector<unsigned int> IndexBuf;
+ typedef vector<const Polytope *> PolyList;
+@@ -55,55 +60,47 @@ typedef vector<Complex *> ComplexList;
+ typedef map<DtObjectRef, Object *> ObjectList;
+ typedef set<Encounter> ProxList;
+
+-static PointBuf pointBuf;
+-static IndexBuf indexBuf;
+-static PolyList polyList;
+-static ComplexList complexList;
+-static ObjectList objectList;
+-static RespTable respTable;
+-static ProxList proxList;
+-
+-static DtPolyType currentType;
+-static Complex *currentComplex = NULL;
+-static Object *currentObject = NULL;
+-static bool caching = true;
+-
+-
+-
+-void addPair(void *client_data, void *object1, void *object2) {
+- ((ProxList *)client_data)->insert(Encounter((Object *)object1, (Object *)object2));
+-}
+-
+-void removePair(void *client_data, void *object1, void *object2) {
+- ((ProxList *)client_data)->erase(Encounter((Object *)object1, (Object *)object2));
+-}
+-
++#if defined( WIN32) || (__APPLE__)
++#define uint unsigned int
++#endif
+
+-static BP_SceneHandle broadphase = BP_CreateScene(&proxList, addPair, removePair);
++PointBuf pointBuf;
++IndexBuf indexBuf;
++PolyList polyList;
++ComplexList complexList;
++ObjectList objectList;
++RespTable respTable;
++ProxList proxList;
+
++DtPolyType currentType;
++Complex *currentComplex = 0;
++Object *currentObject = 0;
++bool caching = true;
+
+ extern Scalar rel_error;
+
++inline void move() { if (caching && currentObject) currentObject->move(); }
+
+-DtShapeRef dtBox(DT_Scalar x,DT_Scalar y,DT_Scalar z) {
+- return (DtShapeRef)new Box(x,y,z);
++
++DtShapeRef dtBox(DtScalar x, DtScalar y, DtScalar z) {
++ return new Box(x, y, z);
+ }
+
+-DtShapeRef dtCone(DT_Scalar radius,DT_Scalar height) {
+- return (DtShapeRef)new Cone(radius,height);
++DtShapeRef dtCone(DtScalar radius, DtScalar height) {
++ return new Cone(radius, height);
+ }
+
+-DtShapeRef dtCylinder(DT_Scalar radius,DT_Scalar height) {
+- return (DtShapeRef)new Cylinder(radius, height);
++DtShapeRef dtCylinder(DtScalar radius, DtScalar height) {
++ return new Cylinder(radius, height);
+ }
+
+-DtShapeRef dtSphere(DT_Scalar radius) {
+- return (DtShapeRef)new Sphere(radius);
++DtShapeRef dtSphere(DtScalar radius) {
++ return new Sphere(radius);
+ }
+
+ DtShapeRef dtNewComplexShape() {
+ if (!currentComplex) currentComplex = new Complex;
+- return (DtShapeRef)currentComplex;
++ return currentComplex;
+ }
+
+ void dtEndComplexShape() {
+@@ -119,21 +116,18 @@ void dtEndComplexShape() {
+ currentComplex = 0;
+ }
+
+-void dtBegin(DtPolyType type) {
+- currentType = type;
+-}
+-
++void dtBegin(DtPolyType type) { currentType = type; }
+ void dtEnd() {
+ dtVertexIndices(currentType,indexBuf.size(),&indexBuf[0]);
+ indexBuf.erase(indexBuf.begin(),indexBuf.end());
+ }
+
+-void dtVertex(DT_Scalar x,DT_Scalar y,DT_Scalar z) {
++void dtVertex(DtScalar x, DtScalar y, DtScalar z) {
+ Point p(x,y,z);
+ int i = pointBuf.size()-20;
+ if (i < 0) i = 0;
+- while (i < (int)pointBuf.size() && !(pointBuf[i] == p)) ++i;
+- if (i == (int)pointBuf.size()) pointBuf.push_back(p);
++ while ((uint)i < pointBuf.size() && !(pointBuf[i] == p)) ++i;
++ if ((uint)i == pointBuf.size()) pointBuf.push_back(p);
+ indexBuf.push_back(i);
+ }
+
+@@ -141,37 +135,39 @@ void dtVertexBase(const void *base) {
+ currentComplex->setBase(base);
+ }
+
+-void dtVertexIndex(DT_Index idx) {
+- indexBuf.push_back(idx);
+-}
++void dtVertexIndex(DtIndex index) { indexBuf.push_back(index); }
+
+-void dtVertexIndices(DtPolyType type,DT_Count cnt,const DT_Index *indices) {
++void dtVertexIndices(DtPolyType type, DtCount count,
++ const DtIndex *indices) {
+ if (currentComplex) {
+ const Polytope *poly;
+ switch (type) {
+ case DT_SIMPLEX:
+- poly = new Simplex(currentComplex->getBase(), cnt, indices);
++ poly = new Simplex(currentComplex->getBase(), count, indices);
+ break;
+ case DT_POLYGON:
+- poly = new Polygon::Polygon(currentComplex->getBase(), cnt, indices);
++ poly = new Polygon(currentComplex->getBase(), count, indices);
+ break;
+ case DT_POLYHEDRON:
+ if (currentComplex->getBase().getPointer()==0) {
+ currentComplex->setBase(&pointBuf[0]);
+- poly = new Polyhedron(currentComplex->getBase(),cnt,indices);
++ poly = new Polyhedron(currentComplex->getBase(), count, indices);
+ currentComplex->setBase(0);
+ }
+- else poly = new Polyhedron(currentComplex->getBase(),cnt,indices);
++ else poly = new Polyhedron(currentComplex->getBase(), count, indices);
++ break;
++ default:
++ poly = 0;
+ break;
+ }
+ polyList.push_back(poly);
+ }
+ }
+
+-void dtVertexRange(DtPolyType type, DT_Index first, DT_Count cnt) {
+- DT_Index *indices = new DT_Index[cnt];
+- for (unsigned int i = 0; i < cnt;++i) indices[i] = first + i;
+- dtVertexIndices(type,cnt,indices);
++void dtVertexRange(DtPolyType type, DtIndex first, DtCount count) {
++ DtIndex *indices = new DtIndex[count];
++ for (uint i = 0; i < count; ++i) indices[i] = first + i;
++ dtVertexIndices(type, count, indices);
+ delete [] indices;
+ }
+
+@@ -190,7 +186,7 @@ void dtChangeVertexBase(DtShapeRef shape, const void *base) {
+ for (ObjectList::const_iterator i = objectList.begin();
+ i != objectList.end(); ++i) {
+ if ((*i).second->shapePtr == (Shape *)shape) {
+- (*i).second->do_broadphase();
++ (*i).second->move();
+ }
+ }
+ }
+@@ -199,36 +195,37 @@ void dtChangeVertexBase(DtShapeRef shape, const void *base) {
+ // Object instantiation
+
+ void dtCreateObject(DtObjectRef object, DtShapeRef shape) {
+- currentObject = objectList[object] = new Object(object,(Shape *)shape, broadphase);
++ move();
++ currentObject = objectList[object] = new Object(object, (Shape *)shape);
+ }
+
+ void dtSelectObject(DtObjectRef object) {
+ ObjectList::iterator i = objectList.find(object);
+ if (i != objectList.end()) {
++ move();
+ currentObject = (*i).second;
+ }
+ }
+
+ void dtDeleteObject(DtObjectRef object) {
+ ObjectList::iterator i = objectList.find(object);
+- if (i != objectList.end()) { // found
+- if (currentObject == (*i).second) currentObject = NULL;
++ if (i != objectList.end()) {
++ if (currentObject == (*i).second) currentObject = 0;
+ delete (*i).second;
+ objectList.erase(i);
+ }
+- else std::cout << "not found !" << std::endl;
+ respTable.cleanObject(object);
+ }
+
+-void dtTranslate(DT_Scalar x, DT_Scalar y, DT_Scalar z) {
++void dtTranslate(DtScalar x, DtScalar y, DtScalar z) {
+ if (currentObject) currentObject->translate(Vector(x, y, z));
+ }
+
+-void dtRotate(DT_Scalar x, DT_Scalar y, DT_Scalar z, DT_Scalar w) {
++void dtRotate(DtScalar x, DtScalar y, DtScalar z, DtScalar w) {
+ if (currentObject) currentObject->rotate(Quaternion(x, y, z, w));
+ }
+
+-void dtScale(DT_Scalar x, DT_Scalar y, DT_Scalar z) {
++void dtScale(DtScalar x, DtScalar y, DtScalar z) {
+ if (currentObject) currentObject->scale(x, y, z);
+ }
+
+@@ -302,14 +299,23 @@ void dtProceed() {
+ }
+
+ void dtEnableCaching() {
+- for (ObjectList::const_iterator i=objectList.begin();i!=objectList.end();++i)
+- (*i).second->do_broadphase();
++ for (ObjectList::const_iterator i = objectList.begin();
++ i != objectList.end(); ++i)
++ (*i).second->move();
+ caching = true;
+ }
+
+ void dtDisableCaching() { caching = false; }
+
+-void dtSetTolerance(DT_Scalar tol) { rel_error = tol; }
++void dtSetTolerance(DtScalar tol) { rel_error = tol; }
++
++void addPair(ObjectPtr object1, ObjectPtr object2) {
++ proxList.insert(Encounter(object1, object2));
++}
++
++void removePair(ObjectPtr object1, ObjectPtr object2) {
++ proxList.erase(Encounter(object1, object2));
++}
+
+ bool object_test(Encounter& e) {
+ static Point p1, p2;
+@@ -334,76 +340,28 @@ bool object_test(Encounter& e) {
+ return true;
+ }
+ break;
+- default:
+- return false;
++ // Eric Espie: warning
++ case DT_NO_RESPONSE:
++ break;
+ }
+ return false;
+ }
+
+-DT_Count dtTest() {
+- DT_Count cnt = 0;
++DtCount dtTest() {
++ move();
++ DtCount count = 0;
+ if (caching) {
+- for (ObjectList::const_iterator j = objectList.begin();
+- j != objectList.end(); ++j) {
+- (*j).second->do_broadphase();
+- }
+ for (ProxList::iterator i = proxList.begin(); i != proxList.end(); ++i)
+- if (object_test((Encounter &)*i)) ++cnt;
++ if (object_test((Encounter &)*i)) ++count;
+ }
+ else {
+- int c=0;
+ for (ObjectList::const_iterator j = objectList.begin();
+ j != objectList.end(); ++j)
+ for (ObjectList::const_iterator i = objectList.begin();
+ i != j; ++i) {
+ Encounter e((*i).second, (*j).second);
+- c++;
+- if (object_test(e)) ++cnt;
+- }
+- }
+- return cnt;
+-}
+-
+-void dtTestObjects(DtObjectRef object1, DtObjectRef object2) {
+- // Programmed by Alok Menghrajani.
+- // alok.menghrajani at epfl.ch
+- static Object *obj1, *obj2;
+- static Object *o1, *o2;
+- static Vector sep_axis;
+- static Point p1, p2;
+-
+- o1=(*objectList.find(object1)).second;
+- o2=(*objectList.find(object2)).second;
+-
+- // Encounter e(o1, o2);
+- // object_test(e);
+-
+- if (o2->shapePtr->getType() < o1->shapePtr->getType() ||
+- (o2->shapePtr->getType() == o1->shapePtr->getType() && o2 < o1)) {
+- obj1 = o2;
+- obj2 = o1;
+- }
+- else {
+- obj1 = o1;
+- obj2 = o2;
+- }
+- sep_axis.setValue(0,0,0);
+-
+- const Response& resp = respTable.find(obj1->ref, obj2->ref);
+- switch (resp.type) {
+- case DT_SIMPLE_RESPONSE:
+- if (intersect(*obj1, *obj2, sep_axis))
+- resp(obj1->ref, obj2->ref);
+- break;
+- case DT_SMART_RESPONSE:
+- if (prev_closest_points(*obj1, *obj2, sep_axis, p1, p2)) {
+- Vector v = obj1->prev(p1) - obj2->prev(p2);
+- resp(obj1->ref, obj2->ref, p1, p2, v);
++ if (object_test(e)) ++count;
+ }
+- break;
+- case DT_WITNESSED_RESPONSE:
+- if (common_point(*obj1, *obj2, sep_axis, p1, p2))
+- resp(obj1->ref, obj2->ref, p1, p2, Vector(0, 0, 0));
+- break;
+ }
++ return count;
+ }
+diff --git a/libsolid/Complex.cpp b/libsolid/Complex.cpp
+index 88e8138..c1efa7d 100644
+--- a/libsolid/Complex.cpp
++++ b/libsolid/Complex.cpp
+@@ -24,6 +24,11 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#pragma warning(disable:4996) // std::_Copy_opt was declared as disaproved because unsafe
++#endif // _MSC_VER
++
+ #include "Complex.h"
+ #include "Transform.h"
+ #include "BBoxTree.h"
+@@ -36,7 +41,7 @@ Complex::~Complex() {
+ if (count >= 2) delete [] root;
+ for (int i = 0; i < count; ++i) delete leaves[i].poly;
+ delete [] leaves;
+- if (free_base) delete [] (Point *)base.getPointer();
++ /* if (free_base) delete [] (void *)base.getPointer(); */ /* warning: deleting `void*' is undefined */
+ }
+
+ BBox Complex::bbox(const Transform& t) const {
+diff --git a/libsolid/Complex.h b/libsolid/Complex.h
+index 8aafae2..182143f 100644
+--- a/libsolid/Complex.h
++++ b/libsolid/Complex.h
+@@ -27,6 +27,10 @@
+ #ifndef _COMPLEX_H_
+ #define _COMPLEX_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <algorithm>
+
+ #include "Shape.h"
+@@ -49,8 +53,8 @@ public:
+ BBox bbox(const Transform& t) const;
+
+ const VertexBase& getBase() const { return base; }
+- void setBase(const void *ptr, bool free_it = false) {
+- base = ptr; free_base = free_it;
++ void setBase(const void *ptr, bool free = false) {
++ base = ptr; free_base = free;
+ }
+ void changeBase(const void *ptr);
+ void proceed() { prev_base = base; }
+diff --git a/libsolid/Cone.cpp b/libsolid/Cone.cpp
+index 700b99f..a7f5691 100644
+--- a/libsolid/Cone.cpp
++++ b/libsolid/Cone.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Cone.h"
+
+ Point Cone::support(const Vector& v) const {
+diff --git a/libsolid/Cone.h b/libsolid/Cone.h
+index 4a12a26..047dc45 100644
+--- a/libsolid/Cone.h
++++ b/libsolid/Cone.h
+@@ -27,6 +27,10 @@
+ #ifndef _CONE_H_
+ #define _CONE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Convex.h"
+
+ class Cone : public Convex {
+diff --git a/libsolid/Convex.cpp b/libsolid/Convex.cpp
+index 4f9791d..caf8e11 100644
+--- a/libsolid/Convex.cpp
++++ b/libsolid/Convex.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Convex.h"
+ #include "BBox.h"
+ #include "Transform.h"
+@@ -32,19 +36,19 @@ Scalar rel_error = 1e-6; // relative error in the computed distance
+ Scalar abs_error = 1e-10; // absolute error if the distance is almost zero
+
+ BBox Convex::bbox(const Transform& t) const {
+- Point mini(t.getOrigin()[X] +
++ Point min(t.getOrigin()[X] +
+ dot(t.getBasis()[X], support(-t.getBasis()[X])) - abs_error,
+ t.getOrigin()[Y] +
+ dot(t.getBasis()[Y], support(-t.getBasis()[Y])) - abs_error,
+ t.getOrigin()[Z] +
+ dot(t.getBasis()[Z], support(-t.getBasis()[Z])) - abs_error);
+- Point maxi(t.getOrigin()[X] +
++ Point max(t.getOrigin()[X] +
+ dot(t.getBasis()[X], support(t.getBasis()[X])) + abs_error,
+ t.getOrigin()[Y] +
+ dot(t.getBasis()[Y], support(t.getBasis()[Y])) + abs_error,
+ t.getOrigin()[Z] +
+ dot(t.getBasis()[Z], support(t.getBasis()[Z])) + abs_error);
+- return BBox(mini,maxi);
++ return BBox(min, max);
+ }
+
+ static Point p[4]; // support points of object A in local coordinates
+@@ -117,27 +121,27 @@ inline bool valid(int s) {
+ return true;
+ }
+
+-inline void compute_vector(int bits1, Vector& v) {
++inline void compute_vector(int bits, Vector& v) {
+ Scalar sum = 0;
+ v.setValue(0, 0, 0);
+ for (int i = 0, bit = 1; i < 4; ++i, bit <<= 1) {
+- if (bits1 & bit) {
+- sum += det[bits1][i];
+- v += y[i] * det[bits1][i];
++ if (bits & bit) {
++ sum += det[bits][i];
++ v += y[i] * det[bits][i];
+ }
+ }
+ v *= 1 / sum;
+ }
+
+-inline void compute_points(int bits1, Point& p1, Point& p2) {
++inline void compute_points(int bits, Point& p1, Point& p2) {
+ Scalar sum = 0;
+ p1.setValue(0, 0, 0);
+ p2.setValue(0, 0, 0);
+ for (int i = 0, bit = 1; i < 4; ++i, bit <<= 1) {
+- if (bits1 & bit) {
+- sum += det[bits1][i];
+- p1 += p[i] * det[bits1][i];
+- p2 += q[i] * det[bits1][i];
++ if (bits & bit) {
++ sum += det[bits][i];
++ p1 += p[i] * det[bits][i];
++ p2 += q[i] * det[bits][i];
+ }
+ }
+ Scalar s = 1 / sum;
+@@ -175,7 +179,7 @@ inline bool closest(Vector& v) {
+
+ #ifdef USE_BACKUP_PROCEDURE
+
+- Scalar min_dist2 = SOLID_INFINITY;
++ Scalar min_dist2 = INFINITY_;
+ for (int s = all_bits; s; --s) {
+ if ((s & all_bits) == s) {
+ if (proper(s)) {
+diff --git a/libsolid/Convex.h b/libsolid/Convex.h
+index 4f0722d..e238aab 100644
+--- a/libsolid/Convex.h
++++ b/libsolid/Convex.h
+@@ -27,6 +27,10 @@
+ #ifndef _CONVEX_H_
+ #define _CONVEX_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <3D/Point.h>
+ #include "Shape.h"
+ #include "BBox.h"
+diff --git a/libsolid/Cylinder.cpp b/libsolid/Cylinder.cpp
+index 09d7908..660115c 100644
+--- a/libsolid/Cylinder.cpp
++++ b/libsolid/Cylinder.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Cylinder.h"
+
+ Point Cylinder::support(const Vector& v) const {
+diff --git a/libsolid/Cylinder.h b/libsolid/Cylinder.h
+index 56a2e73..21e305b 100644
+--- a/libsolid/Cylinder.h
++++ b/libsolid/Cylinder.h
+@@ -27,6 +27,10 @@
+ #ifndef _CYLINDER_H_
+ #define _CYLINDER_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Convex.h"
+
+ class Cylinder : public Convex {
+diff --git a/libsolid/Encounter.h b/libsolid/Encounter.h
+index 235c86c..60ad581 100644
+--- a/libsolid/Encounter.h
++++ b/libsolid/Encounter.h
+@@ -27,6 +27,10 @@
+ #ifndef _ENCOUNTER_H_
+ #define _ENCOUNTER_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <3D/Vector.h>
+ #include "Object.h"
+
+diff --git a/libsolid/IndexArray.h b/libsolid/IndexArray.h
+index 11285c9..417c034 100644
+--- a/libsolid/IndexArray.h
++++ b/libsolid/IndexArray.h
+@@ -27,6 +27,10 @@
+ #ifndef _INDEXARRAY_H_
+ #define _INDEXARRAY_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <algorithm>
+
+ class IndexArray {
+diff --git a/libsolid/Object.cpp b/libsolid/Object.cpp
+index 0c77d30..ada4dfa 100644
+--- a/libsolid/Object.cpp
++++ b/libsolid/Object.cpp
+@@ -24,49 +24,41 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Object.h"
+ #include "AlgoTable.h"
+ #include "Convex.h"
+ #include "Complex.h"
+
+-#include "MT_Point3.h"
+-
+ #include <new>
+
+-Object::Object(DtObjectRef obj, ShapePtr shape, BP_SceneHandle broadphase) :
++Object::Object(DtObjectRef obj, ShapePtr shape) :
+ ref(obj),
+ shapePtr(shape),
+- m_dirty(true),
+- m_proxy(0),
+- m_broadphase(broadphase)
++ bbox(Point(INFINITY_, INFINITY_, INFINITY_),
++ Point(INFINITY_, INFINITY_, INFINITY_))
+ {
+ curr.setIdentity();
++ new (&lower[X]) Endpoint(X, MIN, this);
++ new (&lower[Y]) Endpoint(Y, MIN, this);
++ new (&lower[Z]) Endpoint(Z, MIN, this);
++ new (&upper[X]) Endpoint(X, MAX, this);
++ new (&upper[Y]) Endpoint(Y, MAX, this);
++ new (&upper[Z]) Endpoint(Z, MAX, this);
+ proceed();
+ }
+
+-Object::~Object() {
+- if (m_proxy) {
+- BP_DeleteProxy(m_broadphase, m_proxy);
+- }
+-}
+-
+-void Object::do_broadphase() {
+- if (m_dirty) {
+- m_dirty = false;
++void Object::move() {
+ bbox = shapePtr->bbox(curr);
+- Scalar *lower_point = new Scalar[3];
+- Scalar *upper_point = new Scalar[3];
+- lower_point = (bbox.getLower()).getValue();
+- upper_point = (bbox.getUpper()).getValue();
+- MT_Point3 lower(lower_point[0], lower_point[1], lower_point[2]);
+- MT_Point3 upper(upper_point[0], upper_point[1], upper_point[2]);
+- if (m_proxy) {
+- BP_SetBBox(m_proxy, lower, upper);
+- }
+- else {
+- m_proxy = BP_CreateProxy(m_broadphase, this, lower, upper);
+- }
+- }
++ lower[X].move(bbox.getLower(X));
++ lower[Y].move(bbox.getLower(Y));
++ lower[Z].move(bbox.getLower(Z));
++ upper[X].move(bbox.getUpper(X));
++ upper[Y].move(bbox.getUpper(Y));
++ upper[Z].move(bbox.getUpper(Z));
+ }
+
+ void Object::proceed() {
+@@ -96,17 +88,18 @@ bool intersectComplexComplex(const Shape& a, const Shape& b,
+ }
+
+ IntersectTable *intersectInitialize() {
+- static IntersectTable p;
+- p.addEntry(CONVEX, CONVEX, intersectConvexConvex);
+- p.addEntry(COMPLEX, CONVEX, intersectComplexConvex);
+- p.addEntry(COMPLEX, COMPLEX, intersectComplexComplex);
+- return &p;
++ IntersectTable *p = new IntersectTable;
++ p->addEntry(CONVEX, CONVEX, intersectConvexConvex);
++ p->addEntry(COMPLEX, CONVEX, intersectComplexConvex);
++ p->addEntry(COMPLEX, COMPLEX, intersectComplexComplex);
++ return p;
+ }
+
+ bool intersect(const Object& a, const Object& b, Vector& v) {
+ static IntersectTable *intersectTable = intersectInitialize();
+- Intersect i = intersectTable->lookup(a.shapePtr->getType(),b.shapePtr->getType());
+- return i(*a.shapePtr,*b.shapePtr,a.curr,b.curr,v);
++ Intersect intersect =
++ intersectTable->lookup(a.shapePtr->getType(), b.shapePtr->getType());
++ return intersect(*a.shapePtr, *b.shapePtr, a.curr, b.curr, v);
+ }
+
+ bool common_pointConvexConvex(const Shape& a, const Shape& b,
+@@ -128,17 +121,18 @@ bool common_pointComplexComplex(const Shape& a, const Shape& b,
+ }
+
+ Common_pointTable *common_pointInitialize() {
+- static Common_pointTable p;
+- p.addEntry(CONVEX, CONVEX, common_pointConvexConvex);
+- p.addEntry(COMPLEX, CONVEX, common_pointComplexConvex);
+- p.addEntry(COMPLEX, COMPLEX, common_pointComplexComplex);
+- return &p;
++ Common_pointTable *p = new Common_pointTable;
++ p->addEntry(CONVEX, CONVEX, common_pointConvexConvex);
++ p->addEntry(COMPLEX, CONVEX, common_pointComplexConvex);
++ p->addEntry(COMPLEX, COMPLEX, common_pointComplexComplex);
++ return p;
+ }
+
+ bool common_point(const Object& a, const Object& b, Vector& v, Point& pa, Point& pb) {
+ static Common_pointTable *common_pointTable = common_pointInitialize();
+- Common_point cp = common_pointTable->lookup(a.shapePtr->getType(), b.shapePtr->getType());
+- return cp(*a.shapePtr, *b.shapePtr, a.curr, b.curr, v, pa, pb);
++ Common_point common_point =
++ common_pointTable->lookup(a.shapePtr->getType(), b.shapePtr->getType());
++ return common_point(*a.shapePtr, *b.shapePtr, a.curr, b.curr, v, pa, pb);
+ }
+
+ bool prev_closest_points(const Object& a, const Object& b,
+diff --git a/libsolid/Object.h b/libsolid/Object.h
+index 567032d..24b9a2d 100644
+--- a/libsolid/Object.h
++++ b/libsolid/Object.h
+@@ -27,67 +27,45 @@
+ #ifndef _OBJECT_H_
+ #define _OBJECT_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <SOLID/solid.h>
+-#include <SOLID/broad.h>
+
+ #include "Transform.h"
+ #include "BBox.h"
++#include "Endpoint.h"
+ #include "Shape.h"
+
+ class Object {
+ public:
+- Object(DtObjectRef obj, ShapePtr shape, BP_SceneHandle broadphase);
+- ~Object();
++ Object(DtObjectRef obj, ShapePtr shape);
+
+- void do_broadphase();
++ void move();
+ void proceed();
+
+- void translate(const Vector& v) {
+- curr.translate(v);
+- m_dirty = true;
+- }
+- void rotate(const Quaternion& q) {
+- curr.rotate(q);
+- m_dirty = true;
+- }
+- void scale(Scalar x, Scalar y, Scalar z) {
+- curr.scale(x, y, z);
+- m_dirty = true;
+- }
+-
+- void setIdentity() {
+- curr.setIdentity();
+- m_dirty = true;
+- }
+-
+- void setMatrix(const float v[16]) {
+- curr.setValue(v);
+- m_dirty = true;
+- }
+- void setMatrix(const double v[16]) {
+- curr.setValue(v);
+- m_dirty = true;
+- }
+-
+- void multMatrix(const float v[16]) {
+- curr *= Transform(v);
+- m_dirty = true;
+- }
+- void multMatrix(const double v[16]) {
+- curr *= Transform(v);
+- m_dirty = true;
+- }
++ void translate(const Vector& v) { curr.translate(v); }
++ void rotate(const Quaternion& q) { curr.rotate(q); }
++ void scale(Scalar x, Scalar y, Scalar z) { curr.scale(x, y, z); }
++
++ void setIdentity() { curr.setIdentity(); }
++
++ void setMatrix(const float v[16]) { curr.setValue(v); }
++ void setMatrix(const double v[16]) { curr.setValue(v); }
++
++ void multMatrix(const float v[16]) { curr *= Transform(v); }
++ void multMatrix(const double v[16]) { curr *= Transform(v); }
++
++ const BBox& getBBox() const { return bbox; }
+
+ Transform curr;
+ Transform prev;
+ DtObjectRef ref;
+ ShapePtr shapePtr;
+-
+- //For broadphase
+- mutable BBox bbox;
+- mutable bool m_dirty;
+- BP_SceneHandle m_broadphase;
+- BP_ProxyHandle m_proxy;
++ BBox bbox;
++ Endpoint lower[3];
++ Endpoint upper[3];
+ };
+
+ bool intersect(const Object&, const Object&, Vector& v);
+diff --git a/libsolid/Polygon.cpp b/libsolid/Polygon.cpp
+index d96aef6..5b225f0 100644
+--- a/libsolid/Polygon.cpp
++++ b/libsolid/Polygon.cpp
+@@ -24,6 +24,11 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#pragma warning(disable:4996) // std::_Copy_opt was declared as disaproved because unsafe
++#endif // _MSC_VER
++
+ #include "Polygon.h"
+
+ Point Polygon::support(const Vector& v) const {
+diff --git a/libsolid/Polygon.h b/libsolid/Polygon.h
+index e18ef3b..0c182f4 100644
+--- a/libsolid/Polygon.h
++++ b/libsolid/Polygon.h
+@@ -27,6 +27,10 @@
+ #ifndef _POLYGON_H_
+ #define _POLYGON_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Polytope.h"
+
+ class Polygon : public Polytope {
+diff --git a/libsolid/Polyhedron.cpp b/libsolid/Polyhedron.cpp
+index ae7e7f7..28c873f 100644
+--- a/libsolid/Polyhedron.cpp
++++ b/libsolid/Polyhedron.cpp
+@@ -24,20 +24,25 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
+-#include "Polyhedron.h"
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#pragma warning(disable:4996) // std::_Copy_opt was declared as disaproved because unsafe
++#endif // _MSC_VER
+
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
++#include "Polyhedron.h"
+
+-#ifdef HAVE_QHULL_A_H
+-#include <qhull/qhull_a.h>
++#ifdef QHULL
+
++extern "C" {
++#include <qhull_a.h>
++}
+
+ #include <vector>
+-#include <new>
++#include <new.h>
++
++typedef vector<unsigned int> IndexBuf;
+
+-typedef std::vector<unsigned int> IndexBuf;
++char qh_version[] = "SOLID 2.0";
+
+ Polyhedron::Polyhedron(const VertexBase& b, int c, const unsigned int v[]) :
+ Polytope(b, c, v), cobound(0) {
+diff --git a/libsolid/Polyhedron.h b/libsolid/Polyhedron.h
+index 2bbc799..4719d88 100644
+--- a/libsolid/Polyhedron.h
++++ b/libsolid/Polyhedron.h
+@@ -27,6 +27,10 @@
+ #ifndef _POLYHEDRON_H_
+ #define _POLYHEDRON_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Polytope.h"
+ #include "IndexArray.h"
+
+diff --git a/libsolid/Polytope.h b/libsolid/Polytope.h
+index dbf1c46..480bbd3 100644
+--- a/libsolid/Polytope.h
++++ b/libsolid/Polytope.h
+@@ -27,6 +27,10 @@
+ #ifndef _POLYTOPE_H_
+ #define _POLYTOPE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Convex.h"
+ #include "IndexArray.h"
+ #include "VertexBase.h"
+diff --git a/libsolid/RespTable.cpp b/libsolid/RespTable.cpp
+index 6aa36ea..7671bac 100644
+--- a/libsolid/RespTable.cpp
++++ b/libsolid/RespTable.cpp
+@@ -24,12 +24,14 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <vector>
+
+ #include "RespTable.h"
+
+-
+-
+ const Response& RespTable::find(DtObjectRef obj1, DtObjectRef obj2) const {
+ PairList::const_iterator i = pairList.find(make_ObjPair(obj1, obj2));
+ if (i != pairList.end()) return (*i).second;
+diff --git a/libsolid/RespTable.h b/libsolid/RespTable.h
+index 4115632..776a4b2 100644
+--- a/libsolid/RespTable.h
++++ b/libsolid/RespTable.h
+@@ -27,6 +27,10 @@
+ #ifndef _RESPTABLE_H_
+ #define _RESPTABLE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Response.h"
+
+ #include <SOLID/solid.h>
+diff --git a/libsolid/Response.cpp b/libsolid/Response.cpp
+index 1a59198..947133c 100644
+--- a/libsolid/Response.cpp
++++ b/libsolid/Response.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Response.h"
+
+ DtCollData Response::coll_data;
+diff --git a/libsolid/Response.h b/libsolid/Response.h
+index 7f79914..5151c75 100644
+--- a/libsolid/Response.h
++++ b/libsolid/Response.h
+@@ -27,6 +27,10 @@
+ #ifndef _RESPONSE_H_
+ #define _RESPONSE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <SOLID/solid.h>
+
+ #include <3D/Point.h>
+diff --git a/libsolid/Shape.h b/libsolid/Shape.h
+index a9f4c06..7ef4529 100644
+--- a/libsolid/Shape.h
++++ b/libsolid/Shape.h
+@@ -27,6 +27,10 @@
+ #ifndef _SHAPE_H_
+ #define _SHAPE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "BBox.h"
+
+ class Transform;
+diff --git a/libsolid/Simplex.cpp b/libsolid/Simplex.cpp
+index 29f145e..107011f 100644
+--- a/libsolid/Simplex.cpp
++++ b/libsolid/Simplex.cpp
+@@ -24,6 +24,11 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#pragma warning(disable:4996) // std::_Copy_opt was declared as disaproved because unsafe
++#endif // _MSC_VER
++
+ #include "Simplex.h"
+
+ Point Simplex::support(const Vector& v) const {
+diff --git a/libsolid/Simplex.h b/libsolid/Simplex.h
+index a155be6..cb7804d 100644
+--- a/libsolid/Simplex.h
++++ b/libsolid/Simplex.h
+@@ -27,6 +27,10 @@
+ #ifndef _SIMPLEX_H_
+ #define _SIMPLEX_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Polytope.h"
+
+ class Simplex : public Polytope {
+diff --git a/libsolid/Sphere.cpp b/libsolid/Sphere.cpp
+index 4781d90..ccb2dfc 100644
+--- a/libsolid/Sphere.cpp
++++ b/libsolid/Sphere.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Sphere.h"
+
+ Point Sphere::support(const Vector& v) const {
+diff --git a/libsolid/Sphere.h b/libsolid/Sphere.h
+index 522d86e..1d33d03 100644
+--- a/libsolid/Sphere.h
++++ b/libsolid/Sphere.h
+@@ -27,6 +27,10 @@
+ #ifndef _SPHERE_H_
+ #define _SPHERE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Convex.h"
+
+ class Sphere : public Convex {
+diff --git a/libsolid/Transform.cpp b/libsolid/Transform.cpp
+index 4c8a9e2..86af809 100644
+--- a/libsolid/Transform.cpp
++++ b/libsolid/Transform.cpp
+@@ -24,6 +24,10 @@
+ P.O. Box 513, 5600 MB Eindhoven, The Netherlands
+ */
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include "Transform.h"
+
+ void Transform::setValue(const float m[16]) {
+diff --git a/libsolid/Transform.h b/libsolid/Transform.h
+index 5c6a481..fbc6b9a 100644
+--- a/libsolid/Transform.h
++++ b/libsolid/Transform.h
+@@ -27,6 +27,14 @@
+ #ifndef _TRANSFORM_H_
+ #define _TRANSFORM_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <3D/Point.h>
+ #include <3D/Matrix.h>
+
+diff --git a/libsolid/VertexBase.h b/libsolid/VertexBase.h
+index 5790a28..487a02a 100644
+--- a/libsolid/VertexBase.h
++++ b/libsolid/VertexBase.h
+@@ -27,6 +27,10 @@
+ #ifndef _VERTEXBASE_H_
+ #define _VERTEXBASE_H_
+
++#ifdef _MSC_VER
++#pragma warning(disable:4786) // identifier was truncated to '255'
++#endif // _MSC_VER
++
+ #include <3D/Point.h>
+
+ class VertexBase {
diff --git a/FreeSOLID.spec b/FreeSOLID.spec
new file mode 100644
index 0000000..2b5582a
--- /dev/null
+++ b/FreeSOLID.spec
@@ -0,0 +1,139 @@
+Name: FreeSOLID
+Version: 2.1.1
+Release: 11%{?dist}
+Summary: 3D collision detection C++ library
+
+Group: System Environment/Libraries
+License: LGPLv2+
+URL: http://sourceforge.net/projects/freesolid/
+Source0: http://sourceforge.net/projects/freesolid/files/FreeSOLID/FreeSOLID-2.1.1.zip/FreeSOLID-2.1.1.zip
+# https://sourceforge.net/tracker/?func=detail&aid=3484912&group_id=65180&atid=510061
+Patch0: %{name}-%{version}-src.patch
+# https://sourceforge.net/tracker/?func=detail&aid=3484910&group_id=65180&atid=510061
+Patch1: %{name}-%{version}-headers.patch
+# https://sourceforge.net/tracker/?func=detail&aid=3484908&group_id=65180&atid=510061
+Patch2: %{name}-%{version}-endpoint.patch
+# https://sourceforge.net/tracker/?func=detail&aid=3484907&group_id=65180&atid=510061
+Patch3: %{name}-%{version}-autotools.patch
+# https://sourceforge.net/tracker/?func=detail&aid=3484909&group_id=65180&atid=510061
+Patch4: %{name}-%{version}-fsf-fix.patch
+# https://sourceforge.net/tracker/?func=detail&aid=3484911&group_id=65180&atid=510061
+Patch5: %{name}-%{version}-pkgconfig.patch
+# https://sourceforge.net/tracker/?func=detail&aid=3509457&group_id=65180&atid=510059
+Patch6: %{name}-%{version}-configure.patch
+Patch7: %{name}-%{version}-freesolid-config.patch
+Patch8: %{name}-%{version}-Makefile.am-update.patch
+
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: libtool
+BuildRequires: SDL-devel
+BuildRequires: qhull-devel
+
+Requires(post): info
+Requires(preun): info
+
+
+%description
+FreeSOLID is a library for collision detection of three-dimensional
+objects undergoing rigid motion and deformation. FreeSOLID is designed
+to be used in interactive 3D graphics applications.
+
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: pkgconfig
+
+%description devel
+Libraries and header files for developing applications that use %{name}.
+
+
+%prep
+%setup -q -n FreeSOLID-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+mkdir m4
+rm acinclude.m4 aclocal.m4
+rm ltmain.sh missing depcomp install-sh config.*
+chmod 755 configure
+
+
+%build
+autoreconf -i
+%configure --disable-static
+make %{?_smp_mflags}
+
+
+%install
+make install DESTDIR=%{buildroot}
+rm $( find %{buildroot} -name '*.la' ) %{buildroot}%{_infodir}/dir
+rm -rf sample/*.o sample/.libs $(find sample -type f -a -executable)
+
+
+%post -p /sbin/ldconfig
+
+%post devel
+/sbin/install-info %{_infodir}/solid2.info %{_infodir}/dir || :
+
+%postun -p /sbin/ldconfig
+
+%preun devel
+if [ $1 = 0 ] ; then
+/sbin/install-info --delete %{_infodir}/solid2.info %{_infodir}/dir || :
+fi
+
+
+%files
+%doc README COPYING COPYING.LIB TODO
+%{_libdir}/*.so.*
+
+%files devel
+%doc sample
+%{_infodir}/*
+%{_bindir}/freesolid-config
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/FreeSOLID.pc
+%{_includedir}/*
+
+
+%changelog
+* Tue Jul 10 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-11
+- update added correct freesolid.config.patch
+- added Makefile.am patch
+- reverted fsf-fix patch
+* Mon Jul 9 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-10
+- updated fsf-fix patch
+* Mon Jul 9 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-9
+- added multilib wrapper script free-solid-config to use pkg-config
+- updated FreeSOLID pkgconfig patch
+- updated spec file
+* Fri Jun 22 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-8
+- added configure patch
+- rebuild for Fedora 17
+* Wed Mar 21 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-7
+- moved ldconfig to the base package
+* Wed Mar 21 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-6
+- changed free-sold.pc -> FreeSOLID.pc
+- renamed post section to post devel for solid2.info file
+- renamed prerun section to preun devel for solid2.info file
+* Tue Mar 20 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-5
+- changed the package name.
+- Added configure patch solves incompatibilities with libtool-2.
+* Tue Feb 7 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-4
+- Cleaned up samples, port of devel package docs.
+* Tue Feb 7 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-3
+- Fixed License type.
+* Mon Feb 6 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-2
+- Fixed Source URL.
+- Review fix: pkgconfig dep, devel package ?_isa dep, macros.
+* Sun Feb 5 2012 Martin Gansser <linux4martin at gmx.de> 2.1.1-1
+- Initial package
diff --git a/sources b/sources
index e69de29..e205a81 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+835ac39b2fc12a3e18311276f2def5e0 FreeSOLID-2.1.1.zip
More information about the scm-commits
mailing list