diff options
Diffstat (limited to 'extern/solid')
111 files changed, 0 insertions, 15881 deletions
diff --git a/extern/solid/CMakeLists.txt b/extern/solid/CMakeLists.txt deleted file mode 100644 index 7840dd6b423..00000000000 --- a/extern/solid/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -# $Id$ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program 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 2 -# of the License, or (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2006, Blender Foundation -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -SET(INC include src src/broad src/complex src/convex ../qhull/include) - -FILE(GLOB SRC src/*.cpp src/convex/*.cpp src/complex/*.cpp src/broad/*.cpp) - -ADD_DEFINITIONS(-DUSE_DOUBLES -DQHULL -D_LIB) - -BLENDERLIB(extern_solid "${SRC}" "${INC}") -#, libtype=['game2','player'], priority=[45, 75] diff --git a/extern/solid/LICENSE_GPL.txt b/extern/solid/LICENSE_GPL.txt deleted file mode 100644 index 07db89585a2..00000000000 --- a/extern/solid/LICENSE_GPL.txt +++ /dev/null @@ -1,349 +0,0 @@ - - The SOLID library is Copyright (C) 2001-2003 Dtecta. - - You may use, distribute and copy the SOLID library under the terms of - GNU General Public License version 2, which is displayed below. - -------------------------------------------------------------------------- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program 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 2 of the License, or - (at your option) any later version. - - This program 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 this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - -------------------------------------------------------------------------- diff --git a/extern/solid/LICENSE_QPL.txt b/extern/solid/LICENSE_QPL.txt deleted file mode 100644 index 3fca00466e2..00000000000 --- a/extern/solid/LICENSE_QPL.txt +++ /dev/null @@ -1,110 +0,0 @@ - - The SOLID library is Copyright (C) 2001-2003 Dtecta. - - You may use, distribute and copy the SOLID library under the terms of - the Q Public License, which is displayed below. - -------------------------------------------------------------------------- - THE Q PUBLIC LICENSE - version 1.0 - - Copyright (C) 1999-2000 Trolltech AS, Norway. - Everyone is permitted to copy and - distribute this license document. - -The intent of this license is to establish freedom to share and change the -software regulated by this license under the open source model. - -This license applies to any software containing a notice placed by the -copyright holder saying that it may be distributed under the terms of -the Q Public License version 1.0. Such software is herein referred to as -the Software. This license covers modification and distribution of the -Software, use of third-party application programs based on the Software, -and development of free software which uses the Software. - - Granted Rights - -1. You are granted the non-exclusive rights set forth in this license - provided you agree to and comply with any and all conditions in this - license. Whole or partial distribution of the Software, or software - items that link with the Software, in any form signifies acceptance of - this license. - -2. You may copy and distribute the Software in unmodified form provided - that the entire package, including - but not restricted to - copyright, - trademark notices and disclaimers, as released by the initial developer - of the Software, is distributed. - -3. You may make modifications to the Software and distribute your - modifications, in a form that is separate from the Software, such as - patches. The following restrictions apply to modifications: - - a. Modifications must not alter or remove any copyright notices in - the Software. - - b. When modifications to the Software are released under this - license, a non-exclusive royalty-free right is granted to the - initial developer of the Software to distribute your modification - in future versions of the Software provided such versions remain - available under these terms in addition to any other license(s) of - the initial developer. - -4. You may distribute machine-executable forms of the Software or - machine-executable forms of modified versions of the Software, provided - that you meet these restrictions: - - a. You must include this license document in the distribution. - - b. You must ensure that all recipients of the machine-executable forms - are also able to receive the complete machine-readable source code - to the distributed Software, including all modifications, without - any charge beyond the costs of data transfer, and place prominent - notices in the distribution explaining this. - - c. You must ensure that all modifications included in the - machine-executable forms are available under the terms of this - license. - -5. You may use the original or modified versions of the Software to - compile, link and run application programs legally developed by you - or by others. - -6. You may develop application programs, reusable components and other - software items that link with the original or modified versions of the - Software. These items, when distributed, are subject to the following - requirements: - - a. You must ensure that all recipients of machine-executable forms of - these items are also able to receive and use the complete - machine-readable source code to the items without any charge - beyond the costs of data transfer. - - b. You must explicitly license all recipients of your items to use - and re-distribute original and modified versions of the items in - both machine-executable and source code forms. The recipients must - be able to do so without any charges whatsoever, and they must be - able to re-distribute to anyone they choose. - - - c. If the items are not available to the general public, and the - initial developer of the Software requests a copy of the items, - then you must supply one. - - Limitations of Liability - -In no event shall the initial developers or copyright holders be liable -for any damages whatsoever, including - but not restricted to - lost -revenue or profits or other direct, indirect, special, incidental or -consequential damages, even if they have been advised of the possibility -of such damages, except to the extent invariable law, if any, provides -otherwise. - - No Warranty - -The Software and this license document are provided AS IS with NO WARRANTY -OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. - Choice of Law - -This license is governed by the Laws of Norway. Disputes shall be settled -by Oslo City Court. diff --git a/extern/solid/Makefile b/extern/solid/Makefile deleted file mode 100644 index 206dc21c3fb..00000000000 --- a/extern/solid/Makefile +++ /dev/null @@ -1,56 +0,0 @@ -# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*- -# vim: tabstop=8 -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program 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 2 -# of the License, or (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): GSR -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -include nan_definitions.mk - -SOURCEDIR = extern/solid -LIBNAMES = solid solid_broad solid_convex solid_complex -DIR = $(OCGDIR)/extern/ -DIRS = src - -include nan_subdirs.mk - -install: $(ALL_OR_DEBUG) - @[ -d $(NAN_SOLID) ] || mkdir -p $(NAN_SOLID) - @[ -d $(NAN_SOLID)/include/SOLID ] || mkdir -p $(NAN_SOLID)/include/SOLID - @[ -d $(NAN_SOLID)/include/SOLID/MT ] || mkdir -p $(NAN_SOLID)/include/SOLID/MT - @[ -d $(NAN_SOLID)/lib/$(DEBUG_DIR) ] || mkdir -p $(NAN_SOLID)/lib/$(DEBUG_DIR) - @for i in $(LIBNAMES); do \ - $(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/$$i/$(DEBUG_DIR)lib$$i.a $(NAN_SOLID)/lib/$(DEBUG_DIR) ; \ - if [ $(OS) = darwin ] ; then \ - ranlib $(NAN_SOLID)/lib/$(DEBUG_DIR)lib$$i.a ; \ - fi ; \ - done - @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh include/*.h $(NAN_SOLID)/include/SOLID - @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh include/MT/*.h $(NAN_SOLID)/include/SOLID/MT - - diff --git a/extern/solid/README.txt b/extern/solid/README.txt deleted file mode 100644 index 348d92b35cb..00000000000 --- a/extern/solid/README.txt +++ /dev/null @@ -1,55 +0,0 @@ - - SOLID - Software Library for Interference Detection - -SOLID is a software library containing functions for performing -intersection tests and proximity queries that are useful in the context -of collision detection. Collision detection is the process of detecting -pairs of geometric objects that are intersecting or are within a given -proximity of each other. In particular, SOLID is useful for detecting -collisions between objects that are moving relatively of each other over -time. The motions of objects are controlled by the client application, -and are not determined or affected by SOLID. - -This open-source edition of SOLID version 3 is released under the terms of -either the GNU Public License (GPL) or the Q Public License (QPL). This means -that for software created with SOLID version 3 you must comply with the terms -of one of these licenses. You may choose wich of these licenses best suits -your purpose. See the following files contained in this distribution for a -complete list of terms and conditions of these licenses: - - LICENSE_QPL.txt The Q Public License - LICENSE_GPL.txt The GNU General Public License - -These licenses do not permit the use of SOLID 3 in closed-source software -products. For enquiries about commercial use of SOLID, please contact -info@dtecta.com. - -SOLID 3 uses Qhull from The Geometry Center of the University of Minnesota. -Qhull is copyrighted as noted below. Qhull is free software and may be -obtained via anonymous ftp from geom.umn.edu. - - Qhull, Copyright (c) 1993-2002 - - The National Science and Technology Research Center for - Computation and Visualization of Geometric Structures - (The Geometry Center) - University of Minnesota - 400 Lind Hall - 207 Church Street S.E. - Minneapolis, MN 55455 USA - - email: qhull@geom.umn.edu - -Installation - -For details on how to install SOLID see the documention in the 'doc' directory. - -Platforms - -SOLID 3 has been tested on the following platforms: - - Linux IA32 gcc 2.95.3, gcc 3.3 - Win32 MSVC++ 6.0 SP4, MSVC++ 7.1 - - - diff --git a/extern/solid/SConscript b/extern/solid/SConscript deleted file mode 100644 index 8c54442ca73..00000000000 --- a/extern/solid/SConscript +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/python -import sys - -Import('env') - -defs = 'USE_DOUBLES QHULL _LIB' -cflags = [] - -if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): - defs += ' WIN32 NDEBUG _WINDOWS _LIB' - cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6'] -elif env['OURPLATFORM']=='win32-mingw': - defs += ' NDEBUG' - cflags += ['-O2'] -elif sys.platform=='linux2' or sys.platform=='linux-i386' or sys.platform=='freebsd4' or sys.platform=='freebsd5' or sys.platform=='openbsd3' or sys.platform=='sunos5': - defs += ' NDEBUG' - cflags += ['-O2'] -elif sys.platform=='darwin' : - defs += ' NDEBUG' - cflags += ['-O2','-pipe', '-fPIC', '-funsigned-char', '-ffast-math'] - -else: - print "################################################" - print - print "Check if solid builds on your platform correctly" - print "Add your platform specific defines" - print "and cflags / cxxflags to the" - print "extern/solid/SConscript file" - -sources = env.Glob('src/*.cpp') + env.Glob('src/convex/*.cpp') + env.Glob('src/complex/*.cpp') + env.Glob('src/broad/*.cpp') - -incs = 'include src src/broad src/complex src/convex ../qhull/include' - -env.BlenderLib ( libname='extern_solid', sources=sources, includes=Split(incs), defines=Split(defs), libtype=['extern'], priority=[10] , compileflags = cflags) diff --git a/extern/solid/SOLID/SOLID.h b/extern/solid/SOLID/SOLID.h deleted file mode 100644 index 37d74340f8c..00000000000 --- a/extern/solid/SOLID/SOLID.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef SOLID_H -#define SOLID_H - -#include "SOLID_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - - DT_DECLARE_HANDLE(DT_ObjectHandle); - DT_DECLARE_HANDLE(DT_SceneHandle); - DT_DECLARE_HANDLE(DT_ShapeHandle); - DT_DECLARE_HANDLE(DT_VertexBaseHandle); - DT_DECLARE_HANDLE(DT_RespTableHandle); - DT_DECLARE_HANDLE(DT_ArchiveHandle); - - typedef unsigned int DT_ResponseClass; - - typedef enum DT_ResponseType { - DT_NO_RESPONSE, /* No response (obsolete) */ - DT_BROAD_RESPONSE, - DT_SIMPLE_RESPONSE, /* No collision data */ - DT_WITNESSED_RESPONSE, /* A point common to both objects - is returned as collision data - */ - DT_DEPTH_RESPONSE /* The penetration depth is returned - as collision data. The penetration depth - is the shortest vector over which one - object needs to be translated in order - to bring the objects in touching contact. - */ - } DT_ResponseType; - -/* For witnessed response, the following structure represents a common point. The world - coordinates of 'point1' and 'point2' coincide. 'normal' is the zero vector. - - For depth response, the following structure represents the penetration depth. - 'point1' en 'point2' are the witness points of the penetration depth in world coordinates. - The penetration depth vector in world coordinates is represented by 'normal'. -*/ - - typedef struct DT_CollData { - DT_Vector3 point1; /* Point in object1 in world coordinates */ - DT_Vector3 point2; /* Point in object2 in world coordinates */ - DT_Vector3 normal; /* point2 - point1 */ - } DT_CollData; - -/* A response callback is called by SOLID for each pair of collding objects. 'client-data' - is a pointer to an arbitrary structure in the client application. The client objects are - pointers to structures in the client application associated with the coliding objects. - 'coll_data' is the collision data computed by SOLID. -*/ - - typedef DT_Bool (*DT_ResponseCallback)(void *client_data, - void *client_object1, - void *client_object2, - const DT_CollData *coll_data); - -/* Shape definition */ - - - extern DECLSPEC DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z); - extern DECLSPEC DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height); - extern DECLSPEC DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height); - extern DECLSPEC DT_ShapeHandle DT_NewSphere(DT_Scalar radius); - extern DECLSPEC DT_ShapeHandle DT_NewPoint(const DT_Vector3 point); - extern DECLSPEC DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target); - extern DECLSPEC DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2); - extern DECLSPEC DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2); - - extern DECLSPEC DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride); - extern DECLSPEC void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase); - extern DECLSPEC void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer); - - extern DECLSPEC DT_ShapeHandle DT_NewComplexShape(DT_VertexBaseHandle vertexBase); - extern DECLSPEC void DT_EndComplexShape(); - - extern DECLSPEC DT_ShapeHandle DT_NewPolytope(DT_VertexBaseHandle vertexBase); - extern DECLSPEC void DT_EndPolytope(); - - extern DECLSPEC void DT_Begin(); - extern DECLSPEC void DT_End(); - - extern DECLSPEC void DT_Vertex(const DT_Vector3 vertex); - extern DECLSPEC void DT_VertexIndex(DT_Index index); - - extern DECLSPEC void DT_VertexIndices(DT_Count count, const DT_Index *indices); - extern DECLSPEC void DT_VertexRange(DT_Index first, DT_Count count); - - extern DECLSPEC void DT_DeleteShape(DT_ShapeHandle shape); - -/* Object */ - - extern DECLSPEC DT_ObjectHandle DT_CreateObject( - void *client_object, /* pointer to object in client memory */ - DT_ShapeHandle shape /* the shape or geometry of the object */ - ); - - extern DECLSPEC void DT_DestroyObject(DT_ObjectHandle object); - - - - extern DECLSPEC void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position); - extern DECLSPEC void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation); - extern DECLSPEC void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling); - -/* The margin is an offset from the actual shape. The actual geometry of an - object is the set of points whose distance to the transformed shape is at - most the margin. During the lifetime of an object the margin can be - modified. -*/ - - extern DECLSPEC void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin); - - -/* These commands assume a column-major 4x4 OpenGL matrix representation */ - - extern DECLSPEC void DT_SetMatrixf(DT_ObjectHandle object, const float *m); - extern DECLSPEC void DT_GetMatrixf(DT_ObjectHandle object, float *m); - - extern DECLSPEC void DT_SetMatrixd(DT_ObjectHandle object, const double *m); - extern DECLSPEC void DT_GetMatrixd(DT_ObjectHandle object, double *m); - - extern DECLSPEC void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max); - - - extern DECLSPEC DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 v); -/* This next command returns the distance between the objects. De returned - closest points are given in world coordinates. -*/ - extern DECLSPEC DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point1, DT_Vector3 point2); - - extern DECLSPEC DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point); - - extern DECLSPEC DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point1, DT_Vector3 point2); - -/* Scene */ - - extern DECLSPEC DT_SceneHandle DT_CreateScene(); - extern DECLSPEC void DT_DestroyScene(DT_SceneHandle scene); - - extern DECLSPEC void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object); - extern DECLSPEC void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object); - -/* Note that objects can be assigned to multiple scenes! */ - -/* Response */ - -/* Response tables are defined independent of the scenes in which they are used. - Multiple response tables can be used in one scene, and a response table - can be shared among scenes. -*/ - extern DECLSPEC DT_RespTableHandle DT_CreateRespTable(); - extern DECLSPEC void DT_DestroyRespTable(DT_RespTableHandle respTable); - -/* Responses are defined on (pairs of) response classes. Each response table - maintains its set of response classes. -*/ - extern DECLSPEC DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable); - -/* To each object for which a response is defined in the response table a - response class needs to be assigned. -*/ - - extern DECLSPEC void DT_SetResponseClass(DT_RespTableHandle respTable, - DT_ObjectHandle object, - DT_ResponseClass responseClass); - - extern DECLSPEC void DT_ClearResponseClass(DT_RespTableHandle respTable, - DT_ObjectHandle object); - - extern DECLSPEC void DT_CallResponse(DT_RespTableHandle respTable, - DT_ObjectHandle object1, - DT_ObjectHandle object2, - const DT_CollData *coll_data); - -/* For each pair of objects multiple responses can be defined. A response is a callback - together with its response type and client data. */ - -/* Responses can be defined for all pairs of response classes... */ - extern DECLSPEC void DT_AddDefaultResponse(DT_RespTableHandle respTable, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data); - - extern DECLSPEC void DT_RemoveDefaultResponse(DT_RespTableHandle respTable, - DT_ResponseCallback response); -/* ...per response class... */ - extern DECLSPEC void DT_AddClassResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data); - - extern DECLSPEC void DT_RemoveClassResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass, - DT_ResponseCallback response); - -/* ... and per pair of response classes...*/ - extern DECLSPEC void DT_AddPairResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data); - extern DECLSPEC void DT_RemovePairResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - DT_ResponseCallback response); - -/* The next command calls the response callbacks for all intersecting pairs of objects in a scene. - 'DT_Test' returns the number of pairs of objects for which callbacks have been called. -*/ - - extern DECLSPEC DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable); - -/* Set the maximum relative error in the closest points and penetration depth - computation. The default for `max_error' is 1.0e-3. Larger errors result - in better performance. Non-positive error tolerances are ignored. -*/ - - extern DECLSPEC void DT_SetAccuracy(DT_Scalar max_error); - -/* Set the maximum tolerance on relative errors due to rounding. The default for `tol_error' - is the machine epsilon. Very large tolerances result in false collisions. Setting tol_error too small - results in missed collisions. Non-positive error tolerances are ignored. -*/ - - extern DECLSPEC void DT_SetTolerance(DT_Scalar tol_error); - - -/* This function returns the client pointer to the first object in a scene hit by the ray - (actually a line segment) defined by the points 'from' en 'to'. The spot is the hit point - on the object in local coordinates. 'normal' is the normal to the surface of the object in - world coordinates. The ignore_client pointer is used to make one of the objects transparent. - - NB: Currently ray tests are implemented for spheres, boxes, and meshes only!! -*/ - - extern DECLSPEC void *DT_RayCast(DT_SceneHandle scene, void *ignore_client, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal); - -/* Similar, only here a single object is tested and a boolean is returned */ - - extern DECLSPEC DT_Bool DT_ObjectRayCast(DT_ObjectHandle object, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/extern/solid/SOLID/SOLID_broad.h b/extern/solid/SOLID/SOLID_broad.h deleted file mode 100644 index 74e4214fa67..00000000000 --- a/extern/solid/SOLID/SOLID_broad.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef SOLID_BROAD_H -#define SOLID_BROAD_H - -#include "SOLID_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - - DT_DECLARE_HANDLE(BP_SceneHandle); - DT_DECLARE_HANDLE(BP_ProxyHandle); - - typedef void (*BP_Callback)(void *client_data, - void *object1, - void *object2); - - typedef bool (*BP_RayCastCallback)(void *client_data, - void *object, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar *lambda); - - extern DECLSPEC BP_SceneHandle BP_CreateScene(void *client_data, - BP_Callback beginOverlap, - BP_Callback endOverlap); - - extern DECLSPEC void BP_DestroyScene(BP_SceneHandle scene); - - extern DECLSPEC BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, - void *object, - const DT_Vector3 min, - const DT_Vector3 max); - - extern DECLSPEC void BP_DestroyProxy(BP_SceneHandle scene, - BP_ProxyHandle proxy); - - extern DECLSPEC void BP_SetBBox(BP_ProxyHandle proxy, - const DT_Vector3 min, - const DT_Vector3 max); - - extern DECLSPEC void *BP_RayCast(BP_SceneHandle scene, - BP_RayCastCallback objectRayCast, - void *client_data, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar *lambda); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/extern/solid/SOLID/SOLID_types.h b/extern/solid/SOLID/SOLID_types.h deleted file mode 100644 index 630594e447f..00000000000 --- a/extern/solid/SOLID/SOLID_types.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef SOLID_TYPES_H -#define SOLID_TYPES_H - -#ifndef DECLSPEC -# ifdef WIN32 -# define DECLSPEC __declspec(dllexport) -# else -# define DECLSPEC -# endif -#endif - -#define DT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name - - -typedef unsigned short DT_Index; -typedef unsigned short DT_Count; -typedef unsigned int DT_Size; -typedef float DT_Scalar; -typedef int DT_Bool; - -#define DT_FALSE 0 -#define DT_TRUE 1 - -#define DT_CONTINUE 0 -#define DT_DONE 1 - -typedef DT_Scalar DT_Vector3[3]; -typedef DT_Scalar DT_Quaternion[4]; - -#endif diff --git a/extern/solid/VisualC6/broad/broad.dsp b/extern/solid/VisualC6/broad/broad.dsp deleted file mode 100644 index 1161d68fcd6..00000000000 --- a/extern/solid/VisualC6/broad/broad.dsp +++ /dev/null @@ -1,132 +0,0 @@ -# Microsoft Developer Studio Project File - Name="broad" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=broad - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "broad.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "broad.mak" CFG="broad - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "broad - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "broad - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "broad - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "broad - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "broad - Win32 Release" -# Name "broad - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\src\broad\BP_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_EndpointList.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_Proxy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_Scene.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\src\broad\BP_Endpoint.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_EndpointList.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_Proxy.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_ProxyList.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\broad\BP_Scene.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/complex/complex.dsp b/extern/solid/VisualC6/complex/complex.dsp deleted file mode 100644 index 74ea67b9e23..00000000000 --- a/extern/solid/VisualC6/complex/complex.dsp +++ /dev/null @@ -1,116 +0,0 @@ -# Microsoft Developer Studio Project File - Name="complex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=complex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "complex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "complex.mak" CFG="complex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "complex - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "complex - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "complex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../src/convex" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "complex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "complex - Win32 Release" -# Name "complex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\src\complex\DT_BBoxTree.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\complex\DT_Complex.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\src\complex\DT_BBoxTree.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\complex\DT_CBox.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\complex\DT_Complex.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/convex/convex.dsp b/extern/solid/VisualC6/convex/convex.dsp deleted file mode 100644 index ec9caace9d9..00000000000 --- a/extern/solid/VisualC6/convex/convex.dsp +++ /dev/null @@ -1,232 +0,0 @@ -# Microsoft Developer Studio Project File - Name="convex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=convex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "convex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "convex.mak" CFG="convex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "convex - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "convex - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "convex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../../qhull/include" /D "NDEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "convex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../../qhull/include" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "convex - Win32 Release" -# Name "convex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\src\convex\DT_Accuracy.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Box.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Cone.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Convex.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Cylinder.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Facet.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_LineSegment.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_PenDepth.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Point.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Polyhedron.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Polytope.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Sphere.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Triangle.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\src\convex\DT_Accuracy.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Array.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Box.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Cone.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Convex.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Cylinder.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Facet.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_GJK.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Hull.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_IndexArray.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_LineSegment.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Minkowski.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_PenDepth.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Point.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Polyhedron.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Polytope.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Shape.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Sphere.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Transform.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_Triangle.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\convex\DT_VertexBase.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/dynamics/dynamics.dsp b/extern/solid/VisualC6/dynamics/dynamics.dsp deleted file mode 100644 index 9659cbf8a56..00000000000 --- a/extern/solid/VisualC6/dynamics/dynamics.dsp +++ /dev/null @@ -1,120 +0,0 @@ -# Microsoft Developer Studio Project File - Name="dynamics" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=dynamics - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "dynamics.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "dynamics.mak" CFG="dynamics - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "dynamics - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "dynamics - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "dynamics - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ELSEIF "$(CFG)" == "dynamics - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo - -!ENDIF - -# Begin Target - -# Name "dynamics - Win32 Release" -# Name "dynamics - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\examples\dynamics\Dynamic.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\examples\dynamics\Kinetic.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\examples\dynamics\RigidBody.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\examples\dynamics\Dynamic.h -# End Source File -# Begin Source File - -SOURCE=..\..\examples\dynamics\Kinetic.h -# End Source File -# Begin Source File - -SOURCE=..\..\examples\dynamics\RigidBody.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/gldemo/gldemo.dsp b/extern/solid/VisualC6/gldemo/gldemo.dsp deleted file mode 100644 index f3cde286161..00000000000 --- a/extern/solid/VisualC6/gldemo/gldemo.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="gldemo" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=gldemo - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "gldemo.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "gldemo.mak" CFG="gldemo - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "gldemo - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "gldemo - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "gldemo - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "gldemo - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "gldemo - Win32 Release" -# Name "gldemo - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\examples\gldemo.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/mnm/mnm.dsp b/extern/solid/VisualC6/mnm/mnm.dsp deleted file mode 100644 index 2df6d951794..00000000000 --- a/extern/solid/VisualC6/mnm/mnm.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="mnm" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=mnm - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "mnm.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mnm.mak" CFG="mnm - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mnm - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "mnm - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mnm - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "mnm - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "mnm - Win32 Release" -# Name "mnm - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\examples\mnm.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/physics/physics.dsp b/extern/solid/VisualC6/physics/physics.dsp deleted file mode 100644 index dd69b6a35b2..00000000000 --- a/extern/solid/VisualC6/physics/physics.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="physics" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=physics - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "physics.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "physics.mak" CFG="physics - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "physics - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "physics - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "physics - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "physics - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../examples/dynamics" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "physics - Win32 Release" -# Name "physics - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\examples\physics.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/sample/sample.dsp b/extern/solid/VisualC6/sample/sample.dsp deleted file mode 100644 index c6e0423cd04..00000000000 --- a/extern/solid/VisualC6/sample/sample.dsp +++ /dev/null @@ -1,102 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sample" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sample - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sample.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sample.mak" CFG="sample - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sample - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sample - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sample - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sample - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sample - Win32 Release" -# Name "sample - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\examples\sample.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/solid.dsw b/extern/solid/VisualC6/solid.dsw deleted file mode 100644 index 397cc4bf371..00000000000 --- a/extern/solid/VisualC6/solid.dsw +++ /dev/null @@ -1,89 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "broad"=".\broad\broad.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "complex"=".\complex\complex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "convex"=".\convex\convex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name qhull - End Project Dependency -}}} - -############################################################################### - -Project: "qhull"="..\..\qhull\VisualC6\qhull\qhull.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "solid"=".\solid\solid.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name broad - End Project Dependency - Begin Project Dependency - Project_Dep_Name complex - End Project Dependency - Begin Project Dependency - Project_Dep_Name convex - End Project Dependency -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/extern/solid/VisualC6/solid/solid.dsp b/extern/solid/VisualC6/solid/solid.dsp deleted file mode 100644 index 4ac7459c2f9..00000000000 --- a/extern/solid/VisualC6/solid/solid.dsp +++ /dev/null @@ -1,148 +0,0 @@ -# Microsoft Developer Studio Project File - Name="solid" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Static Library" 0x0104 - -CFG=solid - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "solid.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "solid.mak" CFG="solid - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "solid - Win32 Release" (based on "Win32 (x86) Static Library") -!MESSAGE "solid - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "solid - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "NDEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\lib\windows\solid\include\solid\ XCOPY /Y Release\*.lib ..\..\..\..\..\lib\windows\solid\lib\ -# End Special Build Tool - -!ELSEIF "$(CFG)" == "solid - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "" -LINK32=cwlink.exe -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MT /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LIB32=link.exe -lib -# ADD BASE LIB32 /nologo -# ADD LIB32 /nologo -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Cmds=XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\lib\windows\solid\include\solid\ XCOPY /Y Debug\*.lib ..\..\..\..\..\lib\windows\solid\lib\Debug\ -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "solid - Win32 Release" -# Name "solid - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\src\DT_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Encounter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Object.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_RespTable.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Scene.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\src\DT_AlgoTable.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Encounter.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Object.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Response.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_RespTable.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Scene.h -# End Source File -# End Group -# End Target -# End Project diff --git a/extern/solid/VisualC6/solid_dll/solid_dll.dsp b/extern/solid/VisualC6/solid_dll/solid_dll.dsp deleted file mode 100644 index eed092502e0..00000000000 --- a/extern/solid/VisualC6/solid_dll/solid_dll.dsp +++ /dev/null @@ -1,147 +0,0 @@ -# Microsoft Developer Studio Project File - Name="solid_dll" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=solid_dll - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "solid_dll.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "solid_dll.mak" CFG="solid_dll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "solid_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "solid_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "solid_dll - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../../lib/win32/vc6" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "NDEBUG" /D "USE_DOUBLES" /D "QHULL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../../lib/win32/vc6/solid.dll" - -!ELSEIF "$(CFG)" == "solid_dll - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "../../lib/win32/vc6" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MD /W3 /GX /Zd /Od /I "../../include" /I "../../src/convex" /I "../../src/complex" /D "_DEBUG" /D "QHULL" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SOLID_DLL_EXPORTS" /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../../lib/win32/vc6/solidd.dll" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "solid_dll - Win32 Release" -# Name "solid_dll - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE="..\..\src\DT_C-api.cpp" -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Encounter.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Object.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_RespTable.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Scene.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\src\DT_AlgoTable.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Encounter.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Object.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Response.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_RespTable.h -# End Source File -# Begin Source File - -SOURCE=..\..\src\DT_Scene.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project diff --git a/extern/solid/include/GEN_MinMax.h b/extern/solid/include/GEN_MinMax.h deleted file mode 100644 index 9ea961cfe4f..00000000000 --- a/extern/solid/include/GEN_MinMax.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef GEN_MINMAX_H -#define GEN_MINMAX_H - -template <class T> -inline const T& GEN_min(const T& a, const T& b) -{ - return b < a ? b : a; -} - -template <class T> -inline const T& GEN_max(const T& a, const T& b) -{ - return a < b ? b : a; -} - -template <class T> -inline const T& GEN_clamped(const T& a, const T& lb, const T& ub) -{ - return a < lb ? lb : (ub < a ? ub : a); -} - -template <class T> -inline void GEN_set_min(T& a, const T& b) -{ - if (b < a) - { - a = b; - } -} - -template <class T> -inline void GEN_set_max(T& a, const T& b) -{ - if (a < b) - { - a = b; - } -} - -template <class T> -inline void GEN_clamp(T& a, const T& lb, const T& ub) -{ - if (a < lb) - { - a = lb; - } - else if (ub < a) - { - a = ub; - } -} - -#endif diff --git a/extern/solid/include/GEN_random.h b/extern/solid/include/GEN_random.h deleted file mode 100644 index 4690a05511a..00000000000 --- a/extern/solid/include/GEN_random.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef GEN_RANDOM_H -#define GEN_RANDOM_H - -#ifdef MT19937 - -#include <limits.h> -#include <mt19937.h> - -#define GEN_RAND_MAX UINT_MAX - -inline void GEN_srand(unsigned int seed) { init_genrand(seed); } -inline unsigned int GEN_rand() { return genrand_int32(); } - -#else - -#include <stdlib.h> - -#define GEN_RAND_MAX RAND_MAX - -inline void GEN_srand(unsigned int seed) { srand(seed); } -inline unsigned int GEN_rand() { return rand(); } - -#endif - -#endif - diff --git a/extern/solid/include/MT/Interval.h b/extern/solid/include/MT/Interval.h deleted file mode 100644 index c6ba2fc1681..00000000000 --- a/extern/solid/include/MT/Interval.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef INTERVAL_H -#define INTERVAL_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -#include <iostream> -#include <algorithm> - -namespace MT { - - template <typename Scalar> - class Interval { - public: - Interval() {} - - -#if _MSC_VER <= 1200 - explicit Interval(const Scalar& x) - : m_lb(x), m_ub(x) - {} - - - Interval(const Scalar& lb, const Scalar& ub) - : m_lb(lb), m_ub(ub) - { - assert(lb <= ub); - } -#else - template <typename Scalar2> - explicit Interval(const Scalar2& x) - : m_lb(x), m_ub(x) - {} - - template <typename Scalar2> - Interval(const Scalar2& lb, const Scalar2& ub) - : m_lb(lb), m_ub(ub) - { - assert(lb <= ub); - } - - template <typename Scalar2> - Interval(const Interval<Scalar2>& z) - { - *this = z; - } - - template <typename Scalar2> - Interval<Scalar>& operator=(const Interval<Scalar2>& z) - { - m_lb = Scalar(z.lower()); - m_ub = Scalar(z.upper()); - return *this; - } -#endif - - - - Scalar& lower() { return m_lb; } - const Scalar& lower() const { return m_lb; } - - Scalar& upper() { return m_ub; } - const Scalar& upper() const { return m_ub; } - - Scalar center() const { return (m_lb + m_ub) * Scalar(0.5); } - Scalar extent() const { return (m_ub - m_lb) * Scalar(0.5); } - - - protected: - Scalar m_lb, m_ub; - }; - - template <typename Scalar> - inline Interval<Scalar> - operator+(const Interval<Scalar>& z1, const Interval<Scalar>& z2) - { - return Interval<Scalar>(z1.lower() + z2.lower(), - z1.upper() + z2.upper()); - } - - template <typename Scalar> - inline Interval<Scalar> - operator-(const Interval<Scalar>& z1, const Interval<Scalar>& z2) - { - return Interval<Scalar>(z1.lower() - z2.upper(), - z1.upper() - z2.lower()); - } - - template <typename Scalar> - inline std::ostream& - operator<<(std::ostream& os, const Interval<Scalar>& z) - { - return os << '[' << z.lower() << ", " << z.upper() << ']'; - } - - template <typename Scalar> - inline Scalar - median(const Interval<Scalar>& z) - { - return (z.lower() + z.upper()) * Scalar(0.5); - } - - template <typename Scalar> - inline Scalar - width(const Interval<Scalar>& z) - { - return z.upper() - z.lower(); - } - - template <typename Scalar> - inline bool - overlap(const Interval<Scalar>& z1, const Interval<Scalar>& z2) - { - return z1.lower() <= z2.upper() && z2.lower() <= z1.upper(); - } - - template <typename Scalar> - inline bool - in(const Interval<Scalar>& z1, const Interval<Scalar>& z2) - { - return z2.lower() <= z1.lower() && z1.upper() <= z2.upper(); - } - - template <typename Scalar> - inline bool - in(Scalar x, const Interval<Scalar>& z) - { - return z.lower() <= x && x <= z.upper(); - } - - template <typename Scalar> - inline Interval<Scalar> - widen(const Interval<Scalar>& z, const Scalar& x) - { - return Interval<Scalar>(z.lower() - x, z.upper() + x); - } - - template<typename Scalar> - inline Interval<Scalar> - hull(const Interval<Scalar>& z1, const Interval<Scalar>& z2) - { - return Interval<Scalar>(GEN_min(z1.lower(), z2.lower()), - GEN_max(z1.upper(), z2.upper())); - } - - template<typename Scalar> - inline Interval<Scalar> - operator+(Scalar x, const Interval<Scalar>& z) - { - return Interval<Scalar>(x + z.lower(), x + z.upper()); - } -} - -#endif diff --git a/extern/solid/include/MT/Matrix3x3.h b/extern/solid/include/MT/Matrix3x3.h deleted file mode 100644 index 85e0d4cac84..00000000000 --- a/extern/solid/include/MT/Matrix3x3.h +++ /dev/null @@ -1,380 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MATRIX3X3_H -#define MATRIX3X3_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -#include "Vector3.h" -#include "Quaternion.h" - -namespace MT { - - // Row-major 3x3 matrix - - template <typename Scalar> - class Matrix3x3 { - public: - Matrix3x3() {} - - template <typename Scalar2> - explicit Matrix3x3(const Scalar2 *m) { setValue(m); } - - explicit Matrix3x3(const Quaternion<Scalar>& q) { setRotation(q); } - - template <typename Scalar2> - Matrix3x3(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll) - { - setEuler(yaw, pitch, roll); - } - - template <typename Scalar2> - Matrix3x3(const Scalar2& xx, const Scalar2& xy, const Scalar2& xz, - const Scalar2& yx, const Scalar2& yy, const Scalar2& yz, - const Scalar2& zx, const Scalar2& zy, const Scalar2& zz) - { - setValue(xx, xy, xz, - yx, yy, yz, - zx, zy, zz); - } - - Vector3<Scalar>& operator[](int i) - { - assert(0 <= i && i < 3); - return m_el[i]; - } - - const Vector3<Scalar>& operator[](int i) const - { - assert(0 <= i && i < 3); - return m_el[i]; - } - - Matrix3x3<Scalar>& operator*=(const Matrix3x3<Scalar>& m); - - template <typename Scalar2> - void setValue(const Scalar2 *m) - { - m_el[0][0] = Scalar(m[0]); - m_el[1][0] = Scalar(m[1]); - m_el[2][0] = Scalar(m[2]); - m_el[0][1] = Scalar(m[4]); - m_el[1][1] = Scalar(m[5]); - m_el[2][1] = Scalar(m[6]); - m_el[0][2] = Scalar(m[8]); - m_el[1][2] = Scalar(m[9]); - m_el[2][2] = Scalar(m[10]); - } - - template <typename Scalar2> - void setValue(const Scalar2& xx, const Scalar2& xy, const Scalar2& xz, - const Scalar2& yx, const Scalar2& yy, const Scalar2& yz, - const Scalar2& zx, const Scalar2& zy, const Scalar2& zz) - { - m_el[0][0] = Scalar(xx); - m_el[0][1] = Scalar(xy); - m_el[0][2] = Scalar(xz); - m_el[1][0] = Scalar(yx); - m_el[1][1] = Scalar(yy); - m_el[1][2] = Scalar(yz); - m_el[2][0] = Scalar(zx); - m_el[2][1] = Scalar(zy); - m_el[2][2] = Scalar(zz); - } - - void setRotation(const Quaternion<Scalar>& q) - { - Scalar d = q.length2(); - assert(d != Scalar(0.0)); - Scalar s = Scalar(2.0) / d; - Scalar xs = q[0] * s, ys = q[1] * s, zs = q[2] * s; - Scalar wx = q[3] * xs, wy = q[3] * ys, wz = q[3] * zs; - Scalar xx = q[0] * xs, xy = q[0] * ys, xz = q[0] * zs; - Scalar yy = q[1] * ys, yz = q[1] * zs, zz = q[2] * zs; - setValue(Scalar(1.0) - (yy + zz), xy - wz, xz + wy, - xy + wz, Scalar(1.0) - (xx + zz), yz - wx, - xz - wy, yz + wx, Scalar(1.0) - (xx + yy)); - } - - template <typename Scalar2> - void setEuler(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll) - { - Scalar cy(Scalar_traits<Scalar>::cos(yaw)); - Scalar sy(Scalar_traits<Scalar>::sin(yaw)); - Scalar cp(Scalar_traits<Scalar>::cos(pitch)); - Scalar sp(Scalar_traits<Scalar>::sin(pitch)); - Scalar cr(Scalar_traits<Scalar>::cos(roll)); - Scalar sr(Scalar_traits<Scalar>::sin(roll)); - Scalar cc = cy * cr; - Scalar cs = cy * sr; - Scalar sc = sy * cr; - Scalar ss = sy * sr; - setValue(cy * cp, -sc + sp * cs, ss - sp * cc, - sy * cp, cc + sp * ss, -cs + sp * sc, - -sp, cp * sr, cp * cr); - } - void setIdentity() - { - setValue(Scalar(1.0), Scalar(0.0), Scalar(0.0), - Scalar(0.0), Scalar(1.0), Scalar(0.0), - Scalar(0.0), Scalar(0.0), Scalar(1.0)); - } - - template <typename Scalar2> - void getValue(Scalar2 *m) const - { - m[0] = Scalar2(m_el[0][0]); - m[1] = Scalar2(m_el[1][0]); - m[2] = Scalar2(m_el[2][0]); - m[3] = Scalar2(0.0); - m[4] = Scalar2(m_el[0][1]); - m[5] = Scalar2(m_el[1][1]); - m[6] = Scalar2(m_el[2][1]); - m[7] = Scalar2(0.0); - m[8] = Scalar2(m_el[0][2]); - m[9] = Scalar2(m_el[1][2]); - m[10] = Scalar2(m_el[2][2]); - m[11] = Scalar2(0.0); - } - - void getRotation(Quaternion<Scalar>& q) const - { - Scalar trace = m_el[0][0] + m_el[1][1] + m_el[2][2]; - - if (trace > Scalar(0.0)) - { - Scalar s = Scalar_traits<Scalar>::sqrt(trace + Scalar(1.0)); - q[3] = s * Scalar(0.5); - s = Scalar(0.5) / s; - - q[0] = (m_el[2][1] - m_el[1][2]) * s; - q[1] = (m_el[0][2] - m_el[2][0]) * s; - q[2] = (m_el[1][0] - m_el[0][1]) * s; - } - else - { - int i = m_el[0][0] < m_el[1][1] ? - (m_el[1][1] < m_el[2][2] ? 2 : 1) : - (m_el[0][0] < m_el[2][2] ? 2 : 0); - int j = (i + 1) % 3; - int k = (i + 2) % 3; - - Scalar s = Scalar_traits<Scalar>::sqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + Scalar(1.0)); - q[i] = s * Scalar(0.5); - s = Scalar(0.5) / s; - - q[3] = (m_el[k][j] - m_el[j][k]) * s; - q[j] = (m_el[j][i] + m_el[i][j]) * s; - q[k] = (m_el[k][i] + m_el[i][k]) * s; - } - } - - - - template <typename Scalar2> - void getEuler(Scalar2& yaw, Scalar2& pitch, Scalar2& roll) const - { - pitch = Scalar2(Scalar_traits<Scalar>::asin(-m_el[2][0])); - if (pitch < Scalar_traits<Scalar2>::TwoTimesPi()) - { - if (pitch > Scalar_traits<Scalar2>::TwoTimesPi()) - { - yaw = Scalar2(Scalar_traits<Scalar>::atan2(m_el[1][0], m_el[0][0])); - roll = Scalar2(Scalar_traits<Scalar>::atan2(m_el[2][1], m_el[2][2])); - } - else - { - yaw = Scalar2(-Scalar_traits<Scalar>::atan2(-m_el[0][1], m_el[0][2])); - roll = Scalar2(0.0); - } - } - else - { - yaw = Scalar2(Scalar_traits<Scalar>::atan2(-m_el[0][1], m_el[0][2])); - roll = Scalar2(0.0); - } - } - - Vector3<Scalar> getScaling() const - { - return Vector3<Scalar>(m_el[0][0] * m_el[0][0] + m_el[1][0] * m_el[1][0] + m_el[2][0] * m_el[2][0], - m_el[0][1] * m_el[0][1] + m_el[1][1] * m_el[1][1] + m_el[2][1] * m_el[2][1], - m_el[0][2] * m_el[0][2] + m_el[1][2] * m_el[1][2] + m_el[2][2] * m_el[2][2]); - } - - - Matrix3x3<Scalar> scaled(const Vector3<Scalar>& s) const - { - return Matrix3x3<Scalar>(m_el[0][0] * s[0], m_el[0][1] * s[1], m_el[0][2] * s[2], - m_el[1][0] * s[0], m_el[1][1] * s[1], m_el[1][2] * s[2], - m_el[2][0] * s[0], m_el[2][1] * s[1], m_el[2][2] * s[2]); - } - - Scalar determinant() const; - Matrix3x3<Scalar> adjoint() const; - Matrix3x3<Scalar> absolute() const; - Matrix3x3<Scalar> transpose() const; - Matrix3x3<Scalar> inverse() const; - - Matrix3x3<Scalar> transposeTimes(const Matrix3x3<Scalar>& m) const; - Matrix3x3<Scalar> timesTranspose(const Matrix3x3<Scalar>& m) const; - - Scalar tdot(int c, const Vector3<Scalar>& v) const - { - return m_el[0][c] * v[0] + m_el[1][c] * v[1] + m_el[2][c] * v[2]; - } - - protected: - Scalar cofac(int r1, int c1, int r2, int c2) const - { - return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1]; - } - - Vector3<Scalar> m_el[3]; - }; - - template <typename Scalar> - inline std::ostream& - operator<<(std::ostream& os, const Matrix3x3<Scalar>& m) - { - return os << m[0] << std::endl << m[1] << std::endl << m[2] << std::endl; - } - - template <typename Scalar> - inline Matrix3x3<Scalar>& - Matrix3x3<Scalar>::operator*=(const Matrix3x3<Scalar>& m) - { - setValue(m.tdot(0, m_el[0]), m.tdot(1, m_el[0]), m.tdot(2, m_el[0]), - m.tdot(0, m_el[1]), m.tdot(1, m_el[1]), m.tdot(2, m_el[1]), - m.tdot(0, m_el[2]), m.tdot(1, m_el[2]), m.tdot(2, m_el[2])); - return *this; - } - - template <typename Scalar> - inline Scalar - Matrix3x3<Scalar>::determinant() const - { - return triple((*this)[0], (*this)[1], (*this)[2]); - } - - - template <typename Scalar> - inline Matrix3x3<Scalar> - Matrix3x3<Scalar>::absolute() const - { - return Matrix3x3<Scalar>( - Scalar_traits<Scalar>::abs(m_el[0][0]), Scalar_traits<Scalar>::abs(m_el[0][1]), Scalar_traits<Scalar>::abs(m_el[0][2]), - Scalar_traits<Scalar>::abs(m_el[1][0]), Scalar_traits<Scalar>::abs(m_el[1][1]), Scalar_traits<Scalar>::abs(m_el[1][2]), - Scalar_traits<Scalar>::abs(m_el[2][0]), Scalar_traits<Scalar>::abs(m_el[2][1]), Scalar_traits<Scalar>::abs(m_el[2][2])); - } - - template <typename Scalar> - inline Matrix3x3<Scalar> - Matrix3x3<Scalar>::transpose() const - { - return Matrix3x3<Scalar>(m_el[0][0], m_el[1][0], m_el[2][0], - m_el[0][1], m_el[1][1], m_el[2][1], - m_el[0][2], m_el[1][2], m_el[2][2]); - } - - template <typename Scalar> - inline Matrix3x3<Scalar> - Matrix3x3<Scalar>::adjoint() const - { - return Matrix3x3<Scalar>(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2), - cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0), - cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1)); - } - - template <typename Scalar> - inline Matrix3x3<Scalar> - Matrix3x3<Scalar>::inverse() const - { - Vector3<Scalar> co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1)); - Scalar det = (*this)[0].dot(co); - assert(det != Scalar(0.0)); - Scalar s = Scalar(1.0) / det; - return Matrix3x3<Scalar>(co[0] * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s, - co[1] * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s, - co[2] * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s); - } - - template <typename Scalar> - inline Matrix3x3<Scalar> - Matrix3x3<Scalar>::transposeTimes(const Matrix3x3<Scalar>& m) const - { - return Matrix3x3<Scalar>( - m_el[0][0] * m[0][0] + m_el[1][0] * m[1][0] + m_el[2][0] * m[2][0], - m_el[0][0] * m[0][1] + m_el[1][0] * m[1][1] + m_el[2][0] * m[2][1], - m_el[0][0] * m[0][2] + m_el[1][0] * m[1][2] + m_el[2][0] * m[2][2], - m_el[0][1] * m[0][0] + m_el[1][1] * m[1][0] + m_el[2][1] * m[2][0], - m_el[0][1] * m[0][1] + m_el[1][1] * m[1][1] + m_el[2][1] * m[2][1], - m_el[0][1] * m[0][2] + m_el[1][1] * m[1][2] + m_el[2][1] * m[2][2], - m_el[0][2] * m[0][0] + m_el[1][2] * m[1][0] + m_el[2][2] * m[2][0], - m_el[0][2] * m[0][1] + m_el[1][2] * m[1][1] + m_el[2][2] * m[2][1], - m_el[0][2] * m[0][2] + m_el[1][2] * m[1][2] + m_el[2][2] * m[2][2]); - } - - template <typename Scalar> - inline Matrix3x3<Scalar> - Matrix3x3<Scalar>::timesTranspose(const Matrix3x3<Scalar>& m) const - { - return Matrix3x3<Scalar>( - m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]), - m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]), - m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2])); - - } - - template <typename Scalar> - inline Vector3<Scalar> - operator*(const Matrix3x3<Scalar>& m, const Vector3<Scalar>& v) - { - return Vector3<Scalar>(m[0].dot(v), m[1].dot(v), m[2].dot(v)); - } - - - template <typename Scalar> - inline Vector3<Scalar> - operator*(const Vector3<Scalar>& v, const Matrix3x3<Scalar>& m) - { - return Vector3<Scalar>(m.tdot(0, v), m.tdot(1, v), m.tdot(2, v)); - } - - template <typename Scalar> - inline Matrix3x3<Scalar> - operator*(const Matrix3x3<Scalar>& m1, const Matrix3x3<Scalar>& m2) - { - return Matrix3x3<Scalar>( - m2.tdot(0, m1[0]), m2.tdot(1, m1[0]), m2.tdot(2, m1[0]), - m2.tdot(0, m1[1]), m2.tdot(1, m1[1]), m2.tdot(2, m1[1]), - m2.tdot(0, m1[2]), m2.tdot(1, m1[2]), m2.tdot(2, m1[2])); - } -} - -#endif diff --git a/extern/solid/include/MT/Quaternion.h b/extern/solid/include/MT/Quaternion.h deleted file mode 100644 index a925f21cd5d..00000000000 --- a/extern/solid/include/MT/Quaternion.h +++ /dev/null @@ -1,316 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef QUATERNION_H -#define QUATERNION_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -#include "Tuple4.h" -#include "Vector3.h" - -namespace MT { - - template <typename Scalar> - class Quaternion : public Tuple4<Scalar> { - public: - Quaternion() {} - - template <typename Scalar2> - explicit Quaternion(const Scalar2 *v) : Tuple4<Scalar>(v) {} - - template <typename Scalar2> - Quaternion(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w) - : Tuple4<Scalar>(x, y, z, w) - {} - - Quaternion(const Vector3<Scalar>& axis, const Scalar& angle) - { - setRotation(axis, angle); - } - - template <typename Scalar2> - Quaternion(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll) - { - setEuler(yaw, pitch, roll); - } - - void setRotation(const Vector3<Scalar>& axis, const Scalar& angle) - { - Scalar d = axis.length(); - assert(d != Scalar(0.0)); - Scalar s = Scalar_traits<Scalar>::sin(angle * Scalar(0.5)) / d; - setValue(axis[0] * s, axis[1] * s, axis[2] * s, - Scalar_traits<Scalar>::cos(angle * Scalar(0.5))); - } - - template <typename Scalar2> - void setEuler(const Scalar2& yaw, const Scalar2& pitch, const Scalar2& roll) - { - Scalar halfYaw = Scalar(yaw) * Scalar(0.5); - Scalar halfPitch = Scalar(pitch) * Scalar(0.5); - Scalar halfRoll = Scalar(roll) * Scalar(0.5); - Scalar cosYaw = Scalar_traits<Scalar>::cos(halfYaw); - Scalar sinYaw = Scalar_traits<Scalar>::sin(halfYaw); - Scalar cosPitch = Scalar_traits<Scalar>::cos(halfPitch); - Scalar sinPitch = Scalar_traits<Scalar>::sin(halfPitch); - Scalar cosRoll = Scalar_traits<Scalar>::cos(halfRoll); - Scalar sinRoll = Scalar_traits<Scalar>::sin(halfRoll); - setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, - cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, - sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, - cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); - } - - Quaternion<Scalar>& operator+=(const Quaternion<Scalar>& q) - { - this->m_co[0] += q[0]; this->m_co[1] += q[1]; this->m_co[2] += q[2]; this->m_co[3] += q[3]; - return *this; - } - - Quaternion<Scalar>& operator-=(const Quaternion<Scalar>& q) - { - this->m_co[0] -= q[0]; this->m_co[1] -= q[1]; this->m_co[2] -= q[2]; this->m_co[3] -= q[3]; - return *this; - } - - Quaternion<Scalar>& operator*=(const Scalar& s) - { - this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; this->m_co[3] *= s; - return *this; - } - - Quaternion<Scalar>& operator/=(const Scalar& s) - { - assert(s != Scalar(0.0)); - return *this *= Scalar(1.0) / s; - } - - Quaternion<Scalar>& operator*=(const Quaternion<Scalar>& q) - { - setValue(this->m_co[3] * q[0] + this->m_co[0] * q[3] + this->m_co[1] * q[2] - this->m_co[2] * q[1], - this->m_co[3] * q[1] + this->m_co[1] * q[3] + this->m_co[2] * q[0] - this->m_co[0] * q[2], - this->m_co[3] * q[2] + this->m_co[2] * q[3] + this->m_co[0] * q[1] - this->m_co[1] * q[0], - this->m_co[3] * q[3] - this->m_co[0] * q[0] - this->m_co[1] * q[1] - this->m_co[2] * q[2]); - return *this; - } - - Scalar dot(const Quaternion<Scalar>& q) const - { - return this->m_co[0] * q[0] + this->m_co[1] * q[1] + this->m_co[2] * q[2] + this->m_co[3] * q[3]; - } - - Scalar length2() const - { - return dot(*this); - } - - Scalar length() const - { - return Scalar_traits<Scalar>::sqrt(length2()); - } - - Quaternion<Scalar>& normalize() - { - return *this /= length(); - } - - Quaternion<Scalar> normalized() const - { - return *this / length(); - } - - Scalar angle(const Quaternion<Scalar>& q) const - { - Scalar s = Scalar_traits<Scalar>::sqrt(length2() * q.length2()); - assert(s != Scalar(0.0)); - return Scalar_traits<Scalar>::acos(dot(q) / s); - } - - Quaternion<Scalar> conjugate() const - { - return Quaternion<Scalar>(-this->m_co[0], -this->m_co[1], -this->m_co[2], this->m_co[3]); - } - - Quaternion<Scalar> inverse() const - { - return conjugate / length2(); - } - - Quaternion<Scalar> slerp(const Quaternion<Scalar>& q, const Scalar& t) const - { - Scalar theta = angle(q); - if (theta != Scalar(0.0)) - { - Scalar d = Scalar(1.0) / Scalar_traits<Scalar>::sin(theta); - Scalar s0 = Scalar_traits<Scalar>::sin((Scalar(1.0) - t) * theta); - Scalar s1 = Scalar_traits<Scalar>::sin(t * theta); - return Quaternion<Scalar>((this->m_co[0] * s0 + q[0] * s1) * d, - (this->m_co[1] * s0 + q[1] * s1) * d, - (this->m_co[2] * s0 + q[2] * s1) * d, - (this->m_co[3] * s0 + q[3] * s1) * d); - } - else - { - return *this; - } - } - - static Quaternion<Scalar> random() - { - // From: "Uniform Random Rotations", Ken Shoemake, Graphics Gems III, - // pg. 124-132 - Scalar x0 = Scalar_traits<Scalar>::random(); - Scalar r1 = Scalar_traits<Scalar>::sqrt(Scalar(1.0) - x0); - Scalar r2 = Scalar_traits<Scalar>::sqrt(x0); - Scalar t1 = Scalar_traits<Scalar>::TwoTimesPi() * Scalar_traits<Scalar>::random(); - Scalar t2 = Scalar_traits<Scalar>::TwoTimesPi() * Scalar_traits<Scalar>::random(); - Scalar c1 = Scalar_traits<Scalar>::cos(t1); - Scalar s1 = Scalar_traits<Scalar>::sin(t1); - Scalar c2 = Scalar_traits<Scalar>::cos(t2); - Scalar s2 = Scalar_traits<Scalar>::sin(t2); - return Quaternion<Scalar>(s1 * r1, c1 * r1, s2 * r2, c2 * r2); - } - - }; - - template <typename Scalar> - inline Quaternion<Scalar> - operator+(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2) - { - return Quaternion<Scalar>(q1[0] + q2[0], q1[1] + q2[1], q1[2] + q2[2], q1[3] + q2[3]); - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator-(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2) - { - return Quaternion<Scalar>(q1[0] - q2[0], q1[1] - q2[1], q1[2] - q2[2], q1[3] - q2[3]); - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator-(const Quaternion<Scalar>& q) - { - return Quaternion<Scalar>(-q[0], -q[1], -q[2], -q[3]); - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator*(const Quaternion<Scalar>& q, const Scalar& s) - { - return Quaternion<Scalar>(q[0] * s, q[1] * s, q[2] * s, q[3] * s); - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator*(const Scalar& s, const Quaternion<Scalar>& q) - { - return q * s; - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator*(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2) { - return Quaternion<Scalar>(q1[3] * q2[0] + q1[0] * q2[3] + q1[1] * q2[2] - q1[2] * q2[1], - q1[3] * q2[1] + q1[1] * q2[3] + q1[2] * q2[0] - q1[0] * q2[2], - q1[3] * q2[2] + q1[2] * q2[3] + q1[0] * q2[1] - q1[1] * q2[0], - q1[3] * q2[3] - q1[0] * q2[0] - q1[1] * q2[1] - q1[2] * q2[2]); - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator*(const Quaternion<Scalar>& q, const Vector3<Scalar>& w) - { - return Quaternion<Scalar>( q[3] * w[0] + q[1] * w[2] - q[2] * w[1], - q[3] * w[1] + q[2] * w[0] - q[0] * w[2], - q[3] * w[2] + q[0] * w[1] - q[1] * w[0], - -q[0] * w[0] - q[1] * w[1] - q[2] * w[2]); - } - - template <typename Scalar> - inline Quaternion<Scalar> - operator*(const Vector3<Scalar>& w, const Quaternion<Scalar>& q) - { - return Quaternion<Scalar>( w[0] * q[3] + w[1] * q[2] - w[2] * q[1], - w[1] * q[3] + w[2] * q[0] - w[0] * q[2], - w[2] * q[3] + w[0] * q[1] - w[1] * q[0], - -w[0] * q[0] - w[1] * q[1] - w[2] * q[2]); - } - - template <typename Scalar> - inline Scalar - dot(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2) - { - return q1.dot(q2); - } - - template <typename Scalar> - inline Scalar - length2(const Quaternion<Scalar>& q) - { - return q.length2(); - } - - template <typename Scalar> - inline Scalar - length(const Quaternion<Scalar>& q) - { - return q.length(); - } - - template <typename Scalar> - inline Scalar - angle(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2) - { - return q1.angle(q2); - } - - template <typename Scalar> - inline Quaternion<Scalar> - conjugate(const Quaternion<Scalar>& q) - { - return q.conjugate(); - } - - template <typename Scalar> - inline Quaternion<Scalar> - inverse(const Quaternion<Scalar>& q) - { - return q.inverse(); - } - - template <typename Scalar> - inline Quaternion<Scalar> - slerp(const Quaternion<Scalar>& q1, const Quaternion<Scalar>& q2, const Scalar& t) - { - return q1.slerp(q2, t); - } - -} - -#endif diff --git a/extern/solid/include/MT/Transform.h b/extern/solid/include/MT/Transform.h deleted file mode 100644 index b80dc1bc18b..00000000000 --- a/extern/solid/include/MT/Transform.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef TRANSFORM_H -#define TRANSFORM_H - -#include "Vector3.h" -#include "Matrix3x3.h" - -namespace MT { - - template <typename Scalar> - class Transform { - enum { - TRANSLATION = 0x01, - ROTATION = 0x02, - RIGID = TRANSLATION | ROTATION, - SCALING = 0x04, - LINEAR = ROTATION | SCALING, - AFFINE = TRANSLATION | LINEAR - }; - - public: - Transform() {} - - template <typename Scalar2> - explicit Transform(const Scalar2 *m) { setValue(m); } - - explicit Transform(const Quaternion<Scalar>& q, - const Vector3<Scalar>& c = Vector3<Scalar>(Scalar(0), Scalar(0), Scalar(0))) - : m_basis(q), - m_origin(c), - m_type(RIGID) - {} - - explicit Transform(const Matrix3x3<Scalar>& b, - const Vector3<Scalar>& c = Vector3<Scalar>(Scalar(0), Scalar(0), Scalar(0)), - unsigned int type = AFFINE) - : m_basis(b), - m_origin(c), - m_type(type) - {} - - Vector3<Scalar> operator()(const Vector3<Scalar>& x) const - { - return Vector3<Scalar>(m_basis[0].dot(x) + m_origin[0], - m_basis[1].dot(x) + m_origin[1], - m_basis[2].dot(x) + m_origin[2]); - } - - Vector3<Scalar> operator*(const Vector3<Scalar>& x) const - { - return (*this)(x); - } - - Matrix3x3<Scalar>& getBasis() { return m_basis; } - const Matrix3x3<Scalar>& getBasis() const { return m_basis; } - - Vector3<Scalar>& getOrigin() { return m_origin; } - const Vector3<Scalar>& getOrigin() const { return m_origin; } - - Quaternion<Scalar> getRotation() const { return m_basis.getRotation(); } - template <typename Scalar2> - void setValue(const Scalar2 *m) - { - m_basis.setValue(m); - m_origin.setValue(&m[12]); - m_type = AFFINE; - } - - template <typename Scalar2> - void getValue(Scalar2 *m) const - { - m_basis.getValue(m); - m_origin.getValue(&m[12]); - m[15] = Scalar2(1.0); - } - - void setOrigin(const Vector3<Scalar>& origin) - { - m_origin = origin; - m_type |= TRANSLATION; - } - - void setBasis(const Matrix3x3<Scalar>& basis) - { - m_basis = basis; - m_type |= LINEAR; - } - - void setRotation(const Quaternion<Scalar>& q) - { - m_basis.setRotation(q); - m_type = (m_type & ~LINEAR) | ROTATION; - } - - void scale(const Vector3<Scalar>& scaling) - { - m_basis = m_basis.scaled(scaling); - m_type |= SCALING; - } - - void setIdentity() - { - m_basis.setIdentity(); - m_origin.setValue(Scalar(0.0), Scalar(0.0), Scalar(0.0)); - m_type = 0x0; - } - - bool isIdentity() const { return m_type == 0x0; } - - Transform<Scalar>& operator*=(const Transform<Scalar>& t) - { - m_origin += m_basis * t.m_origin; - m_basis *= t.m_basis; - m_type |= t.m_type; - return *this; - } - - Transform<Scalar> inverse() const - { - Matrix3x3<Scalar> inv = (m_type & SCALING) ? - m_basis.inverse() : - m_basis.transpose(); - - return Transform<Scalar>(inv, inv * -m_origin, m_type); - } - - Transform<Scalar> inverseTimes(const Transform<Scalar>& t) const; - - Transform<Scalar> operator*(const Transform<Scalar>& t) const; - - private: - - Matrix3x3<Scalar> m_basis; - Vector3<Scalar> m_origin; - unsigned int m_type; - }; - - - template <typename Scalar> - inline Transform<Scalar> - Transform<Scalar>::inverseTimes(const Transform<Scalar>& t) const - { - Vector3<Scalar> v = t.getOrigin() - m_origin; - if (m_type & SCALING) - { - Matrix3x3<Scalar> inv = m_basis.inverse(); - return Transform<Scalar>(inv * t.getBasis(), inv * v, - m_type | t.m_type); - } - else - { - return Transform<Scalar>(m_basis.transposeTimes(t.m_basis), - v * m_basis, m_type | t.m_type); - } - } - - template <typename Scalar> - inline Transform<Scalar> - Transform<Scalar>::operator*(const Transform<Scalar>& t) const - { - return Transform<Scalar>(m_basis * t.m_basis, - (*this)(t.m_origin), - m_type | t.m_type); - } -} - -#endif diff --git a/extern/solid/include/MT/Tuple3.h b/extern/solid/include/MT/Tuple3.h deleted file mode 100644 index 52ea33b7f58..00000000000 --- a/extern/solid/include/MT/Tuple3.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef TUPLE3_H -#define TUPLE3_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -#include <iostream> - -namespace MT { - - template <typename Scalar> - class Tuple3 { - public: - Tuple3() {} - - template <typename Scalar2> - explicit Tuple3(const Scalar2 *v) - { - setValue(v); - } - - template <typename Scalar2> - Tuple3(const Scalar2& x, const Scalar2& y, const Scalar2& z) - { - setValue(x, y, z); - } - - template <typename Scalar2> - Tuple3(const Tuple3<Scalar2>& t) - { - *this = t; - } - - template <typename Scalar2> - Tuple3<Scalar>& operator=(const Tuple3<Scalar2>& t) - { - m_co[0] = Scalar(t[0]); - m_co[1] = Scalar(t[1]); - m_co[2] = Scalar(t[2]); - return *this; - } - - operator Scalar *() { return m_co; } - operator const Scalar *() const { return m_co; } - - Scalar& operator[](int i) { return m_co[i]; } - const Scalar& operator[](int i) const { return m_co[i]; } - - Scalar& x() { return m_co[0]; } - const Scalar& x() const { return m_co[0]; } - - Scalar& y() { return m_co[1]; } - const Scalar& y() const { return m_co[1]; } - - Scalar& z() { return m_co[2]; } - const Scalar& z() const { return m_co[2]; } - - template <typename Scalar2> - void setValue(const Scalar2 *v) - { - m_co[0] = Scalar(v[0]); - m_co[1] = Scalar(v[1]); - m_co[2] = Scalar(v[2]); - } - - template <typename Scalar2> - void setValue(const Scalar2& x, const Scalar2& y, const Scalar2& z) - { - m_co[0] = Scalar(x); - m_co[1] = Scalar(y); - m_co[2] = Scalar(z); - } - - template <typename Scalar2> - void getValue(Scalar2 *v) const - { - v[0] = Scalar2(m_co[0]); - v[1] = Scalar2(m_co[1]); - v[2] = Scalar2(m_co[2]); - } - - protected: - Scalar m_co[3]; - }; - - template <typename Scalar> - inline std::ostream& - operator<<(std::ostream& os, const Tuple3<Scalar>& t) - { - return os << t[0] << ' ' << t[1] << ' ' << t[2]; - } -} - -#endif diff --git a/extern/solid/include/MT/Tuple4.h b/extern/solid/include/MT/Tuple4.h deleted file mode 100644 index 6930541271e..00000000000 --- a/extern/solid/include/MT/Tuple4.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef TUPLE4_H -#define TUPLE4_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -#include <iostream> - -namespace MT { - - template <typename Scalar> - class Tuple4 { - public: - Tuple4() {} - - template <typename Scalar2> - explicit Tuple4(const Scalar2 *v) - { - setValue(v); - } - - template <typename Scalar2> - Tuple4(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w) - { - setValue(x, y, z, w); - } - - operator Scalar *() { return m_co; } - operator const Scalar *() const { return m_co; } - - Scalar& operator[](int i) { return m_co[i]; } - const Scalar& operator[](int i) const { return m_co[i]; } - - Scalar& x() { return m_co[0]; } - const Scalar& x() const { return m_co[0]; } - - Scalar& y() { return m_co[1]; } - const Scalar& y() const { return m_co[1]; } - - Scalar& z() { return m_co[2]; } - const Scalar& z() const { return m_co[2]; } - - Scalar& w() { return m_co[3]; } - const Scalar& w() const { return m_co[3]; } - - template <typename Scalar2> - void setValue(const Scalar2 *v) - { - m_co[0] = Scalar(v[0]); - m_co[1] = Scalar(v[1]); - m_co[2] = Scalar(v[2]); - m_co[3] = Scalar(v[3]); - } - - template <typename Scalar2> - void setValue(const Scalar2& x, const Scalar2& y, const Scalar2& z, const Scalar2& w) - { - m_co[0] = Scalar(x); - m_co[1] = Scalar(y); - m_co[2] = Scalar(z); - m_co[3] = Scalar(w); - } - - template <typename Scalar2> - void getValue(Scalar2 *v) const - { - v[0] = Scalar2(m_co[0]); - v[1] = Scalar2(m_co[1]); - v[2] = Scalar2(m_co[2]); - v[3] = Scalar2(m_co[3]); - } - - protected: - Scalar m_co[4]; - }; - - template <typename Scalar> - inline std::ostream& - operator<<(std::ostream& os, const Tuple4<Scalar>& t) - { - return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3]; - } - -} - -#endif diff --git a/extern/solid/include/MT/Vector3.h b/extern/solid/include/MT/Vector3.h deleted file mode 100644 index b569c003f59..00000000000 --- a/extern/solid/include/MT/Vector3.h +++ /dev/null @@ -1,283 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef VECTOR3_H -#define VECTOR3_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -#include "Tuple3.h" - -namespace MT { - - template <typename Scalar> - class Vector3 : public Tuple3<Scalar> { - public: - Vector3() {} - - template <typename Scalar2> - explicit Vector3(const Scalar2 *v) : Tuple3<Scalar>(v) {} - - template <typename Scalar2> - Vector3(const Scalar2& x, const Scalar2& y, const Scalar2& z) - : Tuple3<Scalar>(x, y, z) - {} - - Vector3<Scalar>& operator+=(const Vector3<Scalar>& v) - { - this->m_co[0] += v[0]; this->m_co[1] += v[1]; this->m_co[2] += v[2]; - return *this; - } - - Vector3<Scalar>& operator-=(const Vector3<Scalar>& v) - { - this->m_co[0] -= v[0]; this->m_co[1] -= v[1]; this->m_co[2] -= v[2]; - return *this; - } - - Vector3<Scalar>& operator*=(const Scalar& s) - { - this->m_co[0] *= s; this->m_co[1] *= s; this->m_co[2] *= s; - return *this; - } - - Vector3<Scalar>& operator/=(const Scalar& s) - { - assert(s != Scalar(0.0)); - return *this *= Scalar(1.0) / s; - } - - Scalar dot(const Vector3<Scalar>& v) const - { - return this->m_co[0] * v[0] + this->m_co[1] * v[1] + this->m_co[2] * v[2]; - } - - Scalar length2() const - { - return dot(*this); - } - - Scalar length() const - { - return Scalar_traits<Scalar>::sqrt(length2()); - } - - Scalar distance2(const Vector3<Scalar>& v) const - { - return (v - *this).length2(); - } - - Scalar distance(const Vector3<Scalar>& v) const - { - return (v - *this).length(); - } - - Vector3<Scalar>& normalize() - { - return *this /= length(); - } - - Vector3<Scalar> normalized() const - { - return *this / length(); - } - - Scalar angle(const Vector3<Scalar>& v) const - { - Scalar s = Scalar_traits<Scalar>::sqrt(length2() * v.length2()); - assert(s != Scalar(0.0)); - return Scalar_traits<Scalar>::acos(dot(v) / s); - } - - Vector3<Scalar> absolute() const - { - return Vector3<Scalar>(Scalar_traits<Scalar>::abs(this->m_co[0]), - Scalar_traits<Scalar>::abs(this->m_co[1]), - Scalar_traits<Scalar>::abs(this->m_co[2])); - } - - Vector3<Scalar> cross(const Vector3<Scalar>& v) const - { - return Vector3<Scalar>(this->m_co[1] * v[2] - this->m_co[2] * v[1], - this->m_co[2] * v[0] - this->m_co[0] * v[2], - this->m_co[0] * v[1] - this->m_co[1] * v[0]); - } - - Scalar triple(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) const - { - return this->m_co[0] * (v1[1] * v2[2] - v1[2] * v2[1]) + - this->m_co[1] * (v1[2] * v2[0] - v1[0] * v2[2]) + - this->m_co[2] * (v1[0] * v2[1] - v1[1] * v2[0]); - } - - int minAxis() const - { - return this->m_co[0] < this->m_co[1] ? (this->m_co[0] < this->m_co[2] ? 0 : 2) : (this->m_co[1] < this->m_co[2] ? 1 : 2); - } - - int maxAxis() const - { - return this->m_co[0] < this->m_co[1] ? (this->m_co[1] < this->m_co[2] ? 2 : 1) : (this->m_co[0] < this->m_co[2] ? 2 : 0); - } - - int furthestAxis() const - { - return absolute().minAxis(); - } - - int closestAxis() const - { - return absolute().maxAxis(); - } - - Vector3<Scalar> lerp(const Vector3<Scalar>& v, const Scalar& t) const - { - return Vector3<Scalar>(this->m_co[0] + (v[0] - this->m_co[0]) * t, - this->m_co[1] + (v[1] - this->m_co[1]) * t, - this->m_co[2] + (v[2] - this->m_co[2]) * t); - } - - static Vector3<Scalar> random() - { - Scalar z = Scalar(2.0) * Scalar_traits<Scalar>::random() - Scalar(1.0); - Scalar r = Scalar_traits<Scalar>::sqrt(Scalar(1.0) - z * z); - Scalar t = Scalar_traits<Scalar>::TwoTimesPi() * Scalar_traits<Scalar>::random(); - return Vector3<Scalar>(r * Scalar_traits<Scalar>::cos(t), - r * Scalar_traits<Scalar>::sin(t), - z); - } - }; - - template <typename Scalar> - inline Vector3<Scalar> - operator+(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return Vector3<Scalar>(v1[0] + v2[0], v1[1] + v2[1], v1[2] + v2[2]); - } - - template <typename Scalar> - inline Vector3<Scalar> - operator-(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return Vector3<Scalar>(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]); - } - - template <typename Scalar> - inline Vector3<Scalar> - operator-(const Vector3<Scalar>& v) - { - return Vector3<Scalar>(-v[0], -v[1], -v[2]); - } - - template <typename Scalar> - inline Vector3<Scalar> - operator*(const Vector3<Scalar>& v, const Scalar& s) - { - return Vector3<Scalar>(v[0] * s, v[1] * s, v[2] * s); - } - - template <typename Scalar> - inline Vector3<Scalar> - operator*(const Scalar& s, const Vector3<Scalar>& v) - { - return v * s; - } - - template <typename Scalar> - inline Vector3<Scalar> - operator/(const Vector3<Scalar>& v, const Scalar& s) - { - assert(s != Scalar(0.0)); - return v * (Scalar(1.0) / s); - } - - template <typename Scalar> - inline Scalar - dot(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return v1.dot(v2); - } - - template <typename Scalar> - inline Scalar - length2(const Vector3<Scalar>& v) - { - return v.length2(); - } - - template <typename Scalar> - inline Scalar - length(const Vector3<Scalar>& v) - { - return v.length(); - } - - template <typename Scalar> - inline Scalar - distance2(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return v1.distance2(v2); - } - - template <typename Scalar> - inline Scalar - distance(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return v1.distance(v2); - } - - template <typename Scalar> - inline Scalar - angle(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return v1.angle(v2); - } - - template <typename Scalar> - inline Vector3<Scalar> - cross(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2) - { - return v1.cross(v2); - } - - template <typename Scalar> - inline Scalar - triple(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2, const Vector3<Scalar>& v3) - { - return v1.triple(v2, v3); - } - - template <typename Scalar> - inline Vector3<Scalar> - lerp(const Vector3<Scalar>& v1, const Vector3<Scalar>& v2, const Scalar& t) - { - return v1.lerp(v2, t); - } - -} - -#endif diff --git a/extern/solid/include/MT_BBox.h b/extern/solid/include/MT_BBox.h deleted file mode 100644 index b5dc537e0d9..00000000000 --- a/extern/solid/include/MT_BBox.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_BBOX_H -#define MT_BBOX_H - -#include "MT_Scalar.h" -#include "MT_Point3.h" -#include "MT_Vector3.h" - -#include <MT/Tuple3.h> -#include "MT_Interval.h" - - - -class MT_BBox : public MT::Tuple3<MT_Interval> { -public: - MT_BBox() {} - MT_BBox(const MT_Point3& p) - : MT::Tuple3<MT_Interval>(MT_Interval(p[0]), - MT_Interval(p[1]), - MT_Interval(p[2])) - {} - MT_BBox(const MT_Point3& lb, const MT_Point3& ub) - : MT::Tuple3<MT_Interval>(MT_Interval(lb[0], ub[0]), - MT_Interval(lb[1], ub[1]), - MT_Interval(lb[2], ub[2])) - {} - MT_BBox(const MT_Interval& x, const MT_Interval& y, const MT_Interval& z) - : MT::Tuple3<MT_Interval>(x, y, z) - {} - - MT_Point3 getMin() const - { - return MT_Point3(m_co[0].lower(), m_co[1].lower(), m_co[2].lower()); - } - - MT_Point3 getMax() const - { - return MT_Point3(m_co[0].upper(), m_co[1].upper(), m_co[2].upper()); - } - - MT_Point3 getCenter() const - { - return MT_Point3(MT::median(m_co[0]), MT::median(m_co[1]), MT::median(m_co[2])); - } - - MT_Vector3 getExtent() const - { - return MT_Vector3(MT::width(m_co[0]) * MT_Scalar(0.5), MT::width(m_co[1]) * MT_Scalar(0.5), MT::width(m_co[2]) * MT_Scalar(0.5)); - } - - void extend(const MT_Vector3& v) - { - m_co[0] = MT::widen(m_co[0], v[0]); - m_co[1] = MT::widen(m_co[1], v[1]); - m_co[2] = MT::widen(m_co[2], v[2]); - } - - bool overlaps(const MT_BBox& b) const - { - return MT::overlap(m_co[0], b[0]) && - MT::overlap(m_co[1], b[1]) && - MT::overlap(m_co[2], b[2]); - } - - bool inside(const MT_BBox& b) const - { - return MT::in(m_co[0], b[0]) && - MT::in(m_co[1], b[1]) && - MT::in(m_co[2], b[2]); - } - - MT_BBox hull(const MT_BBox& b) const - { - return MT_BBox(MT::hull(m_co[0], b[0]), - MT::hull(m_co[1], b[1]), - MT::hull(m_co[2], b[2])); - } - - bool contains(const MT_Point3& p) const - { - return MT::in(p[0], m_co[0]) && MT::in(p[1], m_co[1]) && MT::in(p[2], m_co[2]); - } -}; - -inline MT_BBox operator+(const MT_BBox& b1, const MT_BBox& b2) -{ - return MT_BBox(b1[0] + b2[0], b1[1] + b2[1], b1[2] + b2[2]); -} - -inline MT_BBox operator-(const MT_BBox& b1, const MT_BBox& b2) -{ - return MT_BBox(b1[0] - b2[0], b1[1] - b2[1], b1[2] - b2[2]); -} - -#endif - - diff --git a/extern/solid/include/MT_Interval.h b/extern/solid/include/MT_Interval.h deleted file mode 100644 index 25ebfd0a67d..00000000000 --- a/extern/solid/include/MT_Interval.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_INTERVAL_H -#define MT_INTERVAL_H - -#include <MT/Interval.h> - -#include "MT_Scalar.h" - -typedef MT::Interval<MT_Scalar> MT_Interval; - -#endif diff --git a/extern/solid/include/MT_Matrix3x3.h b/extern/solid/include/MT_Matrix3x3.h deleted file mode 100644 index f7572f90fa2..00000000000 --- a/extern/solid/include/MT_Matrix3x3.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_MATRIX3X3_H -#define MT_MATRIX3X3_H - -#include "MT_Scalar.h" -#include <MT/Matrix3x3.h> - -typedef MT::Matrix3x3<MT_Scalar> MT_Matrix3x3; - - - -#endif diff --git a/extern/solid/include/MT_Point3.h b/extern/solid/include/MT_Point3.h deleted file mode 100644 index ca84f652b65..00000000000 --- a/extern/solid/include/MT_Point3.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_POINT3_H -#define MT_POINT3_H - -#include "MT_Vector3.h" - -typedef MT_Vector3 MT_Point3; - -#endif diff --git a/extern/solid/include/MT_Quaternion.h b/extern/solid/include/MT_Quaternion.h deleted file mode 100644 index ca860db711c..00000000000 --- a/extern/solid/include/MT_Quaternion.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_QUATERNION_H -#define MT_QUATERNION_H - -#include "MT_Scalar.h" -#include <MT/Quaternion.h> - -typedef MT::Quaternion<MT_Scalar> MT_Quaternion; - -#endif - - - diff --git a/extern/solid/include/MT_Scalar.h b/extern/solid/include/MT_Scalar.h deleted file mode 100644 index 663a1f1839c..00000000000 --- a/extern/solid/include/MT_Scalar.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_SCALAR_H -#define MT_SCALAR_H - -#if defined (__sun__) || defined ( __sun ) || defined (__sparc) || defined (__sparc__) || defined (__sgi) -#include <math.h> -#include <float.h> -#else -#include <cmath> -#include <cstdlib> -#include <cfloat> -#endif - -#undef max - -#include "SOLID_types.h" - -#include "GEN_MinMax.h" -#include "GEN_random.h" - -template <typename Scalar> -struct Scalar_traits {}; - -template<> -struct Scalar_traits<float> { - static float TwoTimesPi() { return 6.283185307179586232f; } - static float epsilon() { return FLT_EPSILON; } - static float max() { return FLT_MAX; } - - static float random() { return float(GEN_rand()) / float(GEN_RAND_MAX); } -#if defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__APPLE__) - static float sqrt(float x) { return ::sqrt(x); } - static float abs(float x) { return ::fabs(x); } - - static float cos(float x) { return ::cos(x); } - static float sin(float x) { return ::sin(x); } - static float tan(float x) { return ::tan(x); } - - static float acos(float x) { return ::acos(x); } - static float asin(float x) { return ::asin(x); } - static float atan(float x) { return ::atan(x); } - static float atan2(float x, float y) { return ::atan2(x, y); } - - static float exp(float x) { return ::exp(x); } - static float log(float x) { return ::log(x); } - static float pow(float x, float y) { return ::pow(x, y); } - -#else - static float sqrt(float x) { return ::sqrtf(x); } - static float abs(float x) { return ::fabsf(x); } - - static float cos(float x) { return ::cosf(x); } - static float sin(float x) { return ::sinf(x); } - static float tan(float x) { return ::tanf(x); } - - static float acos(float x) { return ::acosf(x); } - static float asin(float x) { return ::asinf(x); } - static float atan(float x) { return ::atanf(x); } - static float atan2(float x, float y) { return ::atan2f(x, y); } - - static float exp(float x) { return ::expf(x); } - static float log(float x) { return ::logf(x); } - static float pow(float x, float y) { return ::powf(x, y); } -#endif -}; - -template<> -struct Scalar_traits<double> { - static double TwoTimesPi() { return 6.283185307179586232; } - static double epsilon() { return DBL_EPSILON; } - static double max() { return DBL_MAX; } - - static double random() { return double(GEN_rand()) / double(GEN_RAND_MAX); } - static double sqrt(double x) { return ::sqrt(x); } - static double abs(double x) { return ::fabs(x); } - - static double cos(double x) { return ::cos(x); } - static double sin(double x) { return ::sin(x); } - static double tan(double x) { return ::tan(x); } - - static double acos(double x) { return ::acos(x); } - static double asin(double x) { return ::asin(x); } - static double atan(double x) { return ::atan(x); } - static double atan2(double x, double y) { return ::atan2(x, y); } - - static double exp(double x) { return ::exp(x); } - static double log(double x) { return ::log(x); } - static double pow(double x, double y) { return ::pow(x, y); } -}; - -#ifdef USE_TRACER -#include "MT_ScalarTracer.h" - -#ifdef USE_DOUBLES -typedef MT_ScalarTracer<double> MT_Scalar; -#else -typedef MT_ScalarTracer<float> MT_Scalar; -#endif - -#else - -#ifdef USE_DOUBLES -typedef double MT_Scalar; -#else -typedef float MT_Scalar; -#endif - -#endif - - -const MT_Scalar MT_2_PI = Scalar_traits<MT_Scalar>::TwoTimesPi(); -const MT_Scalar MT_PI = MT_2_PI * MT_Scalar(0.5); -const MT_Scalar MT_HALF_PI = MT_2_PI * MT_Scalar(0.25); -const MT_Scalar MT_RADS_PER_DEG = MT_2_PI / MT_Scalar(360.0); -const MT_Scalar MT_DEGS_PER_RAD = MT_Scalar(360.0) / MT_2_PI; - -const MT_Scalar MT_EPSILON = Scalar_traits<MT_Scalar>::epsilon(); -const MT_Scalar MT_INFINITY = Scalar_traits<MT_Scalar>::max(); - -inline MT_Scalar MT_random() { return Scalar_traits<MT_Scalar>::random(); } -inline MT_Scalar MT_abs(MT_Scalar x) { return Scalar_traits<MT_Scalar>::abs(x); } -inline MT_Scalar MT_sqrt(MT_Scalar x) { return Scalar_traits<MT_Scalar>::sqrt(x); } - -inline MT_Scalar MT_cos(MT_Scalar x) { return Scalar_traits<MT_Scalar>::cos(x); } -inline MT_Scalar MT_sin(MT_Scalar x) { return Scalar_traits<MT_Scalar>::sin(x); } -inline MT_Scalar MT_tan(MT_Scalar x) { return Scalar_traits<MT_Scalar>::tan(x); } - -inline MT_Scalar MT_acos(MT_Scalar x) { return Scalar_traits<MT_Scalar>::acos(x); } -inline MT_Scalar MT_asin(MT_Scalar x) { return Scalar_traits<MT_Scalar>::asin(x); } -inline MT_Scalar MT_atan(MT_Scalar x) { return Scalar_traits<MT_Scalar>::atan(x); } -inline MT_Scalar MT_atan2(MT_Scalar x, MT_Scalar y) { return Scalar_traits<MT_Scalar>::atan2(x, y); } - -inline MT_Scalar MT_radians(MT_Scalar x) { return x * MT_RADS_PER_DEG; } -inline MT_Scalar MT_degrees(MT_Scalar x) { return x * MT_DEGS_PER_RAD; } - -#endif diff --git a/extern/solid/include/MT_Transform.h b/extern/solid/include/MT_Transform.h deleted file mode 100644 index 66f92428054..00000000000 --- a/extern/solid/include/MT_Transform.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_TRANSFORM_H -#define MT_TRANSFORM_H - -#include "MT_Scalar.h" -#include <MT/Transform.h> - -typedef MT::Matrix3x3<MT_Scalar> MT_Matrix3x3; -typedef MT::Transform<MT_Scalar> MT_Transform; - -#endif - - - - - diff --git a/extern/solid/include/MT_Vector3.h b/extern/solid/include/MT_Vector3.h deleted file mode 100644 index d50e80dc287..00000000000 --- a/extern/solid/include/MT_Vector3.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef MT_VECTOR3_H -#define MT_VECTOR3_H - -#include "MT_Scalar.h" -#include <MT/Vector3.h> - -typedef MT::Vector3<MT_Scalar> MT_Vector3; - -#ifdef CPU_CMP - -inline bool operator==(const MT_Vector3& p1, const MT_Vector3& p2) -{ - const unsigned int *i1 = (const unsigned int *)&p1; - const unsigned int *i2 = (const unsigned int *)&p2; - return i1[0] == i2[0] && i1[1] == i2[1] && i1[2] == i2[2]; -} - -#else - -inline bool operator==(const MT_Vector3& p1, const MT_Vector3& p2) -{ - return p1[0] == p2[0] && p1[1] == p2[1] && p1[2] == p2[2]; -} - -#endif - -#endif diff --git a/extern/solid/include/SOLID.h b/extern/solid/include/SOLID.h deleted file mode 100644 index 96d40f1ea6b..00000000000 --- a/extern/solid/include/SOLID.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef SOLID_H -#define SOLID_H - -#include "SOLID_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - - DT_DECLARE_HANDLE(DT_ObjectHandle); - DT_DECLARE_HANDLE(DT_SceneHandle); - DT_DECLARE_HANDLE(DT_ShapeHandle); - DT_DECLARE_HANDLE(DT_VertexBaseHandle); - DT_DECLARE_HANDLE(DT_RespTableHandle); - DT_DECLARE_HANDLE(DT_ArchiveHandle); - - typedef unsigned int DT_ResponseClass; - - typedef enum DT_ResponseType { - DT_NO_RESPONSE, /* No response (obsolete) */ - DT_BROAD_RESPONSE, /* Broad phase response is returned. */ - DT_SIMPLE_RESPONSE, /* No collision data */ - DT_WITNESSED_RESPONSE, /* A point common to both objects - is returned as collision data - */ - DT_DEPTH_RESPONSE /* The penetration depth is returned - as collision data. The penetration depth - is the shortest vector over which one - object needs to be translated in order - to bring the objects in touching contact. - */ - } DT_ResponseType; - -/* For witnessed response, the following structure represents a common point. The world - coordinates of 'point1' and 'point2' coincide. 'normal' is the zero vector. - - For depth response, the following structure represents the penetration depth. - 'point1' en 'point2' are the witness points of the penetration depth in world coordinates. - The penetration depth vector in world coordinates is represented by 'normal'. -*/ - - typedef struct DT_CollData { - DT_Vector3 point1; /* Point in object1 in world coordinates */ - DT_Vector3 point2; /* Point in object2 in world coordinates */ - DT_Vector3 normal; /* point2 - point1 */ - } DT_CollData; - -/* A response callback is called by SOLID for each pair of collding objects. 'client-data' - is a pointer to an arbitrary structure in the client application. The client objects are - pointers to structures in the client application associated with the coliding objects. - 'coll_data' is the collision data computed by SOLID. -*/ - - typedef DT_Bool (*DT_ResponseCallback)(void *client_data, - void *client_object1, - void *client_object2, - const DT_CollData *coll_data); - -/* Shape definition */ - - - extern DECLSPEC DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z); - extern DECLSPEC DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height); - extern DECLSPEC DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height); - extern DECLSPEC DT_ShapeHandle DT_NewSphere(DT_Scalar radius); - extern DECLSPEC DT_ShapeHandle DT_NewPoint(const DT_Vector3 point); - extern DECLSPEC DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target); - extern DECLSPEC DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2); - extern DECLSPEC DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2); - - extern DECLSPEC DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride); - extern DECLSPEC void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase); - extern DECLSPEC void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer); - - extern DECLSPEC DT_ShapeHandle DT_NewComplexShape(DT_VertexBaseHandle vertexBase); - extern DECLSPEC void DT_EndComplexShape(); - - extern DECLSPEC DT_ShapeHandle DT_NewPolytope(DT_VertexBaseHandle vertexBase); - extern DECLSPEC void DT_EndPolytope(); - - extern DECLSPEC void DT_Begin(); - extern DECLSPEC void DT_End(); - - extern DECLSPEC void DT_Vertex(const DT_Vector3 vertex); - extern DECLSPEC void DT_VertexIndex(DT_Index index); - - extern DECLSPEC void DT_VertexIndices(DT_Count count, const DT_Index *indices); - extern DECLSPEC void DT_VertexRange(DT_Index first, DT_Count count); - - extern DECLSPEC void DT_DeleteShape(DT_ShapeHandle shape); - -/* Object */ - - extern DECLSPEC DT_ObjectHandle DT_CreateObject( - void *client_object, /* pointer to object in client memory */ - DT_ShapeHandle shape /* the shape or geometry of the object */ - ); - - extern DECLSPEC void DT_DestroyObject(DT_ObjectHandle object); - - - - extern DECLSPEC void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position); - extern DECLSPEC void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation); - extern DECLSPEC void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling); - -/* The margin is an offset from the actual shape. The actual geometry of an - object is the set of points whose distance to the transformed shape is at - most the margin. During the lifetime of an object the margin can be - modified. -*/ - - extern DECLSPEC void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin); - - -/* These commands assume a column-major 4x4 OpenGL matrix representation */ - - extern DECLSPEC void DT_SetMatrixf(DT_ObjectHandle object, const float *m); - extern DECLSPEC void DT_GetMatrixf(DT_ObjectHandle object, float *m); - - extern DECLSPEC void DT_SetMatrixd(DT_ObjectHandle object, const double *m); - extern DECLSPEC void DT_GetMatrixd(DT_ObjectHandle object, double *m); - - extern DECLSPEC void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max); - - - extern DECLSPEC DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 v); -/* This next command returns the distance between the objects. De returned - closest points are given in world coordinates. -*/ - extern DECLSPEC DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point1, DT_Vector3 point2); - - extern DECLSPEC DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point); - - extern DECLSPEC DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point1, DT_Vector3 point2); - -/* Scene */ - - extern DECLSPEC DT_SceneHandle DT_CreateScene(); - extern DECLSPEC void DT_DestroyScene(DT_SceneHandle scene); - - extern DECLSPEC void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object); - extern DECLSPEC void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object); - -/* Note that objects can be assigned to multiple scenes! */ - -/* Response */ - -/* Response tables are defined independent of the scenes in which they are used. - Multiple response tables can be used in one scene, and a response table - can be shared among scenes. -*/ - extern DECLSPEC DT_RespTableHandle DT_CreateRespTable(); - extern DECLSPEC void DT_DestroyRespTable(DT_RespTableHandle respTable); - -/* Responses are defined on (pairs of) response classes. Each response table - maintains its set of response classes. -*/ - extern DECLSPEC DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable); - -/* To each object for which a response is defined in the response table a - response class needs to be assigned. -*/ - - extern DECLSPEC void DT_SetResponseClass(DT_RespTableHandle respTable, - DT_ObjectHandle object, - DT_ResponseClass responseClass); - - extern DECLSPEC void DT_ClearResponseClass(DT_RespTableHandle respTable, - DT_ObjectHandle object); - - extern DECLSPEC void DT_CallResponse(DT_RespTableHandle respTable, - DT_ObjectHandle object1, - DT_ObjectHandle object2, - const DT_CollData *coll_data); - -/* For each pair of objects multiple responses can be defined. A response is a callback - together with its response type and client data. */ - -/* Responses can be defined for all pairs of response classes... */ - extern DECLSPEC void DT_AddDefaultResponse(DT_RespTableHandle respTable, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data); - - extern DECLSPEC void DT_RemoveDefaultResponse(DT_RespTableHandle respTable, - DT_ResponseCallback response); -/* ...per response class... */ - extern DECLSPEC void DT_AddClassResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data); - - extern DECLSPEC void DT_RemoveClassResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass, - DT_ResponseCallback response); - -/* ... and per pair of response classes...*/ - extern DECLSPEC void DT_AddPairResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data); - extern DECLSPEC void DT_RemovePairResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - DT_ResponseCallback response); - -/* The next command calls the response callbacks for all intersecting pairs of objects in a scene. - 'DT_Test' returns the number of pairs of objects for which callbacks have been called. -*/ - - extern DECLSPEC DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable); - -/* Set the maximum relative error in the closest points and penetration depth - computation. The default for `max_error' is 1.0e-3. Larger errors result - in better performance. Non-positive error tolerances are ignored. -*/ - - extern DECLSPEC void DT_SetAccuracy(DT_Scalar max_error); - -/* Set the maximum tolerance on relative errors due to rounding. The default for `tol_error' - is the machine epsilon. Very large tolerances result in false collisions. Setting tol_error too small - results in missed collisions. Non-positive error tolerances are ignored. -*/ - - extern DECLSPEC void DT_SetTolerance(DT_Scalar tol_error); - - -/* This function returns the client pointer to the first object in a scene hit by the ray - (actually a line segment) defined by the points 'from' en 'to'. The spot is the hit point - on the object in local coordinates. 'normal' is the normal to the surface of the object in - world coordinates. The ignore_client pointer is used to make one of the objects transparent. - - NB: Currently ray tests are implemented for spheres, boxes, and meshes only!! -*/ - - extern DECLSPEC void *DT_RayCast(DT_SceneHandle scene, void *ignore_client, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal); - -/* Similar, only here a single object is tested and a boolean is returned */ - - extern DECLSPEC DT_Bool DT_ObjectRayCast(DT_ObjectHandle object, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/extern/solid/include/SOLID_broad.h b/extern/solid/include/SOLID_broad.h deleted file mode 100644 index 74e4214fa67..00000000000 --- a/extern/solid/include/SOLID_broad.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef SOLID_BROAD_H -#define SOLID_BROAD_H - -#include "SOLID_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - - DT_DECLARE_HANDLE(BP_SceneHandle); - DT_DECLARE_HANDLE(BP_ProxyHandle); - - typedef void (*BP_Callback)(void *client_data, - void *object1, - void *object2); - - typedef bool (*BP_RayCastCallback)(void *client_data, - void *object, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar *lambda); - - extern DECLSPEC BP_SceneHandle BP_CreateScene(void *client_data, - BP_Callback beginOverlap, - BP_Callback endOverlap); - - extern DECLSPEC void BP_DestroyScene(BP_SceneHandle scene); - - extern DECLSPEC BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, - void *object, - const DT_Vector3 min, - const DT_Vector3 max); - - extern DECLSPEC void BP_DestroyProxy(BP_SceneHandle scene, - BP_ProxyHandle proxy); - - extern DECLSPEC void BP_SetBBox(BP_ProxyHandle proxy, - const DT_Vector3 min, - const DT_Vector3 max); - - extern DECLSPEC void *BP_RayCast(BP_SceneHandle scene, - BP_RayCastCallback objectRayCast, - void *client_data, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar *lambda); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/extern/solid/include/SOLID_types.h b/extern/solid/include/SOLID_types.h deleted file mode 100644 index 630594e447f..00000000000 --- a/extern/solid/include/SOLID_types.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef SOLID_TYPES_H -#define SOLID_TYPES_H - -#ifndef DECLSPEC -# ifdef WIN32 -# define DECLSPEC __declspec(dllexport) -# else -# define DECLSPEC -# endif -#endif - -#define DT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name - - -typedef unsigned short DT_Index; -typedef unsigned short DT_Count; -typedef unsigned int DT_Size; -typedef float DT_Scalar; -typedef int DT_Bool; - -#define DT_FALSE 0 -#define DT_TRUE 1 - -#define DT_CONTINUE 0 -#define DT_DONE 1 - -typedef DT_Scalar DT_Vector3[3]; -typedef DT_Scalar DT_Quaternion[4]; - -#endif diff --git a/extern/solid/make/msvc_7_0/broad/broad.vcproj b/extern/solid/make/msvc_7_0/broad/broad.vcproj deleted file mode 100644 index adb56424e60..00000000000 --- a/extern/solid/make/msvc_7_0/broad/broad.vcproj +++ /dev/null @@ -1,262 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="broad" - ProjectGUID="{0112CAD5-3584-412A-A2E5-1315A00437B4}" - SccProjectName="" - SccLocalPath=""> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Blender Release|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\broad.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\broad.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Blender Debug|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\broad.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\debug\broad.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Release|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - StringPooling="TRUE" - RuntimeLibrary="2" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\broad.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\broad.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Debug|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\broad.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\broad\mtdll\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\broad.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath="..\..\..\src\broad\BP_C-api.cpp"> - </File> - <File - RelativePath="..\..\..\src\broad\BP_EndpointList.cpp"> - </File> - <File - RelativePath="..\..\..\src\broad\BP_Proxy.cpp"> - </File> - <File - RelativePath="..\..\..\src\broad\BP_Scene.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath="..\..\src\broad\BP_Endpoint.h"> - </File> - <File - RelativePath="..\..\src\broad\BP_EndpointList.h"> - </File> - <File - RelativePath="..\..\src\broad\BP_Proxy.h"> - </File> - <File - RelativePath="..\..\src\broad\BP_ProxyList.h"> - </File> - <File - RelativePath="..\..\src\broad\BP_Scene.h"> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/extern/solid/make/msvc_7_0/complex/complex.vcproj b/extern/solid/make/msvc_7_0/complex/complex.vcproj deleted file mode 100644 index 2a895fa28d3..00000000000 --- a/extern/solid/make/msvc_7_0/complex/complex.vcproj +++ /dev/null @@ -1,252 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="complex" - ProjectGUID="{B83C6BED-11EC-46C8-AFFA-121EEDE94373}" - SccProjectName="" - SccLocalPath=""> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Blender Release|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\complex.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\complex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Blender Debug|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\complex.pch" - AssemblerOutput="0" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\debug\complex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Release|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" - StringPooling="TRUE" - RuntimeLibrary="2" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\complex.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\complex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Debug|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\complex.pch" - AssemblerOutput="0" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\complex\mtdll\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\complex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath="..\..\..\src\complex\DT_BBoxTree.cpp"> - </File> - <File - RelativePath="..\..\..\src\complex\DT_Complex.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath="..\..\src\complex\DT_BBoxTree.h"> - </File> - <File - RelativePath="..\..\src\complex\DT_CBox.h"> - </File> - <File - RelativePath="..\..\src\complex\DT_Complex.h"> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/extern/solid/make/msvc_7_0/convex/convex.vcproj b/extern/solid/make/msvc_7_0/convex/convex.vcproj deleted file mode 100644 index da088b5972f..00000000000 --- a/extern/solid/make/msvc_7_0/convex/convex.vcproj +++ /dev/null @@ -1,337 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="convex" - ProjectGUID="{524264F4-DF21-4B79-847F-E7CA643ECD0B}" - SccProjectName="" - SccLocalPath=""> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Blender Debug|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include" - PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\convex.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\debug\convex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Blender Release|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include" - PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\convex.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\convex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Release|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include" - PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB" - StringPooling="TRUE" - RuntimeLibrary="2" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\convex.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\convex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Debug|Win32" - OutputDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug" - IntermediateDirectory="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include" - PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\convex.pch" - AssemblerListingLocation="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\" - ObjectFile="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\" - ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_7\extern\solid\convex\mtdll\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\convex.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath="..\..\..\src\convex\DT_Accuracy.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Box.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Cone.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Convex.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Cylinder.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Facet.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_LineSegment.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_PenDepth.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Point.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Polyhedron.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Polytope.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Sphere.cpp"> - </File> - <File - RelativePath="..\..\..\src\convex\DT_Triangle.cpp"> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath="..\..\src\convex\DT_Accuracy.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Array.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Box.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Cone.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Convex.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Cylinder.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Facet.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_GJK.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Hull.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_IndexArray.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_LineSegment.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Minkowski.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_PenDepth.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Point.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Polyhedron.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Polytope.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Shape.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Sphere.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Transform.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_Triangle.h"> - </File> - <File - RelativePath="..\..\src\convex\DT_VertexBase.h"> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/extern/solid/make/msvc_7_0/solid.vcproj b/extern/solid/make/msvc_7_0/solid.vcproj deleted file mode 100644 index d9e6332987c..00000000000 --- a/extern/solid/make/msvc_7_0/solid.vcproj +++ /dev/null @@ -1,462 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.10" - Name="solid" - ProjectGUID="{D696C86B-0B53-4471-A50D-5B983A6FA4AD}" - SccProjectName="" - SccLocalPath=""> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Blender Debug|Win32" - OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid\debug" - IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex" - PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\debug\solid.pch" - AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\debug\" - ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\debug\" - ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\debug\solid.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool" - Description="Copying SOLID files library (debug target) to lib tree." - CommandLine="ECHO Copying header files -IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -ECHO Done -"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="Blender Release|Win32" - OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid" - IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex" - PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB" - StringPooling="TRUE" - RuntimeLibrary="0" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\solid.pch" - AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\" - ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\" - ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\solid.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool" - Description="Copying SOLID files library to lib tree." - CommandLine="ECHO Copying header files -IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -ECHO Done -"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Release|Win32" - OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll" - IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex" - PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB" - StringPooling="TRUE" - RuntimeLibrary="2" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\solid.pch" - AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\" - ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\" - ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\solid.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool" - Description="Copying SOLID files library to lib tree." - CommandLine="ECHO Copying header files -IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -ECHO Done -"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - <Configuration - Name="3D Plugin Debug|Win32" - OutputDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug" - IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug" - ConfigurationType="4" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="FALSE" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex" - PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - UsePrecompiledHeader="2" - PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\solid.pch" - AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\" - ObjectFile="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\" - ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\solid\mtdll\debug\" - WarningLevel="2" - SuppressStartupBanner="TRUE" - DebugInformationFormat="3" - CompileAs="0"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\solid.lib" - SuppressStartupBanner="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool" - Description="Copying SOLID files library (debug target) to lib tree." - CommandLine="ECHO Copying header files -IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_7\extern\solid\include\SOLID -ECHO Done -"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1033"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCXMLDataGeneratorTool"/> - <Tool - Name="VCManagedWrapperGeneratorTool"/> - <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> - <File - RelativePath="..\..\src\DT_C-api.cpp"> - <FileConfiguration - Name="Blender Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - <FileConfiguration - Name="Blender Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - </File> - <File - RelativePath="..\..\src\DT_Encounter.cpp"> - <FileConfiguration - Name="Blender Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - <FileConfiguration - Name="Blender Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - </File> - <File - RelativePath="..\..\src\DT_Object.cpp"> - <FileConfiguration - Name="Blender Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - <FileConfiguration - Name="Blender Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - </File> - <File - RelativePath="..\..\src\DT_RespTable.cpp"> - <FileConfiguration - Name="Blender Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - <FileConfiguration - Name="Blender Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - </File> - <File - RelativePath="..\..\src\DT_Scene.cpp"> - <FileConfiguration - Name="Blender Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - <FileConfiguration - Name="Blender Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Release|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="2" - AdditionalIncludeDirectories="" - PreprocessorDefinitions=""/> - </FileConfiguration> - <FileConfiguration - Name="3D Plugin Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="" - PreprocessorDefinitions="" - BasicRuntimeChecks="3"/> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl"> - <File - RelativePath="..\..\src\DT_AlgoTable.h"> - </File> - <File - RelativePath="..\..\src\DT_Encounter.h"> - </File> - <File - RelativePath="..\..\src\DT_Object.h"> - </File> - <File - RelativePath="..\..\src\DT_Response.h"> - </File> - <File - RelativePath="..\..\src\DT_RespTable.h"> - </File> - <File - RelativePath="..\..\src\DT_Scene.h"> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/extern/solid/make/msvc_9_0/broad/broad.vcproj b/extern/solid/make/msvc_9_0/broad/broad.vcproj deleted file mode 100644 index c58cb08b2c3..00000000000 --- a/extern/solid/make/msvc_9_0/broad/broad.vcproj +++ /dev/null @@ -1,369 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_broad"
- ProjectGUID="{0112CAD5-3584-412A-A2E5-1315A00437B4}"
- RootNamespace="broad"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\broad.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\debug\broad.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\mtdll\broad.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\broad.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\broad\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\broad.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\src\broad\BP_C-api.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_EndpointList.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_Proxy.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\broad\BP_Scene.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\broad\BP_Endpoint.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_EndpointList.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_Proxy.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_ProxyList.h"
- >
- </File>
- <File
- RelativePath="..\..\src\broad\BP_Scene.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/complex/complex.vcproj b/extern/solid/make/msvc_9_0/complex/complex.vcproj deleted file mode 100644 index 1828c489fc6..00000000000 --- a/extern/solid/make/msvc_9_0/complex/complex.vcproj +++ /dev/null @@ -1,355 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_complex"
- ProjectGUID="{B83C6BED-11EC-46C8-AFFA-121EEDE94373}"
- RootNamespace="complex"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\complex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\complex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\complex.pch"
- AssemblerOutput="0"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\debug\complex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\complex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\mtdll\complex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\src\convex"
- PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\complex.pch"
- AssemblerOutput="0"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\complex\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\complex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\src\complex\DT_BBoxTree.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\complex\DT_Complex.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\complex\DT_BBoxTree.h"
- >
- </File>
- <File
- RelativePath="..\..\src\complex\DT_CBox.h"
- >
- </File>
- <File
- RelativePath="..\..\src\complex\DT_Complex.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/convex/convex.vcproj b/extern/solid/make/msvc_9_0/convex/convex.vcproj deleted file mode 100644 index cb35a0ea199..00000000000 --- a/extern/solid/make/msvc_9_0/convex/convex.vcproj +++ /dev/null @@ -1,469 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_convex"
- ProjectGUID="{524264F4-DF21-4B79-847F-E7CA643ECD0B}"
- RootNamespace="convex"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\debug\convex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\convex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\mtdll\convex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\qhull\include"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\convex.pch"
- AssemblerListingLocation="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\"
- ObjectFile="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\..\build\msvc_9\extern\solid\convex\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\convex.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\..\src\convex\DT_Accuracy.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Box.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Cone.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Convex.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Cylinder.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Facet.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_LineSegment.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_PenDepth.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Point.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Polyhedron.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Polytope.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Sphere.cpp"
- >
- </File>
- <File
- RelativePath="..\..\..\src\convex\DT_Triangle.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\convex\DT_Accuracy.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Array.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Box.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Cone.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Convex.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Cylinder.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Facet.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_GJK.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Hull.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_IndexArray.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_LineSegment.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Minkowski.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_PenDepth.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Point.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Polyhedron.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Polytope.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Shape.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Sphere.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Transform.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_Triangle.h"
- >
- </File>
- <File
- RelativePath="..\..\src\convex\DT_VertexBase.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/make/msvc_9_0/solid.vcproj b/extern/solid/make/msvc_9_0/solid.vcproj deleted file mode 100644 index ed81c374696..00000000000 --- a/extern/solid/make/msvc_9_0/solid.vcproj +++ /dev/null @@ -1,595 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="EXT_solid"
- ProjectGUID="{D696C86B-0B53-4471-A50D-5B983A6FA4AD}"
- RootNamespace="solid"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Blender Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\debug\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\debug\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
ECHO Done
"
- />
- </Configuration>
- <Configuration
- Name="Blender Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library to lib tree."
- CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
ECHO Done
"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Release|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid\mtdll"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid\mtdll"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="NDEBUG;QHULL;WIN32;_LIB"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library to lib tree."
- CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
ECHO Done
"
- />
- </Configuration>
- <Configuration
- Name="3D Plugin Debug|Win32"
- OutputDirectory="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug"
- IntermediateDirectory="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug"
- ConfigurationType="4"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include;..\..\src\convex;..\..\src\complex"
- PreprocessorDefinitions="_DEBUG;QHULL;WIN32;_LIB"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\solid.pch"
- AssemblerListingLocation="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\"
- ObjectFile="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\"
- ProgramDataBaseFileName="..\..\..\..\..\build\msvc_9\extern\solid\mtdll\debug\"
- WarningLevel="2"
- SuppressStartupBanner="true"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- OutputFile="..\..\..\..\..\build\msvc_9\libs\extern\mtdll\debug\solid.lib"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- Description="Copying SOLID files library (debug target) to lib tree."
- CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID MKDIR ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
XCOPY /Y ..\..\include\SOLID*.h ..\..\..\..\..\build\msvc_9\extern\solid\include\SOLID
ECHO Done
"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\src\DT_C-api.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Encounter.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Object.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_RespTable.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\DT_Scene.cpp"
- >
- <FileConfiguration
- Name="Blender Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Blender Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="3D Plugin Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BasicRuntimeChecks="3"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\src\DT_AlgoTable.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Encounter.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Object.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Response.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_RespTable.h"
- >
- </File>
- <File
- RelativePath="..\..\src\DT_Scene.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/extern/solid/src/DT_AlgoTable.h b/extern/solid/src/DT_AlgoTable.h deleted file mode 100644 index 0749ca7fdd9..00000000000 --- a/extern/solid/src/DT_AlgoTable.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_ALGOTABLE_H -#define DT_ALGOTABLE_H - -#include "DT_Shape.h" - -template <typename Function, int NUM_TYPES = 8> -class AlgoTable { -public: - void addEntry(DT_ShapeType type1, DT_ShapeType type2, Function function) - { - table[type2][type1] = function; - table[type1][type2] = function; - } - - Function lookup(DT_ShapeType type1, DT_ShapeType type2) const - { - return table[type1][type2]; - } - -private: - Function table[NUM_TYPES][NUM_TYPES]; -}; - -#endif diff --git a/extern/solid/src/DT_C-api.cpp b/extern/solid/src/DT_C-api.cpp deleted file mode 100644 index ac16deda87d..00000000000 --- a/extern/solid/src/DT_C-api.cpp +++ /dev/null @@ -1,581 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - - -#include "SOLID.h" - -#include "DT_Box.h" -#include "DT_Cone.h" -#include "DT_Cylinder.h" -#include "DT_Sphere.h" -#include "DT_Complex.h" -#include "DT_Polytope.h" -#include "DT_Polyhedron.h" -#include "DT_Point.h" -#include "DT_LineSegment.h" -#include "DT_Triangle.h" -#include "DT_Minkowski.h" -#include "DT_Hull.h" - -#include "DT_Response.h" -#include "DT_RespTable.h" - -#include "DT_Scene.h" -#include "DT_Object.h" - -#include "DT_VertexBase.h" - -#include "DT_Accuracy.h" - -typedef MT::Tuple3<DT_Scalar> T_Vertex; -typedef std::vector<T_Vertex> T_VertexBuf; -typedef std::vector<DT_Index> T_IndexBuf; -typedef std::vector<const DT_Convex *> T_PolyList; - -static T_VertexBuf vertexBuf; -static T_IndexBuf indexBuf; -static T_PolyList polyList; - -static DT_Complex *currentComplex = 0; -static DT_Polyhedron *currentPolyhedron = 0; -static DT_VertexBase *currentBase = 0; - - - - - - -DT_VertexBaseHandle DT_NewVertexBase(const void *pointer, DT_Size stride) -{ - return (DT_VertexBaseHandle)new DT_VertexBase(pointer, stride); -} - -void DT_DeleteVertexBase(DT_VertexBaseHandle vertexBase) -{ - delete (DT_VertexBase *)vertexBase; -} - -void DT_ChangeVertexBase(DT_VertexBaseHandle vertexBase, const void *pointer) -{ - DT_VertexBase *base = (DT_VertexBase *)vertexBase; - base->setPointer(pointer); - const DT_ComplexList& complexList = base->getComplexList(); - DT_ComplexList::const_iterator it; - for (it = complexList.begin(); it != complexList.end(); ++it) - { - (*it)->refit(); - } -} - - -DT_ShapeHandle DT_NewBox(DT_Scalar x, DT_Scalar y, DT_Scalar z) -{ - return (DT_ShapeHandle)new DT_Box(MT_Scalar(x) * MT_Scalar(0.5), - MT_Scalar(y) * MT_Scalar(0.5), - MT_Scalar(z) * MT_Scalar(0.5)); -} - -DT_ShapeHandle DT_NewCone(DT_Scalar radius, DT_Scalar height) -{ - return (DT_ShapeHandle)new DT_Cone(MT_Scalar(radius), MT_Scalar(height)); -} - -DT_ShapeHandle DT_NewCylinder(DT_Scalar radius, DT_Scalar height) -{ - return (DT_ShapeHandle)new DT_Cylinder(MT_Scalar(radius), MT_Scalar(height)); -} - -DT_ShapeHandle DT_NewSphere(DT_Scalar radius) -{ - return (DT_ShapeHandle)new DT_Sphere(MT_Scalar(radius)); -} - -DT_ShapeHandle DT_NewPoint(const DT_Vector3 point) -{ - return (DT_ShapeHandle)new DT_Point(MT_Point3(point)); -} - -DT_ShapeHandle DT_NewLineSegment(const DT_Vector3 source, const DT_Vector3 target) -{ - return (DT_ShapeHandle)new DT_LineSegment(MT_Point3(source), MT_Point3(target)); -} - -DT_ShapeHandle DT_NewMinkowski(DT_ShapeHandle shape1, DT_ShapeHandle shape2) -{ - if (((DT_Shape *)shape1)->getType() != CONVEX || - ((DT_Shape *)shape2)->getType() != CONVEX) - { - return 0; - } - - return (DT_ShapeHandle)new DT_Minkowski(*(DT_Convex *)shape1, *(DT_Convex *)shape2); -} - -DT_ShapeHandle DT_NewHull(DT_ShapeHandle shape1, DT_ShapeHandle shape2) -{ - if (((DT_Shape *)shape1)->getType() != CONVEX || - ((DT_Shape *)shape2)->getType() != CONVEX) - { - return 0; - } - - return (DT_ShapeHandle)new DT_Hull(*(DT_Convex *)shape1, *(DT_Convex *)shape2); -} - -DT_ShapeHandle DT_NewComplexShape(const DT_VertexBaseHandle vertexBase) -{ - if (!currentComplex) - { - currentBase = vertexBase ? (DT_VertexBase *)vertexBase : new DT_VertexBase; - currentComplex = new DT_Complex(currentBase); - } - return (DT_ShapeHandle)currentComplex; -} - -void DT_EndComplexShape() -{ - if (currentComplex) - { - if (currentBase->getPointer() == 0) - { - T_Vertex *vertexArray = new T_Vertex[vertexBuf.size()]; - assert(vertexArray); - std::copy(vertexBuf.begin(), vertexBuf.end(), &vertexArray[0]); - currentBase->setPointer(vertexArray, true); - } - - vertexBuf.clear(); - - currentComplex->finish(polyList.size(), &polyList[0]); - polyList.clear(); - currentComplex = 0; - currentBase = 0; - } -} - -DT_ShapeHandle DT_NewPolytope(const DT_VertexBaseHandle vertexBase) -{ - if (!currentPolyhedron) - { - currentBase = vertexBase ? (DT_VertexBase *)vertexBase : new DT_VertexBase; - currentPolyhedron = new DT_Polyhedron; - - } - return (DT_ShapeHandle)currentPolyhedron; -} - -void DT_EndPolytope() -{ - if (currentPolyhedron) - { - if (currentBase->getPointer() == 0) - { - currentBase->setPointer(&vertexBuf[0]); - new (currentPolyhedron) DT_Polyhedron(currentBase, indexBuf.size(), &indexBuf[0]); - - delete currentBase; - } - else - { - new (currentPolyhedron) DT_Polyhedron(currentBase, indexBuf.size(), &indexBuf[0]); - } - vertexBuf.clear(); - indexBuf.clear(); - currentPolyhedron = 0; - currentBase = 0; - } -} - -void DT_Begin() -{} - -void DT_End() -{ - if (currentComplex) - { - DT_VertexIndices(indexBuf.size(), &indexBuf[0]); - indexBuf.clear(); - } -} - -void DT_Vertex(const DT_Vector3 vertex) -{ - MT::Vector3<DT_Scalar> p(vertex); - int i = GEN_max((int)vertexBuf.size() - 20, 0); - int n = static_cast<int>(vertexBuf.size()); - - while (i != n && !(vertexBuf[i] == p)) - { - ++i; - } - - if (i == n) - { - vertexBuf.push_back(p); - } - indexBuf.push_back(i); -} - - -void DT_VertexIndex(DT_Index index) { indexBuf.push_back(index); } - -void DT_VertexIndices(DT_Count count, const DT_Index *indices) -{ - if (currentComplex) - { - DT_Convex *poly = count == 3 ? - static_cast<DT_Convex *>(new DT_Triangle(currentBase, indices[0], indices[1], indices[2])) : - static_cast<DT_Convex *>(new DT_Polytope(currentBase, count, indices)); - polyList.push_back(poly); - - } - - if (currentPolyhedron) - { - int i; - for (i = 0; i < count; ++i) - { - indexBuf.push_back(indices[i]); - } - } -} - -void DT_VertexRange(DT_Index first, DT_Count count) -{ - DT_Index *indices = new DT_Index[count]; - - DT_Index i; - for (i = 0; i != count; ++i) - { - indices[i] = first + i; - } - DT_VertexIndices(count, indices); - - delete [] indices; -} - -void DT_DeleteShape(DT_ShapeHandle shape) -{ - delete (DT_Shape *)shape; -} - - - - -// Scene - - -DT_SceneHandle DT_CreateScene() -{ - return (DT_SceneHandle)new DT_Scene; -} - -void DT_DestroyScene(DT_SceneHandle scene) -{ - delete (DT_Scene *)scene; -} - -void DT_AddObject(DT_SceneHandle scene, DT_ObjectHandle object) -{ - assert(scene); - assert(object); - ((DT_Scene *)scene)->addObject(*(DT_Object *)object); -} - -void DT_RemoveObject(DT_SceneHandle scene, DT_ObjectHandle object) -{ - assert(scene); - assert(object); - ((DT_Scene *)scene)->removeObject(*(DT_Object *)object); -} - - -// Object instantiation - - -DT_ObjectHandle DT_CreateObject(void *client_object, - DT_ShapeHandle shape) -{ - return (DT_ObjectHandle)new DT_Object(client_object, *(DT_Shape *)shape); -} - -void DT_DestroyObject(DT_ObjectHandle object) -{ - delete (DT_Object *)object; -} - -void DT_SetMargin(DT_ObjectHandle object, DT_Scalar margin) -{ - ((DT_Object *)object)->setMargin(MT_Scalar(margin)); -} - - -void DT_SetScaling(DT_ObjectHandle object, const DT_Vector3 scaling) -{ - ((DT_Object *)object)->setScaling(MT_Vector3(scaling)); -} - -void DT_SetPosition(DT_ObjectHandle object, const DT_Vector3 position) -{ - ((DT_Object *)object)->setPosition(MT_Point3(position)); -} - -void DT_SetOrientation(DT_ObjectHandle object, const DT_Quaternion orientation) -{ - ((DT_Object *)object)->setOrientation(MT_Quaternion(orientation)); -} - - -void DT_SetMatrixf(DT_ObjectHandle object, const float *m) -{ - ((DT_Object *)object)->setMatrix(m); -} - -void DT_GetMatrixf(DT_ObjectHandle object, float *m) -{ - ((DT_Object *)object)->getMatrix(m); -} - -void DT_SetMatrixd(DT_ObjectHandle object, const double *m) -{ - ((DT_Object *)object)->setMatrix(m); -} -void DT_GetMatrixd(DT_ObjectHandle object, double *m) -{ - ((DT_Object *)object)->getMatrix(m); -} - -void DT_GetBBox(DT_ObjectHandle object, DT_Vector3 min, DT_Vector3 max) -{ - const MT_BBox& bbox = ((DT_Object *)object)->getBBox(); - bbox.getMin().getValue(min); - bbox.getMax().getValue(max); -} - -DT_Bool DT_GetIntersect(DT_ObjectHandle object1, DT_ObjectHandle object2, DT_Vector3 vec) -{ - MT_Vector3 v; - DT_Bool result = intersect(*(DT_Object*)object1, *(DT_Object*)object2, v); - v.getValue(vec); - return result; -} - -DT_Scalar DT_GetClosestPair(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point1, DT_Vector3 point2) -{ - MT_Point3 p1, p2; - - MT_Scalar result = closest_points(*(DT_Object *)object1, - *(DT_Object *)object2, - p1, p2); - p1.getValue(point1); - p2.getValue(point2); - - return MT_sqrt(result); -} - -DT_Bool DT_GetCommonPoint(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point) -{ - MT_Point3 p1, p2; - MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - - bool result = common_point(*(DT_Object *)object1, *(DT_Object *)object2, v, p1, p2); - - if (result) - { - p1.getValue(point); - } - - return result; -} - -DT_Bool DT_GetPenDepth(DT_ObjectHandle object1, DT_ObjectHandle object2, - DT_Vector3 point1, DT_Vector3 point2) -{ - MT_Point3 p1, p2; - MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - - bool result = penetration_depth(*(DT_Object *)object1, *(DT_Object *)object2, v, p1, p2); - - if (result) - { - p1.getValue(point1); - p2.getValue(point2); - } - - return result; -} - -// Response - -DT_RespTableHandle DT_CreateRespTable() -{ - return (DT_RespTableHandle)new DT_RespTable; -} - -void DT_DestroyRespTable(DT_RespTableHandle respTable) -{ - delete (DT_RespTable *)respTable; -} - -DT_ResponseClass DT_GenResponseClass(DT_RespTableHandle respTable) -{ - return ((DT_RespTable *)respTable)->genResponseClass(); -} - -void DT_SetResponseClass(DT_RespTableHandle respTable, DT_ObjectHandle object, - DT_ResponseClass responseClass) -{ - ((DT_RespTable *)respTable)->setResponseClass(object, responseClass); -} - -void DT_ClearResponseClass(DT_RespTableHandle respTable, - DT_ObjectHandle object) -{ - ((DT_RespTable *)respTable)->clearResponseClass(object); -} - -void DT_CallResponse(DT_RespTableHandle respTable, - DT_ObjectHandle object1, - DT_ObjectHandle object2, - const DT_CollData *coll_data) -{ - const DT_ResponseList& responseList = - ((DT_RespTable *)respTable)->find(object1, object2); - - if (responseList.getType() != DT_NO_RESPONSE) - { - responseList(((DT_Object *)object1)->getClientObject(), - ((DT_Object *)object2)->getClientObject(), - coll_data); - } -} - - -void DT_AddDefaultResponse(DT_RespTableHandle respTable, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data) -{ - ((DT_RespTable *)respTable)->addDefault(DT_Response(response, type, client_data)); -} - -void DT_RemoveDefaultResponse(DT_RespTableHandle respTable, - DT_ResponseCallback response) -{ - ((DT_RespTable *)respTable)->removeDefault(DT_Response(response)); -} - -void DT_AddClassResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data) -{ - ((DT_RespTable *)respTable)->addSingle(responseClass, - DT_Response(response, type, client_data)); -} - -void DT_RemoveClassResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass, - DT_ResponseCallback response) -{ - ((DT_RespTable *)respTable)->removeSingle(responseClass, - DT_Response(response)); -} - -void DT_AddPairResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - DT_ResponseCallback response, - DT_ResponseType type, void *client_data) -{ - ((DT_RespTable *)respTable)->addPair(responseClass1, responseClass2, - DT_Response(response, type, client_data)); -} - -void DT_RemovePairResponse(DT_RespTableHandle respTable, - DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - DT_ResponseCallback response) -{ - ((DT_RespTable *)respTable)->removePair(responseClass1, responseClass2, - DT_Response(response)); -} - - -// Runtime - -void DT_SetAccuracy(DT_Scalar max_error) -{ - if (max_error > MT_Scalar(0.0)) - { - DT_Accuracy::setAccuracy(MT_Scalar(max_error)); - } -} - -void DT_SetTolerance(DT_Scalar tol_error) -{ - if (tol_error > MT_Scalar(0.0)) - { - DT_Accuracy::setTolerance(MT_Scalar(tol_error)); - } -} - -DT_Count DT_Test(DT_SceneHandle scene, DT_RespTableHandle respTable) -{ - return ((DT_Scene *)scene)->handleCollisions((DT_RespTable *)respTable); -} - -void *DT_RayCast(DT_SceneHandle scene, void *ignore_client, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar max_param, DT_Scalar *param, DT_Vector3 normal) -{ - DT_Scalar lambda = max_param; - - void *client_object = ((DT_Scene *)scene)->rayCast(ignore_client, source, target, - lambda, normal); - if (client_object) - { - *param = lambda; - } - return client_object; -} - -DT_Bool DT_ObjectRayCast(DT_ObjectHandle object, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar max_param, DT_Scalar *param, DT_Vector3 hit_normal) -{ - MT_Scalar lambda = MT_Scalar(max_param); - MT_Vector3 normal; - - bool result = ((DT_Object *)object)->ray_cast(MT_Point3(source), MT_Point3(target), - lambda, normal); - - if (result) - { - *param = lambda; - normal.getValue(hit_normal); - } - return result; -} - diff --git a/extern/solid/src/DT_Encounter.cpp b/extern/solid/src/DT_Encounter.cpp deleted file mode 100644 index 36de33154a3..00000000000 --- a/extern/solid/src/DT_Encounter.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_RespTable.h" -#include "DT_Encounter.h" -#include "DT_Object.h" -#include "GEN_MinMax.h" - -DT_Bool DT_Encounter::exactTest(const DT_RespTable *respTable, int& count) const -{ - const DT_ResponseList& responseList = respTable->find(m_obj_ptr1, m_obj_ptr2); - - switch (responseList.getType()) - { - case DT_BROAD_RESPONSE: - return (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) ? - responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), 0) : - responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), 0); - case DT_SIMPLE_RESPONSE: - if (intersect(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis)) - { - ++count; - return (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) ? - responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), 0) : - responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), 0); - - } - break; - case DT_WITNESSED_RESPONSE: { - MT_Point3 p1, p2; - - if (common_point(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis, p1, p2)) - { - ++count; - if (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) - { - DT_CollData coll_data; - - p1.getValue(coll_data.point1); - p2.getValue(coll_data.point2); - - return responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), &coll_data); - } - else - { - DT_CollData coll_data; - - p1.getValue(coll_data.point2); - p2.getValue(coll_data.point1); - - return responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), &coll_data); - } - } - break; - } - case DT_DEPTH_RESPONSE: { - MT_Point3 p1, p2; - - if (penetration_depth(*m_obj_ptr1, *m_obj_ptr2, m_sep_axis, p1, p2)) - { - ++count; - if (respTable->getResponseClass(m_obj_ptr1) < respTable->getResponseClass(m_obj_ptr2)) - { - DT_CollData coll_data; - - p1.getValue(coll_data.point1); - p2.getValue(coll_data.point2); - (p2 - p1).getValue(coll_data.normal); - - return responseList(m_obj_ptr1->getClientObject(), m_obj_ptr2->getClientObject(), &coll_data); - } - else - { - DT_CollData coll_data; - - p1.getValue(coll_data.point2); - p2.getValue(coll_data.point1); - (p1 - p2).getValue(coll_data.normal); - - return responseList(m_obj_ptr2->getClientObject(), m_obj_ptr1->getClientObject(), &coll_data); - } - } - break; - } - case DT_NO_RESPONSE: - break; - default: - assert(false); - } - return DT_CONTINUE; -} diff --git a/extern/solid/src/DT_Encounter.h b/extern/solid/src/DT_Encounter.h deleted file mode 100644 index f20ea3936b0..00000000000 --- a/extern/solid/src/DT_Encounter.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_ENCOUNTER_H -#define DT_ENCOUNTER_H - -#include <set> - -#include "MT_Vector3.h" -#include "DT_Object.h" -#include "DT_Shape.h" - -class DT_RespTable; - -class DT_Encounter { -public: - DT_Encounter() {} - DT_Encounter(DT_Object *obj_ptr1, DT_Object *obj_ptr2) - : m_sep_axis(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)) - { - assert(obj_ptr1 != obj_ptr2); - if (obj_ptr2->getType() < obj_ptr1->getType() || - (obj_ptr2->getType() == obj_ptr1->getType() && - obj_ptr2 < obj_ptr1)) - { - m_obj_ptr1 = obj_ptr2; - m_obj_ptr2 = obj_ptr1; - } - else - { - m_obj_ptr1 = obj_ptr1; - m_obj_ptr2 = obj_ptr2; - } - } - - DT_Object *first() const { return m_obj_ptr1; } - DT_Object *second() const { return m_obj_ptr2; } - const MT_Vector3& separatingAxis() const { return m_sep_axis; } - - DT_Bool exactTest(const DT_RespTable *respTable, int& count) const; - -private: - DT_Object *m_obj_ptr1; - DT_Object *m_obj_ptr2; - mutable MT_Vector3 m_sep_axis; -}; - -inline bool operator<(const DT_Encounter& a, const DT_Encounter& b) -{ - return a.first() < b.first() || - (a.first() == b.first() && a.second() < b.second()); -} - - - -inline std::ostream& operator<<(std::ostream& os, const DT_Encounter& a) { - return os << '(' << a.first() << ", " << a.second() << ')'; -} - - - -typedef std::set<DT_Encounter> DT_EncounterTable; - -#endif diff --git a/extern/solid/src/DT_Object.cpp b/extern/solid/src/DT_Object.cpp deleted file mode 100644 index ed43a7bdaf2..00000000000 --- a/extern/solid/src/DT_Object.cpp +++ /dev/null @@ -1,276 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Object.h" -#include "DT_AlgoTable.h" -#include "DT_Convex.h" -#include "DT_Complex.h" -#include "DT_LineSegment.h" -#include "DT_Transform.h" -#include "DT_Minkowski.h" -#include "DT_Sphere.h" - -void DT_Object::setBBox() -{ - m_bbox = m_shape.bbox(m_xform, m_margin); - DT_Vector3 min, max; - m_bbox.getMin().getValue(min); - m_bbox.getMax().getValue(max); - - T_ProxyList::const_iterator it; - for (it = m_proxies.begin(); it != m_proxies.end(); ++it) - { - BP_SetBBox(*it, min, max); - } -} - -bool DT_Object::ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& lambda, MT_Vector3& normal) const -{ - MT_Transform inv_xform = m_xform.inverse(); - MT_Point3 local_source = inv_xform(source); - MT_Point3 local_target = inv_xform(target); - MT_Vector3 local_normal; - - bool result = m_shape.ray_cast(local_source, local_target, lambda, local_normal); - - if (result) - { - normal = local_normal * inv_xform.getBasis(); - MT_Scalar len = normal.length(); - if (len > MT_Scalar(0.0)) - { - normal /= len; - } - } - - return result; -} - - -typedef AlgoTable<Intersect> IntersectTable; -typedef AlgoTable<Common_point> Common_pointTable; -typedef AlgoTable<Penetration_depth> Penetration_depthTable; -typedef AlgoTable<Closest_points> Closest_pointsTable; - - -bool intersectConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v) -{ - DT_Transform ta(a2w, (const DT_Convex&)a); - DT_Transform tb(b2w, (const DT_Convex&)b); - return intersect((a_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast<const DT_Convex&>(ta)), - (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v); -} - -bool intersectComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v) -{ - if (a.getType() == COMPLEX) - { - DT_Transform tb(b2w, (const DT_Convex&)b); - return intersect((const DT_Complex&)a, a2w, a_margin, - (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v); - } - - bool r = intersectComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v); - v *= -1.; - return r; -} - -bool intersectComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v) -{ - return intersect((const DT_Complex&)a, a2w, a_margin, - (const DT_Complex&)b, b2w, b_margin, v); -} - -IntersectTable *intersectInitialize() -{ - IntersectTable *p = new IntersectTable; - p->addEntry(COMPLEX, COMPLEX, intersectComplexComplex); - p->addEntry(COMPLEX, CONVEX, intersectComplexConvex); - p->addEntry(CONVEX, CONVEX, intersectConvexConvex); - return p; -} - -bool intersect(const DT_Object& a, const DT_Object& b, MT_Vector3& v) -{ - static IntersectTable *intersectTable = intersectInitialize(); - Intersect intersect = intersectTable->lookup(a.getType(), b.getType()); - return intersect(a.m_shape, a.m_xform, a.m_margin, - b.m_shape, b.m_xform, b.m_margin, v); -} - -bool common_pointConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta(a2w, (const DT_Convex&)a); - DT_Transform tb(b2w, (const DT_Convex&)b); - return common_point((a_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast<const DT_Convex&>(ta)), - (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v, pa, pb); -} - -bool common_pointComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - if (a.getType() == COMPLEX) - { - DT_Transform tb(b2w, (const DT_Convex&)b); - return common_point((const DT_Complex&)a, a2w, a_margin, - (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), v, pa, pb); - } - - bool r = common_pointComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v, pb, pa); - v *= -1.; - return r; -} - -bool common_pointComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - return common_point((const DT_Complex&)a, a2w, a_margin, - (const DT_Complex&)b, b2w, b_margin, v, pa, pb); -} - -Common_pointTable *common_pointInitialize() -{ - Common_pointTable *p = new Common_pointTable; - p->addEntry(COMPLEX, COMPLEX, common_pointComplexComplex); - p->addEntry(COMPLEX, CONVEX, common_pointComplexConvex); - p->addEntry(CONVEX, CONVEX, common_pointConvexConvex); - return p; -} - -bool common_point(const DT_Object& a, const DT_Object& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - static Common_pointTable *common_pointTable = common_pointInitialize(); - Common_point common_point = common_pointTable->lookup(a.getType(), b.getType()); - return common_point(a.m_shape, a.m_xform, a.m_margin, - b.m_shape, b.m_xform, b.m_margin, v, pa, pb); -} - - - -bool penetration_depthConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - return hybrid_penetration_depth(DT_Transform(a2w, (const DT_Convex&)a), a_margin, - DT_Transform(b2w, (const DT_Convex&)b), b_margin, v, pa, pb); -} - -bool penetration_depthComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - if (a.getType() == COMPLEX) - return penetration_depth((const DT_Complex&)a, a2w, a_margin, - DT_Transform(b2w, (const DT_Convex&)b), b_margin, v, pa, pb); - - bool r = penetration_depthComplexConvex(b, b2w, b_margin, a, a2w, a_margin, v, pb, pa); - v *= -1.; - return r; -} - -bool penetration_depthComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - return penetration_depth((const DT_Complex&)a, a2w, a_margin, (const DT_Complex&)b, b2w, b_margin, v, pa, pb); -} - -Penetration_depthTable *penetration_depthInitialize() -{ - Penetration_depthTable *p = new Penetration_depthTable; - p->addEntry(COMPLEX, COMPLEX, penetration_depthComplexComplex); - p->addEntry(COMPLEX, CONVEX, penetration_depthComplexConvex); - p->addEntry(CONVEX, CONVEX, penetration_depthConvexConvex); - return p; -} - -bool penetration_depth(const DT_Object& a, const DT_Object& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - static Penetration_depthTable *penetration_depthTable = penetration_depthInitialize(); - Penetration_depth penetration_depth = penetration_depthTable->lookup(a.getType(), b.getType()); - return penetration_depth(a.m_shape, a.m_xform, a.m_margin, - b.m_shape, b.m_xform, b.m_margin, v, pa, pb); -} - - -MT_Scalar closest_pointsConvexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta(a2w, (const DT_Convex&)a); - DT_Transform tb(b2w, (const DT_Convex&)b); - return closest_points((a_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : static_cast<const DT_Convex&>(ta)), - (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), MT_INFINITY, pa, pb); -} - -MT_Scalar closest_pointsComplexConvex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Point3& pa, MT_Point3& pb) -{ - if (a.getType() == COMPLEX) - { - DT_Transform tb(b2w, (const DT_Convex&)b); - return closest_points((const DT_Complex&)a, a2w, a_margin, - (b_margin > MT_Scalar(0.0) ? static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : static_cast<const DT_Convex&>(tb)), pa, pb); - } - - return closest_pointsComplexConvex(b, b2w, b_margin, a, a2w, a_margin, pb, pa); -} - -MT_Scalar closest_pointsComplexComplex(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Point3& pa, MT_Point3& pb) -{ - return closest_points((const DT_Complex&)a, a2w, a_margin, - (const DT_Complex&)b, b2w, b_margin, pa, pb); -} - -Closest_pointsTable *closest_pointsInitialize() -{ - Closest_pointsTable *p = new Closest_pointsTable; - p->addEntry(COMPLEX, COMPLEX, closest_pointsComplexComplex); - p->addEntry(COMPLEX, CONVEX, closest_pointsComplexConvex); - p->addEntry(CONVEX, CONVEX, closest_pointsConvexConvex); - return p; -} - -MT_Scalar closest_points(const DT_Object& a, const DT_Object& b, - MT_Point3& pa, MT_Point3& pb) -{ - static Closest_pointsTable *closest_pointsTable = closest_pointsInitialize(); - Closest_points closest_points = closest_pointsTable->lookup(a.getType(), b.getType()); - return closest_points(a.m_shape, a.m_xform, a.m_margin, - b.m_shape, b.m_xform, b.m_margin, pa, pb); -} - diff --git a/extern/solid/src/DT_Object.h b/extern/solid/src/DT_Object.h deleted file mode 100644 index 78beee2ab57..00000000000 --- a/extern/solid/src/DT_Object.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_OBJECT_H -#define DT_OBJECT_H - -#include <vector> - -#include "SOLID.h" -#include "SOLID_broad.h" - -#include "MT_Transform.h" -#include "MT_Quaternion.h" -#include "MT_BBox.h" -#include "DT_Shape.h" - -class DT_Convex; - -class DT_Object { -public: - DT_Object(void *client_object, const DT_Shape& shape) : - m_client_object(client_object), - m_shape(shape), - m_margin(MT_Scalar(0.0)) - { - m_xform.setIdentity(); - setBBox(); - } - - void setMargin(MT_Scalar margin) - { - m_margin = margin; - setBBox(); - } - - void setScaling(const MT_Vector3& scaling) - { - m_xform.scale(scaling); - setBBox(); - } - - void setPosition(const MT_Point3& pos) - { - m_xform.setOrigin(pos); - setBBox(); - } - - void setOrientation(const MT_Quaternion& orn) - { - m_xform.setRotation(orn); - setBBox(); - } - - void setMatrix(const float *m) - { - m_xform.setValue(m); - assert(m_xform.getBasis().determinant() != MT_Scalar(0.0)); - setBBox(); - } - - void setMatrix(const double *m) - { - m_xform.setValue(m); - assert(m_xform.getBasis().determinant() != MT_Scalar(0.0)); - setBBox(); - } - - void getMatrix(float *m) const - { - m_xform.getValue(m); - } - - void getMatrix(double *m) const - { - m_xform.getValue(m); - } - - void setBBox(); - - const MT_BBox& getBBox() const { return m_bbox; } - - DT_ResponseClass getResponseClass() const { return m_responseClass; } - - void setResponseClass(DT_ResponseClass responseClass) - { - m_responseClass = responseClass; - } - - DT_ShapeType getType() const { return m_shape.getType(); } - - void *getClientObject() const { return m_client_object; } - - bool ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& param, MT_Vector3& normal) const; - - void addProxy(BP_ProxyHandle proxy) { m_proxies.push_back(proxy); } - - void removeProxy(BP_ProxyHandle proxy) - { - T_ProxyList::iterator it = std::find(m_proxies.begin(), m_proxies.end(), proxy); - if (it != m_proxies.end()) { - m_proxies.erase(it); - } - } - - - friend bool intersect(const DT_Object&, const DT_Object&, MT_Vector3& v); - - friend bool common_point(const DT_Object&, const DT_Object&, MT_Vector3&, - MT_Point3&, MT_Point3&); - - friend bool penetration_depth(const DT_Object&, const DT_Object&, - MT_Vector3&, MT_Point3&, MT_Point3&); - - friend MT_Scalar closest_points(const DT_Object&, const DT_Object&, - MT_Point3&, MT_Point3&); - -private: - typedef std::vector<BP_ProxyHandle> T_ProxyList; - - void *m_client_object; - DT_ResponseClass m_responseClass; - const DT_Shape& m_shape; - MT_Scalar m_margin; - MT_Transform m_xform; - T_ProxyList m_proxies; - MT_BBox m_bbox; -}; - -#endif - - - - - - - diff --git a/extern/solid/src/DT_RespTable.cpp b/extern/solid/src/DT_RespTable.cpp deleted file mode 100644 index 20fbfc06aac..00000000000 --- a/extern/solid/src/DT_RespTable.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_RespTable.h" - -#include <assert.h> - -DT_ResponseList DT_RespTable::g_emptyResponseList; - -DT_RespTable::~DT_RespTable() -{ - DT_ResponseClass i; - for (i = 0; i < m_responseClass; ++i) - { - delete [] m_table[i]; - } -} - -DT_ResponseClass DT_RespTable::genResponseClass() -{ - DT_ResponseClass newClass = m_responseClass++; - DT_ResponseList *newList = new DT_ResponseList[m_responseClass]; - assert(newList); - m_table.push_back(newList); - m_singleList.resize(m_responseClass); - DT_ResponseClass i; - for (i = 0; i < m_responseClass; ++i) - { - newList[i].append(m_default); - newList[i].append(m_singleList[i]); - } - return newClass; -} - -void DT_RespTable::setResponseClass(void *object, - DT_ResponseClass responseClass) -{ - assert(responseClass < m_responseClass); - m_objectMap[object] = responseClass; -} - -DT_ResponseClass DT_RespTable::getResponseClass(void *object) const -{ - T_ObjectMap::const_iterator it = m_objectMap.find(object); - assert(it != m_objectMap.end()); - return (*it).second; -} - -void DT_RespTable::clearResponseClass(void *object) -{ - m_objectMap.erase(object); -} - -const DT_ResponseList& DT_RespTable::find(void *object1, void *object2) const -{ - T_ObjectMap::const_iterator it = m_objectMap.find(object1); - if (it != m_objectMap.end()) - { - DT_ResponseClass responseClass1 = (*it).second; - it = m_objectMap.find(object2); - if (it != m_objectMap.end()) - { - DT_ResponseClass responseClass2 = (*it).second; - if (responseClass1 < responseClass2) - { - std::swap(responseClass1, responseClass2); - } - return m_table[responseClass1][responseClass2]; - } - } - return g_emptyResponseList; -} - -void DT_RespTable::addDefault(const DT_Response& response) -{ - m_default.addResponse(response); - DT_ResponseClass i; - for (i = 0; i < m_responseClass; ++i) - { - DT_ResponseClass j; - for (j = 0; j <= i; ++j) - { - m_table[i][j].addResponse(response); - } - } -} - -void DT_RespTable::removeDefault(const DT_Response& response) -{ - m_default.removeResponse(response); - DT_ResponseClass i; - for (i = 0; i < m_responseClass; ++i) - { - DT_ResponseClass j; - for (j = 0; j <= i; ++j) - { - m_table[i][j].removeResponse(response); - } - } -} - -void DT_RespTable::addSingle(DT_ResponseClass responseClass, - const DT_Response& response) -{ - assert(responseClass < m_responseClass); - m_singleList[responseClass].addResponse(response); - DT_ResponseClass j; - for (j = 0; j < responseClass; ++j) - { - m_table[responseClass][j].addResponse(response); - } - - DT_ResponseClass i; - for (i = responseClass; i < m_responseClass; ++i) - { - m_table[i][responseClass].addResponse(response); - } -} - -void DT_RespTable::removeSingle(DT_ResponseClass responseClass, - const DT_Response& response) -{ - assert(responseClass < m_responseClass); - m_singleList[responseClass].removeResponse(response); - DT_ResponseClass j; - for (j = 0; j < responseClass; ++j) - { - m_table[responseClass][j].removeResponse(response); - } - - DT_ResponseClass i; - for (i = responseClass; i < m_responseClass; ++i) - { - m_table[i][responseClass].removeResponse(response); - } -} - -void DT_RespTable::addPair(DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - const DT_Response& response) -{ - assert(responseClass1 < m_responseClass); - assert(responseClass2 < m_responseClass); - if (responseClass1 < responseClass2) - { - std::swap(responseClass1, responseClass2); - } - m_table[responseClass1][responseClass2].addResponse(response); -} - - -void DT_RespTable::removePair(DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - const DT_Response& response) -{ - assert(responseClass1 < m_responseClass); - assert(responseClass2 < m_responseClass); - if (responseClass1 < responseClass2) - { - std::swap(responseClass1, responseClass2); - } - m_table[responseClass1][responseClass2].removeResponse(response); -} - diff --git a/extern/solid/src/DT_RespTable.h b/extern/solid/src/DT_RespTable.h deleted file mode 100644 index 9a17f562937..00000000000 --- a/extern/solid/src/DT_RespTable.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_RESPTABLE_H -#define DT_RESPTABLE_H - -#include <algorithm> -#include <vector> -#include <list> -#include <map> -#include "GEN_MinMax.h" -#include "DT_Response.h" - -class DT_ResponseList : public std::list<DT_Response> { -public: - DT_ResponseList() : m_type(DT_NO_RESPONSE) {} - - DT_ResponseType getType() const { return m_type; } - - void addResponse(const DT_Response& response) - { - if (response.getType() != DT_NO_RESPONSE) - { - push_back(response); - GEN_set_max(m_type, response.getType()); - } - } - - void removeResponse(const DT_Response& response) - { - iterator it = std::find(begin(), end(), response); - if (it != end()) - { - erase(it); - m_type = DT_NO_RESPONSE; - for (it = begin(); it != end(); ++it) - { - GEN_set_max(m_type, (*it).getType()); - } - } - } - - void append(const DT_ResponseList& responseList) - { - if (responseList.getType() != DT_NO_RESPONSE) - { - const_iterator it; - for (it = responseList.begin(); it != responseList.end(); ++it) - { - addResponse(*it); - } - } - } - - DT_Bool operator()(void *a, void *b, const DT_CollData *coll_data) const - { - DT_Bool done = DT_CONTINUE; - const_iterator it; - for (it = begin(); !done && it != end(); ++it) - { - done = (*it)(a, b, coll_data); - } - return done; - } - -private: - DT_ResponseType m_type; -}; - -class DT_RespTable { -private: - typedef std::map<void *, DT_ResponseClass> T_ObjectMap; - typedef std::vector<DT_ResponseList *> T_PairTable; - typedef std::vector<DT_ResponseList> T_SingleList; - -public: - DT_RespTable() : m_responseClass(0) {} - - ~DT_RespTable(); - - DT_ResponseClass genResponseClass(); - - void setResponseClass(void *object, DT_ResponseClass responseClass); - DT_ResponseClass getResponseClass(void *object) const; - - void clearResponseClass(void *object); - - const DT_ResponseList& find(void *object1, void *object2) const; - - void addDefault(const DT_Response& response); - void removeDefault(const DT_Response& response); - - void addSingle(DT_ResponseClass responseClass, - const DT_Response& response); - void removeSingle(DT_ResponseClass responseClass, - const DT_Response& response); - - void addPair(DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - const DT_Response& response); - void removePair(DT_ResponseClass responseClass1, - DT_ResponseClass responseClass2, - const DT_Response& response); - -private: - static DT_ResponseList g_emptyResponseList; - - T_ObjectMap m_objectMap; - DT_ResponseClass m_responseClass; - T_PairTable m_table; - T_SingleList m_singleList; - DT_ResponseList m_default; -}; - -#endif - - - - diff --git a/extern/solid/src/DT_Response.h b/extern/solid/src/DT_Response.h deleted file mode 100644 index e58d9bb9944..00000000000 --- a/extern/solid/src/DT_Response.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_RESPONSE_H -#define DT_RESPONSE_H - -#include "SOLID.h" - -class DT_Response { -public: - DT_Response(DT_ResponseCallback response = 0, - DT_ResponseType type = DT_NO_RESPONSE, - void *client_data = 0) - : m_response(response), - m_type(type), - m_client_data(client_data) {} - - DT_ResponseType getType() const { return m_type; } - - DT_Bool operator()(void *a, void *b, const DT_CollData *coll_data) const - { - return (*m_response)(m_client_data, a, b, coll_data); - } - - friend bool operator==(const DT_Response& a, const DT_Response& b) - { - return a.m_response == b.m_response; - } - - friend bool operator!=(const DT_Response& a, const DT_Response& b) - { - return a.m_response != b.m_response; - } - -private: - DT_ResponseCallback m_response; - DT_ResponseType m_type; - void *m_client_data; -}; - -#endif - - diff --git a/extern/solid/src/DT_Scene.cpp b/extern/solid/src/DT_Scene.cpp deleted file mode 100644 index 56cea1633ca..00000000000 --- a/extern/solid/src/DT_Scene.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Scene.h" -#include "DT_Object.h" -#include "DT_Convex.h" - -//#define DEBUG - -static void beginOverlap(void *client_data, void *object1, void *object2) -{ - DT_Encounter e((DT_Object *)object1, (DT_Object *)object2); - DT_EncounterTable *encounterTable = static_cast<DT_EncounterTable *>(client_data); - -#ifdef DEBUG - std::cout << "Begin: " << e << std::endl; -#endif - - encounterTable->insert(e); -} - - -static void endOverlap(void *client_data, void *object1, void *object2) -{ - DT_Encounter e((DT_Object *)object1, (DT_Object *)object2); - DT_EncounterTable *encounterTable = static_cast<DT_EncounterTable *>(client_data); - -#ifdef DEBUG - std::cout << "End: " << e << std::endl; -#endif - - assert(encounterTable->find(e) != encounterTable->end()); - encounterTable->erase(e); -} - -struct DT_RayCastData { - DT_RayCastData(const void *ignore) - : m_ignore(ignore) - {} - - const void *m_ignore; - MT_Vector3 m_normal; -}; - -static bool objectRayCast(void *client_data, - void *object, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar *lambda) -{ - DT_RayCastData *data = static_cast<DT_RayCastData *>(client_data); - if (((DT_Object *)object)->getClientObject() != data->m_ignore) - { - MT_Scalar param = MT_Scalar(*lambda); - - if (((DT_Object *)object)->ray_cast(MT_Point3(source), MT_Point3(target), - param, data->m_normal)) - { - *lambda = param; - return true; - } - } - return false; -} - -DT_Scene::DT_Scene() - : m_broadphase(BP_CreateScene(&m_encounterTable, &beginOverlap, &endOverlap)) -{} - -DT_Scene::~DT_Scene() -{ - BP_DestroyScene(m_broadphase); -} - -void DT_Scene::addObject(DT_Object &object) -{ - const MT_BBox& bbox = object.getBBox(); - DT_Vector3 min, max; - bbox.getMin().getValue(min); - bbox.getMax().getValue(max); - BP_ProxyHandle proxy = BP_CreateProxy(m_broadphase, &object, min, max); - -#ifdef DEBUG - DT_EncounterTable::iterator it; - std::cout << "Add " << &object << ':'; - for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it) { - std::cout << ' ' << (*it); - } - std::cout << std::endl; -#endif - object.addProxy(proxy); - m_objectList.push_back(std::make_pair(&object, proxy)); -} - - - -void DT_Scene::removeObject(DT_Object& object) -{ - T_ObjectList::iterator it = m_objectList.begin(); - - while (it != m_objectList.end() && &object != (*it).first) - { - ++it; - } - - if (it != m_objectList.end()) - { - object.removeProxy((*it).second); - BP_DestroyProxy(m_broadphase, (*it).second); - m_objectList.erase(it); - -#ifdef DEBUG - std::cout << "Remove " << &object << ':'; - DT_EncounterTable::iterator it; - for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it) - { - std::cout << ' ' << (*it); - assert((*it).first() != &object && - (*it).second() != &object); - } - std::cout << std::endl; -#endif - } -} - - - -int DT_Scene::handleCollisions(const DT_RespTable *respTable) -{ - int count = 0; - - assert(respTable); - - DT_EncounterTable::iterator it; - for (it = m_encounterTable.begin(); it != m_encounterTable.end(); ++it) - { - if ((*it).exactTest(respTable, count)) - { - break; - } - - } - return count; -} - -void *DT_Scene::rayCast(const void *ignore_client, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar& lambda, DT_Vector3 normal) const -{ - DT_RayCastData data(ignore_client); - DT_Object *object = (DT_Object *)BP_RayCast(m_broadphase, - &objectRayCast, - &data, - source, target, - &lambda); - if (object) - { - data.m_normal.getValue(normal); - return object->getClientObject(); - } - - return 0; -} diff --git a/extern/solid/src/DT_Scene.h b/extern/solid/src/DT_Scene.h deleted file mode 100644 index 9b061910312..00000000000 --- a/extern/solid/src/DT_Scene.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_SCENE_H -#define DT_SCENE_H - -#include <vector> - -#include "SOLID_broad.h" -#include "DT_Encounter.h" - -class DT_Object; -class DT_RespTable; - -class DT_Scene { -public: - DT_Scene(); - ~DT_Scene(); - - void addObject(DT_Object& object); - void removeObject(DT_Object& object); - - int handleCollisions(const DT_RespTable *respTable); - - void *rayCast(const void *ignore_client, - const DT_Vector3 source, const DT_Vector3 target, - DT_Scalar& lambda, DT_Vector3 normal) const; - -private: - typedef std::vector<std::pair<DT_Object *, BP_ProxyHandle> > T_ObjectList; - - BP_SceneHandle m_broadphase; - T_ObjectList m_objectList; - DT_EncounterTable m_encounterTable; -}; - -#endif diff --git a/extern/solid/src/Makefile b/extern/solid/src/Makefile deleted file mode 100644 index e8ef7a606c9..00000000000 --- a/extern/solid/src/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program 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 2 -# of the License, or (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -SOURCEDIR = extern/solid/src -LIBNAME = solid -DIR = $(OCGDIR)/extern/$(LIBNAME) -DIRS = broad complex convex - -include nan_subdirs.mk - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I../include -I$(NAN_QHULL)/include -CPPFLAGS += -Iconvex -Icomplex -CPPFLAGS += -DQHULL -DUSE_DOUBLES - -include nan_compile.mk - diff --git a/extern/solid/src/broad/BP_C-api.cpp b/extern/solid/src/broad/BP_C-api.cpp deleted file mode 100644 index 43e1172927b..00000000000 --- a/extern/solid/src/broad/BP_C-api.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "SOLID_broad.h" - -#include "BP_Scene.h" -#include "BP_Proxy.h" - -BP_SceneHandle BP_CreateScene(void *client_data, - BP_Callback beginOverlap, - BP_Callback endOverlap) -{ - return (BP_SceneHandle)new BP_Scene(client_data, - beginOverlap, - endOverlap); -} - - -void BP_DestroyScene(BP_SceneHandle scene) -{ - delete (BP_Scene *)scene; -} - - -BP_ProxyHandle BP_CreateProxy(BP_SceneHandle scene, void *object, - const DT_Vector3 min, const DT_Vector3 max) -{ - return (BP_ProxyHandle) - ((BP_Scene *)scene)->createProxy(object, min, max); -} - - -void BP_DestroyProxy(BP_SceneHandle scene, BP_ProxyHandle proxy) -{ - ((BP_Scene *)scene)->destroyProxy((BP_Proxy *)proxy); -} - - - -void BP_SetBBox(BP_ProxyHandle proxy, const DT_Vector3 min, const DT_Vector3 max) -{ - ((BP_Proxy *)proxy)->setBBox(min, max); -} - -void *BP_RayCast(BP_SceneHandle scene, - BP_RayCastCallback objectRayCast, - void *client_data, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar *lambda) -{ - return ((BP_Scene *)scene)->rayCast(objectRayCast, - client_data, - source, target, - *lambda); -} - diff --git a/extern/solid/src/broad/BP_Endpoint.h b/extern/solid/src/broad/BP_Endpoint.h deleted file mode 100644 index 8de6e67ce65..00000000000 --- a/extern/solid/src/broad/BP_Endpoint.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef BP_ENDPOINT_H -#define BP_ENDPOINT_H - -#include "SOLID_types.h" - -class BP_Proxy; - -class BP_Link { -public: - BP_Link() {} - explicit BP_Link(BP_Proxy *proxy) : - m_proxy(proxy) - {} - - DT_Index m_index; - DT_Count m_count; - BP_Proxy *m_proxy; -}; - -typedef unsigned int Uint32; - -class BP_Endpoint { -public: - enum { - MINIMUM = 0x00000000, - MAXIMUM = 0x80000000, - TYPEBIT = 0x00000001 - }; - - BP_Endpoint() {} - BP_Endpoint(DT_Scalar pos, Uint32 type, BP_Link *link) - : m_link(link) - { - setPos(pos, type); - } - - DT_Scalar getPos() const { return m_pos; } - DT_Index& getIndex() const { return m_link->m_index; } - DT_Count& getCount() const { return m_link->m_count; } - BP_Proxy *getProxy() const { return m_link->m_proxy; } - - DT_Index getEndIndex() const { return (m_link + 1)->m_index; } - - Uint32 getType() const - { - return (m_bits & TYPEBIT) ? (~m_bits & MAXIMUM) : (m_bits & MAXIMUM); - } - - void setPos(DT_Scalar pos, Uint32 type) - { - m_pos = pos; - if ((m_bits & MAXIMUM) == type) - { - m_bits &= ~TYPEBIT; - } - else - { - m_bits |= TYPEBIT; - } - } - -private: - union { - DT_Scalar m_pos; - Uint32 m_bits; - }; - BP_Link *m_link; -}; - -inline bool operator<(const BP_Endpoint& a, const BP_Endpoint& b) -{ - return a.getPos() < b.getPos(); -} - -#endif - - - - - - - - - - diff --git a/extern/solid/src/broad/BP_EndpointList.cpp b/extern/solid/src/broad/BP_EndpointList.cpp deleted file mode 100644 index aa094ffeb0a..00000000000 --- a/extern/solid/src/broad/BP_EndpointList.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include <float.h> -#include <algorithm> - -#include "BP_EndpointList.h" -#include "BP_Scene.h" -#include "BP_Proxy.h" -#include "BP_ProxyList.h" - -DT_Index BP_EndpointList::stab(const BP_Endpoint& pos, BP_ProxyList& proxies) const -{ - DT_Index result = std::upper_bound(begin(), end(), pos) - begin(); - - if (result != 0) - { - DT_Index i = result - 1; - DT_Count count = (*this)[i].getCount(); - while (count) - { - const BP_Endpoint& endpoint = (*this)[i]; - if (endpoint.getType() == BP_Endpoint::MINIMUM && - pos < (*this)[endpoint.getEndIndex()]) - { - proxies.add(endpoint.getProxy()); - --count; - } - assert(i != 0 || count == 0); - --i; - } - } - return result; -} - -DT_Scalar BP_EndpointList::nextLambda(DT_Index& index, - DT_Scalar source, - DT_Scalar delta) const -{ - if (delta != 0.0f) - { - if (delta < 0.0f) - { - if (index != 0) - { - return ((*this)[--index].getPos() - source) / delta; - } - } - else - { - if (index != size()) - { - return ((*this)[index++].getPos() - source) / delta; - } - } - } - return FLT_MAX; -} - - -void BP_EndpointList::range(const BP_Endpoint& min, - const BP_Endpoint& max, - DT_Index& first, DT_Index& last, - BP_ProxyList& proxies) const -{ - first = stab(min, proxies); - last = std::upper_bound(begin(), end(), max) - begin(); - - DT_Index i; - for (i = first; i != last; ++i) - { - const BP_Endpoint& endpoint = (*this)[i]; - if (endpoint.getType() == BP_Endpoint::MINIMUM) - { - proxies.add(endpoint.getProxy()); - } - } -} - -void BP_EndpointList::addInterval(const BP_Endpoint& min, - const BP_Endpoint& max, - BP_ProxyList& proxies) -{ - assert(invariant()); - DT_Index first, last; - range(min, max, first, last, proxies); - insert(begin() + last, max); - insert(begin() + first, min); - ++last; - - (*this)[first].getCount() = first != 0 ? (*this)[first - 1].getCount() : 0; - (*this)[last].getCount() = (*this)[last - 1].getCount(); - - - DT_Index i; - for (i = first; i != last; ++i) - { - ++(*this)[i].getCount(); - (*this)[i].getIndex() = i; - } - for (; i != size(); ++i) - { - (*this)[i].getIndex() = i; - } - - assert(invariant()); -} - -void BP_EndpointList::removeInterval(DT_Index first, DT_Index last, - BP_ProxyList& proxies) -{ - assert(invariant()); - - BP_Endpoint min = (*this)[first]; - BP_Endpoint max = (*this)[last]; - - erase(begin() + last); - erase(begin() + first); - --last; - - DT_Index i; - for (i = first; i != last; ++i) - { - --(*this)[i].getCount(); - (*this)[i].getIndex() = i; - } - for (; i != size(); ++i) - { - (*this)[i].getIndex() = i; - } - - range(min, max, first, last, proxies); - - assert(invariant()); -} - -void BP_EndpointList::move(DT_Index index, DT_Scalar pos, Uint32 type, - BP_Scene& scene, T_Overlap overlap) -{ - assert(invariant()); - - BP_Endpoint endpoint = (*this)[index]; - DT_Scalar delta = pos - endpoint.getPos(); - - if (delta != DT_Scalar(0.0)) - { - endpoint.setPos(pos, type); - if (delta < DT_Scalar(0.0)) - { - while (index != 0 && endpoint < (*this)[index - 1]) - { - (*this)[index] = (*this)[index - 1]; - (*this)[index].getIndex() = index; - encounters((*this)[index], endpoint, scene, overlap); - --index; - } - } - else - { - DT_Index last = size() - 1; - while (index != last && (*this)[index + 1] < endpoint) - { - (*this)[index] = (*this)[index + 1]; - (*this)[index].getIndex() = index; - encounters(endpoint, (*this)[index], scene, overlap); - ++index; - } - } - (*this)[index] = endpoint; - (*this)[index].getIndex() = index; - } - - assert(invariant()); -} - -void BP_EndpointList::encounters(const BP_Endpoint& a, const BP_Endpoint& b, - BP_Scene& scene, T_Overlap overlap) -{ - assert(a.getProxy() != b.getProxy()); - - if (a.getType() != b.getType()) - { - if (a.getType() == BP_Endpoint::MAXIMUM) - { - if (overlap(*a.getProxy(), *b.getProxy())) - { - scene.callBeginOverlap(a.getProxy()->getObject(), - b.getProxy()->getObject()); - } - ++a.getCount(); - ++b.getCount(); - } - else - { - if (overlap(*a.getProxy(), *b.getProxy())) - { - scene.callEndOverlap(a.getProxy()->getObject(), - b.getProxy()->getObject()); - } - --a.getCount(); - --b.getCount(); - } - } - else - { - if (a.getType() == BP_Endpoint::MAXIMUM) - { - --a.getCount(); - ++b.getCount(); - } - else - { - ++a.getCount(); - --b.getCount(); - } - } -} diff --git a/extern/solid/src/broad/BP_EndpointList.h b/extern/solid/src/broad/BP_EndpointList.h deleted file mode 100644 index 6154991ed3d..00000000000 --- a/extern/solid/src/broad/BP_EndpointList.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef BP_ENDPOINTLIST_H -#define BP_ENDPOINTLIST_H - -//#define PARANOID - -#include <vector> - -#include "BP_Endpoint.h" -#include "BP_ProxyList.h" - -class BP_Scene; - -typedef bool (*T_Overlap)(const BP_Proxy& a, const BP_Proxy& b); - -class BP_EndpointList : public std::vector<BP_Endpoint> { -public: - BP_EndpointList() {} - - DT_Index stab(const BP_Endpoint& pos, BP_ProxyList& proxies) const; - - DT_Index stab(DT_Scalar pos, BP_ProxyList& proxies) const - { - return stab(BP_Endpoint(pos, BP_Endpoint::MINIMUM, 0), proxies); - } - - - void range(const BP_Endpoint& min, const BP_Endpoint& max, - DT_Index& first, DT_Index& last, BP_ProxyList& proxies) const; - - void range(DT_Scalar lb, DT_Scalar ub, DT_Index& first, DT_Index& last, BP_ProxyList& proxies) const - { - range(BP_Endpoint(lb, BP_Endpoint::MINIMUM, 0), - BP_Endpoint(ub, BP_Endpoint::MAXIMUM, 0), - first, last, proxies); - } - - void addInterval(const BP_Endpoint& min, const BP_Endpoint& max, BP_ProxyList& proxies); - void removeInterval(DT_Index first, DT_Index last, BP_ProxyList& proxies); - - void move(DT_Index index, DT_Scalar pos, Uint32 type, BP_Scene& scene, T_Overlap overlap); - - DT_Scalar nextLambda(DT_Index& index, DT_Scalar source, DT_Scalar target) const; - - -private: - void encounters(const BP_Endpoint& a, const BP_Endpoint& b, - BP_Scene& scene, T_Overlap overlap); - - -#ifdef PARANOID - bool invariant() const - { - DT_Count count = 0; - DT_Index i; - for (i = 0; i != size(); ++i) - { - const BP_Endpoint& endpoint = (*this)[i]; - - if (endpoint.getType() == BP_Endpoint::MINIMUM) - { - ++count; - } - else - { - --count; - } - if (endpoint.getCount() != count) - { - return false; - } - if (endpoint.getIndex() != i) - { - return false; - } - } - return true; - } -#else - bool invariant() const { return true; } -#endif - -}; - - - -#endif diff --git a/extern/solid/src/broad/BP_Proxy.cpp b/extern/solid/src/broad/BP_Proxy.cpp deleted file mode 100644 index e8007df240d..00000000000 --- a/extern/solid/src/broad/BP_Proxy.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include <new> - -#include "BP_Proxy.h" -#include "BP_Scene.h" - -BP_Proxy::BP_Proxy(void *object, - BP_Scene& scene) - : m_object(object), - m_scene(scene) -{ - int i; - for (i = 0; i < 3; ++i) - { - new (&m_interval[i]) BP_Interval(this); - } -} - -void BP_Proxy::add(const DT_Vector3 min, - const DT_Vector3 max, - BP_ProxyList& proxies) -{ - int i; - for (i = 0; i < 3; ++i) - { - m_scene.getList(i).addInterval( - BP_Endpoint(min[i], BP_Endpoint::MINIMUM, &m_interval[i].m_min), - BP_Endpoint(max[i], BP_Endpoint::MAXIMUM, &m_interval[i].m_max), - proxies); - } -} - -void BP_Proxy::remove(BP_ProxyList& proxies) -{ - int i; - for (i = 0; i < 3; ++i) - { - m_scene.getList(i).removeInterval( - m_interval[i].m_min.m_index, - m_interval[i].m_max.m_index, - proxies); - } -} - -DT_Scalar BP_Proxy::getMin(int i) const -{ - return m_scene.getList(i)[m_interval[i].m_min.m_index].getPos(); -} - -DT_Scalar BP_Proxy::getMax(int i) const -{ - return m_scene.getList(i)[m_interval[i].m_max.m_index].getPos(); -} - -bool overlapXY(const BP_Proxy& a, const BP_Proxy& b) -{ - return a.getMin(0) <= b.getMax(0) && b.getMin(0) <= a.getMax(0) && - a.getMin(1) <= b.getMax(1) && b.getMin(1) <= a.getMax(1); -} - -bool overlapXZ(const BP_Proxy& a, const BP_Proxy& b) -{ - return a.getMin(0) <= b.getMax(0) && b.getMin(0) <= a.getMax(0) && - a.getMin(2) <= b.getMax(2) && b.getMin(2) <= a.getMax(2); -} - -bool overlapYZ(const BP_Proxy& a, const BP_Proxy& b) -{ - return a.getMin(1) <= b.getMax(1) && b.getMin(1) <= a.getMax(1) && - a.getMin(2) <= b.getMax(2) && b.getMin(2) <= a.getMax(2); -} - -void BP_Proxy::setBBox(const DT_Vector3 min, const DT_Vector3 max) -{ - static T_Overlap overlap[3] = { overlapYZ, overlapXZ, overlapXY }; - - int i; - for (i = 0; i < 3; ++i) - { - if (min[i] > getMax(i)) - { - m_scene.getList(i).move(m_interval[i].m_max.m_index, max[i], - BP_Endpoint::MAXIMUM, m_scene, overlap[i]); - m_scene.getList(i).move(m_interval[i].m_min.m_index, min[i], - BP_Endpoint::MINIMUM, m_scene, overlap[i]); - } - else - { - m_scene.getList(i).move(m_interval[i].m_min.m_index, min[i], - BP_Endpoint::MINIMUM, m_scene, overlap[i]); - m_scene.getList(i).move(m_interval[i].m_max.m_index, max[i], - BP_Endpoint::MAXIMUM, m_scene, overlap[i]); - } - } -} - - - diff --git a/extern/solid/src/broad/BP_Proxy.h b/extern/solid/src/broad/BP_Proxy.h deleted file mode 100644 index b4500ddca44..00000000000 --- a/extern/solid/src/broad/BP_Proxy.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef BP_PROXY_H -#define BP_PROXY_H - -#include "BP_Endpoint.h" -#include "BP_ProxyList.h" - -class BP_Interval { -public: - BP_Interval() {} - BP_Interval(BP_Proxy *proxy) : - m_min(proxy), - m_max(proxy) - {} - - BP_Link m_min; - BP_Link m_max; -}; - -class BP_Scene; - -class BP_Proxy { -public: - BP_Proxy(void *object, BP_Scene& scene); - - void add(const DT_Vector3 min, - const DT_Vector3 max, - BP_ProxyList& proxies); - - void remove(BP_ProxyList& proxies); - - void setBBox(const DT_Vector3 min, const DT_Vector3 max); - - void *getObject() { return m_object; } - - DT_Scalar getMin(int i) const; - DT_Scalar getMax(int i) const; - -private: - BP_Interval m_interval[3]; - void *m_object; - BP_Scene& m_scene; -}; - -inline bool BP_overlap(const BP_Proxy *a, const BP_Proxy *b) -{ - return a->getMin(0) <= b->getMax(0) && b->getMin(0) <= a->getMax(0) && - a->getMin(1) <= b->getMax(1) && b->getMin(1) <= a->getMax(1) && - a->getMin(2) <= b->getMax(2) && b->getMin(2) <= a->getMax(2); -} - -#endif - - - - diff --git a/extern/solid/src/broad/BP_ProxyList.h b/extern/solid/src/broad/BP_ProxyList.h deleted file mode 100644 index 2f449777d2d..00000000000 --- a/extern/solid/src/broad/BP_ProxyList.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef BP_PROXYLIST_H -#define BP_PROXYLIST_H - -#include <assert.h> - -#include <vector> -#include <algorithm> -#include <utility> - -class BP_Proxy; - -typedef std::pair<BP_Proxy *, unsigned int> BP_ProxyEntry; - -inline bool operator<(const BP_ProxyEntry& a, const BP_ProxyEntry& b) -{ - return a.first < b.first; -} - -class BP_ProxyList : public std::vector<BP_ProxyEntry> { -public: - BP_ProxyList(size_t n = 20) : std::vector<BP_ProxyEntry>(n) {} - - iterator add(BP_Proxy *proxy) - { - BP_ProxyEntry entry = std::make_pair(proxy, (unsigned int)0); - iterator it = std::lower_bound(begin(), end(), entry); - if (it == end() || (*it).first != proxy) - { - it = insert(it, entry); - } - ++(*it).second; - return it; - } - - void remove(BP_Proxy *proxy) - { - BP_ProxyEntry entry = std::make_pair(proxy, (unsigned int)0); - iterator it = std::lower_bound(begin(), end(), entry); - if (it != end() && (*it).first == proxy && --(*it).second == 0) - { - erase(it); - } - } -}; - -#endif diff --git a/extern/solid/src/broad/BP_Scene.cpp b/extern/solid/src/broad/BP_Scene.cpp deleted file mode 100644 index c0cd83ba311..00000000000 --- a/extern/solid/src/broad/BP_Scene.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "BP_Scene.h" -#include "BP_Proxy.h" - -#include <algorithm> - -BP_Proxy *BP_Scene::createProxy(void *object, - const DT_Vector3 min, - const DT_Vector3 max) -{ - BP_Proxy *proxy = new BP_Proxy(object, *this); - - proxy->add(min, max, m_proxies); - - BP_ProxyList::iterator it; - for (it = m_proxies.begin(); it != m_proxies.end(); ++it) - { - if ((*it).second == 3) - { - callBeginOverlap(proxy->getObject(), (*it).first->getObject()); - } - } - - m_proxies.clear(); - - return proxy; -} - -void BP_Scene::destroyProxy(BP_Proxy *proxy) -{ - proxy->remove(m_proxies); - - BP_ProxyList::iterator it; - for (it = m_proxies.begin(); it != m_proxies.end(); ++it) - { - if ((*it).second == 3) - { - callEndOverlap(proxy->getObject(), (*it).first->getObject()); - } - } - - m_proxies.clear(); - - delete proxy; -} - -void *BP_Scene::rayCast(BP_RayCastCallback objectRayCast, - void *client_data, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar& lambda) const -{ - void *client_object = 0; - - DT_Index index[3]; - index[0] = m_endpointList[0].stab(source[0], m_proxies); - index[1] = m_endpointList[1].stab(source[1], m_proxies); - index[2] = m_endpointList[2].stab(source[2], m_proxies); - - BP_ProxyList::iterator it; - for (it = m_proxies.begin(); it != m_proxies.end(); ++it) - { - if ((*it).second == 3 && - (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda)) - { - client_object = (*it).first->getObject(); - } - } - - DT_Vector3 delta; - delta[0] = target[0] - source[0]; - delta[1] = target[1] - source[1]; - delta[2] = target[2] - source[2]; - - DT_Vector3 lambdas; - lambdas[0] = m_endpointList[0].nextLambda(index[0], source[0], delta[0]); - lambdas[1] = m_endpointList[1].nextLambda(index[1], source[1], delta[1]); - lambdas[2] = m_endpointList[2].nextLambda(index[2], source[2], delta[2]); - int closest = lambdas[0] < lambdas[1] ? (lambdas[0] < lambdas[2] ? 0 : 2) : (lambdas[1] < lambdas[2] ? 1 : 2); - - while (lambdas[closest] < lambda) - { - if (delta[closest] < 0.0f) - { - const BP_Endpoint& endpoint = m_endpointList[closest][index[closest]]; - - if (endpoint.getType() == BP_Endpoint::MAXIMUM) - { - it = m_proxies.add(endpoint.getProxy()); - if ((*it).second == 3 && - (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda)) - { - client_object = (*it).first->getObject(); - } - } - else - { - m_proxies.remove(endpoint.getProxy()); - } - } - else - { - const BP_Endpoint& endpoint = m_endpointList[closest][index[closest] - 1]; - - if (endpoint.getType() == BP_Endpoint::MINIMUM) - { - it = m_proxies.add(endpoint.getProxy()); - if ((*it).second == 3 && - (*objectRayCast)(client_data, (*it).first->getObject(), source, target, &lambda)) - { - client_object = (*it).first->getObject(); - } - } - else - { - m_proxies.remove(endpoint.getProxy()); - } - } - - lambdas[closest] = m_endpointList[closest].nextLambda(index[closest], source[closest], delta[closest]); - closest = lambdas[0] < lambdas[1] ? (lambdas[0] < lambdas[2] ? 0 : 2) : (lambdas[1] < lambdas[2] ? 1 : 2); - } - - m_proxies.clear(); - - return client_object; -} - - diff --git a/extern/solid/src/broad/BP_Scene.h b/extern/solid/src/broad/BP_Scene.h deleted file mode 100644 index ef55374c43b..00000000000 --- a/extern/solid/src/broad/BP_Scene.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef BP_SCENE_H -#define BP_SCENE_H - -#include <SOLID_broad.h> - -#include "BP_EndpointList.h" -#include "BP_ProxyList.h" - -class BP_Proxy; - -class BP_Scene { -public: - BP_Scene(void *client_data, - BP_Callback beginOverlap, - BP_Callback endOverlap) - : m_client_data(client_data), - m_beginOverlap(beginOverlap), - m_endOverlap(endOverlap), - m_proxies(20) - {} - - ~BP_Scene() {} - - BP_Proxy *createProxy(void *object, - const DT_Vector3 min, - const DT_Vector3 max); - - void destroyProxy(BP_Proxy *proxy); - - void *rayCast(BP_RayCastCallback objectRayCast, - void *client_data, - const DT_Vector3 source, - const DT_Vector3 target, - DT_Scalar& lambda) const; - - void callBeginOverlap(void *object1, void *object2) - { - (*m_beginOverlap)(m_client_data, object1, object2); - } - - void callEndOverlap(void *object1, void *object2) - { - (*m_endOverlap)(m_client_data, object1, object2); - } - - BP_EndpointList& getList(int i) { return m_endpointList[i]; } - -private: - void *m_client_data; - BP_Callback m_beginOverlap; - BP_Callback m_endOverlap; - BP_EndpointList m_endpointList[3]; - mutable BP_ProxyList m_proxies; -}; - -#endif diff --git a/extern/solid/src/broad/Makefile b/extern/solid/src/broad/Makefile deleted file mode 100644 index ce10e5f0bcf..00000000000 --- a/extern/solid/src/broad/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program 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 2 -# of the License, or (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = solid_broad -DIR = $(OCGDIR)/extern/$(LIBNAME) - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I../../include -I$(NAN_QHULL)/include -CPPFLAGS += -DQHULL -DUSE_DOUBLES - -include nan_compile.mk - - diff --git a/extern/solid/src/complex/DT_BBoxTree.cpp b/extern/solid/src/complex/DT_BBoxTree.cpp deleted file mode 100644 index 4f10f61f2e2..00000000000 --- a/extern/solid/src/complex/DT_BBoxTree.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_BBoxTree.h" - -inline DT_CBox getBBox(int first, int last, const DT_CBox *boxes, const DT_Index *indices) -{ - assert(last - first >= 1); - - DT_CBox bbox = boxes[indices[first]]; - int i; - for (i = first; i < last; ++i) - { - bbox = bbox.hull(boxes[indices[i]]); - } - - return bbox; -} - -DT_BBoxNode::DT_BBoxNode(int first, int last, int& node, DT_BBoxNode *free_nodes, const DT_CBox *boxes, DT_Index *indices, const DT_CBox& bbox) -{ - assert(last - first >= 2); - - int axis = bbox.longestAxis(); - MT_Scalar abscissa = bbox.getCenter()[axis]; - int i = first, mid = last; - while (i < mid) - { - if (boxes[indices[i]].getCenter()[axis] < abscissa) - { - ++i; - } - else - { - --mid; - std::swap(indices[i], indices[mid]); - } - } - - if (mid == first || mid == last) - { - mid = (first + last) / 2; - } - - m_lbox = getBBox(first, mid, boxes, indices); - m_rbox = getBBox(mid, last, boxes, indices); - m_flags = 0x0; - - if (mid - first == 1) - { - m_flags |= LLEAF; - m_lchild = indices[first]; - } - else - { - m_lchild = node++; - new(&free_nodes[m_lchild]) DT_BBoxNode(first, mid, node, free_nodes, boxes, indices, m_lbox); - } - - if (last - mid == 1) - { - m_flags |= RLEAF; - m_rchild = indices[mid]; - } - else - { - m_rchild = node++; - new(&free_nodes[m_rchild]) DT_BBoxNode(mid, last, node, free_nodes, boxes, indices, m_rbox); - } -} diff --git a/extern/solid/src/complex/DT_BBoxTree.h b/extern/solid/src/complex/DT_BBoxTree.h deleted file mode 100644 index 3d9da6e34ba..00000000000 --- a/extern/solid/src/complex/DT_BBoxTree.h +++ /dev/null @@ -1,540 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_BBOXTREE_H -#define DT_BBOXTREE_H - -#include <new> -#include <algorithm> - -#include "DT_Convex.h" -#include "DT_CBox.h" - - -class DT_BBoxTree { -public: - enum NodeType { INTERNAL = 0, LEAF = 1 }; - - DT_BBoxTree() {} - DT_BBoxTree(const DT_CBox& cbox, DT_Index index, NodeType type) - : m_cbox(cbox), - m_index(index), - m_type(type) - {} - - DT_CBox m_cbox; - DT_Index m_index; - NodeType m_type; -}; - - - -class DT_BBoxNode { -public: - DT_BBoxNode() {} - DT_BBoxNode(int first, int last, int& node, DT_BBoxNode *free_nodes, const DT_CBox *boxes, DT_Index *indices, const DT_CBox& bbox); - - void makeChildren(DT_BBoxTree& ltree, DT_BBoxTree& rtree) const; - void makeChildren(const DT_CBox& added, DT_BBoxTree& ltree, DT_BBoxTree& rtree) const; - - DT_CBox hull() const { return m_lbox.hull(m_rbox); } - - enum FlagType { LLEAF = 0x80, RLEAF = 0x40 }; - - DT_CBox m_lbox; - DT_CBox m_rbox; - DT_Index m_lchild; - DT_Index m_rchild; - unsigned char m_flags; -}; - -inline void DT_BBoxNode::makeChildren(DT_BBoxTree& ltree, DT_BBoxTree& rtree) const -{ - new (<ree) DT_BBoxTree(m_lbox, m_lchild, (m_flags & LLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL); - new (&rtree) DT_BBoxTree(m_rbox, m_rchild, (m_flags & RLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL); - -} - -inline void DT_BBoxNode::makeChildren(const DT_CBox& added, DT_BBoxTree& ltree, DT_BBoxTree& rtree) const -{ - new (<ree) DT_BBoxTree(m_lbox + added, m_lchild, (m_flags & LLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL); - new (&rtree) DT_BBoxTree(m_rbox + added, m_rchild, (m_flags & RLEAF) ? DT_BBoxTree::LEAF : DT_BBoxTree::INTERNAL); -} - - -template <typename Shape> -class DT_RootData { -public: - DT_RootData(const DT_BBoxNode *nodes, - const Shape *leaves) - : m_nodes(nodes), - m_leaves(leaves) - {} - - const DT_BBoxNode *m_nodes; - const Shape *m_leaves; -}; - -template <typename Shape1, typename Shape2> -class DT_ObjectData : public DT_RootData<Shape1> { -public: - DT_ObjectData(const DT_BBoxNode *nodes, - const Shape1 *leaves, - const MT_Transform& xform, - Shape2 plus) - : DT_RootData<Shape1>(nodes, leaves), - m_xform(xform), - m_inv_xform(xform.inverse()), - m_plus(plus), - m_added(computeCBox(plus, m_inv_xform)) - {} - - const MT_Transform& m_xform; - MT_Transform m_inv_xform; - Shape2 m_plus; - DT_CBox m_added; -}; - -template <typename Shape1, typename Shape2> -class DT_Pack { -public: - DT_Pack(const DT_ObjectData<Shape1, Shape2>& a, const DT_Convex& b) - : m_a(a), - m_b(b), - m_b_cbox(b.bbox(m_a.m_inv_xform)) - {} - - DT_ObjectData<Shape1, Shape2> m_a; - const DT_Convex& m_b; - DT_CBox m_b_cbox; -}; - -template <typename Shape1, typename Shape2> -class DT_HybridPack : public DT_Pack<Shape1, Shape2> { -public: - DT_HybridPack(const DT_ObjectData<Shape1, Shape2>& a, const DT_Convex& b, MT_Scalar margin) - : DT_Pack<Shape1, Shape2>(a, b), - m_margin(margin) - { - this->m_b_cbox += computeCBox(margin, this->m_a.m_inv_xform); - } - - MT_Scalar m_margin; -}; - -template <typename Shape1, typename Shape2> -class DT_DuoPack { -public: - DT_DuoPack(const DT_ObjectData<Shape1, Shape2>& a, const DT_ObjectData<Shape1, Shape2>& b) - : m_a(a), - m_b(b) - { - m_b2a = a.m_inv_xform * b.m_xform; - m_a2b = b.m_inv_xform * a.m_xform; - m_abs_b2a = m_b2a.getBasis().absolute(); - m_abs_a2b = m_a2b.getBasis().absolute(); - } - - DT_ObjectData<Shape1, Shape2> m_a, m_b; - MT_Transform m_b2a, m_a2b; - MT_Matrix3x3 m_abs_b2a, m_abs_a2b; -}; - - -template <typename Shape> -inline void refit(DT_BBoxNode& node, const DT_RootData<Shape>& rd) -{ - node.m_lbox = (node.m_flags & DT_BBoxNode::LLEAF) ? - computeCBox(rd.m_leaves[node.m_lchild]) : - rd.m_nodes[node.m_lchild].hull(); - node.m_rbox = (node.m_flags & DT_BBoxNode::RLEAF) ? - computeCBox(rd.m_leaves[node.m_rchild]) : - rd.m_nodes[node.m_rchild].hull(); -} - - -template <typename Shape> -bool ray_cast(const DT_BBoxTree& a, const DT_RootData<Shape>& rd, - const MT_Point3& source, const MT_Point3& target, - MT_Scalar& lambda, MT_Vector3& normal) -{ - if (!a.m_cbox.overlapsLineSegment(source, source.lerp(target, lambda))) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF) - { - return ray_cast(rd, a.m_index, source, target, lambda, normal); - } - else - { - DT_BBoxTree ltree, rtree; - rd.m_nodes[a.m_index].makeChildren(ltree, rtree); - - bool lresult = ray_cast(ltree, rd, source, target, lambda, normal); - bool rresult = ray_cast(rtree, rd, source, target, lambda, normal); - return lresult || rresult; - } -} - - -#ifdef STATISTICS -int num_box_tests = 0; -#endif - -template <typename Shape1, typename Shape2> -inline bool intersect(const DT_CBox& a, const DT_CBox& b, const DT_DuoPack<Shape1, Shape2>& pack) -{ -#ifdef STATISTICS - ++num_box_tests; -#endif - - - MT_Vector3 abs_pos_b2a = (pack.m_b2a(b.getCenter()) - a.getCenter()).absolute(); - MT_Vector3 abs_pos_a2b = (pack.m_a2b(a.getCenter()) - b.getCenter()).absolute(); - return (a.getExtent()[0] + pack.m_abs_b2a[0].dot(b.getExtent()) >= abs_pos_b2a[0]) && - (a.getExtent()[1] + pack.m_abs_b2a[1].dot(b.getExtent()) >= abs_pos_b2a[1]) && - (a.getExtent()[2] + pack.m_abs_b2a[2].dot(b.getExtent()) >= abs_pos_b2a[2]) && - (b.getExtent()[0] + pack.m_abs_a2b[0].dot(a.getExtent()) >= abs_pos_a2b[0]) && - (b.getExtent()[1] + pack.m_abs_a2b[1].dot(a.getExtent()) >= abs_pos_a2b[1]) && - (b.getExtent()[2] + pack.m_abs_a2b[2].dot(a.getExtent()) >= abs_pos_a2b[2]); -} - - - - -template <typename Shape1, typename Shape2> -bool intersect(const DT_BBoxTree& a, const DT_Pack<Shape1, Shape2>& pack, MT_Vector3& v) -{ - if (!a.m_cbox.overlaps(pack.m_b_cbox)) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF) - { - return intersect(pack, a.m_index, v); - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - return intersect(a_ltree, pack, v) || intersect(a_rtree, pack, v); - } -} - -template <typename Shape1, typename Shape2> -bool intersect(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack, MT_Vector3& v) -{ - if (!intersect(a.m_cbox, b.m_cbox, pack)) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) - { - return intersect(pack, a.m_index, b.m_index, v); - } - else if (a.m_type == DT_BBoxTree::LEAF || - (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) - { - DT_BBoxTree b_ltree, b_rtree; - pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree); - - return intersect(a, b_ltree, pack, v) || intersect(a, b_rtree, pack, v); - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - return intersect(a_ltree, b, pack, v) || intersect(a_rtree, b, pack, v); - } -} - -template <typename Shape1, typename Shape2> -bool common_point(const DT_BBoxTree& a, const DT_Pack<Shape1, Shape2>& pack, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - if (!a.m_cbox.overlaps(pack.m_b_cbox)) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF) - { - return common_point(pack, a.m_index, v, pa, pb); - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - return common_point(a_ltree, pack, v, pa, pb) || - common_point(a_rtree, pack, v, pa ,pb); - } -} - -template <typename Shape1, typename Shape2> -bool common_point(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - if (!intersect(a.m_cbox, b.m_cbox, pack)) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) - { - return common_point(pack, a.m_index, b.m_index, v, pa, pb); - } - else if (a.m_type == DT_BBoxTree::LEAF || - (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) - { - DT_BBoxTree b_ltree, b_rtree; - pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree); - return common_point(a, b_ltree, pack, v, pa, pb) || - common_point(a, b_rtree, pack, v, pa, pb); - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - return common_point(a_ltree, b, pack, v, pa, pb) || - common_point(a_rtree, b, pack, v, pa ,pb); - } -} - - -template <typename Shape1, typename Shape2> -bool penetration_depth(const DT_BBoxTree& a, const DT_HybridPack<Shape1, Shape2>& pack, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb, MT_Scalar& max_pen_len) -{ - if (!a.m_cbox.overlaps(pack.m_b_cbox)) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF) - { - if (penetration_depth(pack, a.m_index, v, pa, pb)) - { - max_pen_len = pa.distance2(pb); - return true; - } - else - { - return false; - } - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - if (penetration_depth(a_ltree, pack, v, pa, pb, max_pen_len)) - { - MT_Vector3 rv; - MT_Point3 rpa, rpb; - MT_Scalar rmax_pen_len; - if (penetration_depth(a_rtree, pack, rv, rpa, rpb, rmax_pen_len) && - (max_pen_len < rmax_pen_len)) - { - max_pen_len = rmax_pen_len; - v = rv; - pa = rpa; - pb = rpb; - } - return true; - } - else - { - return penetration_depth(a_rtree, pack, v, pa, pb, max_pen_len); - } - } -} - -template <typename Shape1, typename Shape2> -bool penetration_depth(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb, MT_Scalar& max_pen_len) -{ - if (!intersect(a.m_cbox, b.m_cbox, pack)) - { - return false; - } - - if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) - { - if (penetration_depth(pack, a.m_index, b.m_index, v, pa, pb)) - { - max_pen_len = pa.distance2(pb); - return true; - } - else - { - return false; - } - } - else if (a.m_type == DT_BBoxTree::LEAF || - (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) - { - DT_BBoxTree b_ltree, b_rtree; - pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree); - if (penetration_depth(a, b_ltree, pack, v, pa, pb, max_pen_len)) - { - MT_Point3 rpa, rpb; - MT_Scalar rmax_pen_len; - if (penetration_depth(a, b_rtree, pack, v, rpa, rpb, rmax_pen_len) && - (max_pen_len < rmax_pen_len)) - { - max_pen_len = rmax_pen_len; - pa = rpa; - pb = rpb; - } - return true; - } - else - { - return penetration_depth(a, b_rtree, pack, v, pa, pb, max_pen_len); - } - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - if (penetration_depth(a_ltree, b, pack, v, pa, pb, max_pen_len)) - { - MT_Point3 rpa, rpb; - MT_Scalar rmax_pen_len; - if (penetration_depth(a_rtree, b, pack, v, rpa, rpb, rmax_pen_len) && - (max_pen_len < rmax_pen_len)) - { - max_pen_len = rmax_pen_len; - pa = rpa; - pb = rpb; - } - return true; - } - else - { - return penetration_depth(a_rtree, b, pack, v, pa, pb, max_pen_len); - } - } -} - - -// Returns a lower bound for the distance for quick rejection in closest_points -inline MT_Scalar distance2(const DT_CBox& a, const MT_Transform& a2w, - const DT_CBox& b, const MT_Transform& b2w) -{ - MT_Vector3 v = b2w(b.getCenter()) - a2w(a.getCenter()); - MT_Scalar dist2 = v.length2(); - if (dist2 > MT_Scalar(0.0)) - { - MT_Vector3 w = b2w(b.support(-v * b2w.getBasis())) - a2w(a.support(v * a2w.getBasis())); - MT_Scalar delta = v.dot(w); - return delta > MT_Scalar(0.0) ? delta * delta / dist2 : MT_Scalar(0.0); - } - return MT_Scalar(0.0); -} - - -template <typename Shape1, typename Shape2> -MT_Scalar closest_points(const DT_BBoxTree& a, const DT_Pack<Shape1, Shape2>& pack, - MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) -{ - if (a.m_type == DT_BBoxTree::LEAF) - { - return closest_points(pack, a.m_index, max_dist2, pa, pb); - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - MT_Scalar ldist2 = distance2(a_ltree.m_cbox, pack.m_a.m_xform, pack.m_b_cbox, pack.m_a.m_xform); - MT_Scalar rdist2 = distance2(a_rtree.m_cbox, pack.m_a.m_xform, pack.m_b_cbox, pack.m_a.m_xform); - if (ldist2 < rdist2) - { - MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a_ltree, pack, max_dist2, pa, pb) : MT_INFINITY; - GEN_set_min(max_dist2, dist2); - return rdist2 < max_dist2 ? GEN_min(dist2, closest_points(a_rtree, pack, max_dist2, pa, pb)) : dist2; - } - else - { - MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a_rtree, pack, max_dist2, pa, pb) : MT_INFINITY; - GEN_set_min(max_dist2, dist2); - return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a_ltree, pack, max_dist2, pa, pb)) : dist2; - } - } -} - - -template <typename Shape1, typename Shape2> -MT_Scalar closest_points(const DT_BBoxTree& a, const DT_BBoxTree& b, const DT_DuoPack<Shape1, Shape2>& pack, - MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) -{ - if (a.m_type == DT_BBoxTree::LEAF && b.m_type == DT_BBoxTree::LEAF) - { - return closest_points(pack, a.m_index, b.m_index, max_dist2, pa, pb); - } - else if (a.m_type == DT_BBoxTree::LEAF || - (b.m_type != DT_BBoxTree::LEAF && a.m_cbox.size() < b.m_cbox.size())) - { - DT_BBoxTree b_ltree, b_rtree; - pack.m_b.m_nodes[b.m_index].makeChildren(pack.m_b.m_added, b_ltree, b_rtree); - MT_Scalar ldist2 = distance2(a.m_cbox, pack.m_a.m_xform, b_ltree.m_cbox, pack.m_b.m_xform); - MT_Scalar rdist2 = distance2(a.m_cbox, pack.m_a.m_xform, b_rtree.m_cbox, pack.m_b.m_xform); - if (ldist2 < rdist2) - { - MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a, b_ltree, pack, max_dist2, pa, pb): MT_INFINITY;; - GEN_set_min(max_dist2, dist2); - return rdist2 < max_dist2 ? GEN_min(dist2, closest_points(a, b_rtree, pack, max_dist2, pa, pb)) : dist2; - } - else - { - MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a, b_rtree, pack, max_dist2, pa, pb) : MT_INFINITY;; - GEN_set_min(max_dist2, dist2); - return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a, b_ltree, pack, max_dist2, pa, pb)) : dist2; - } - } - else - { - DT_BBoxTree a_ltree, a_rtree; - pack.m_a.m_nodes[a.m_index].makeChildren(pack.m_a.m_added, a_ltree, a_rtree); - MT_Scalar ldist2 = distance2(a_ltree.m_cbox, pack.m_a.m_xform, b.m_cbox, pack.m_b.m_xform); - MT_Scalar rdist2 = distance2(a_rtree.m_cbox, pack.m_a.m_xform, b.m_cbox, pack.m_b.m_xform); - if (ldist2 < rdist2) - { - MT_Scalar dist2 = ldist2 < max_dist2 ? closest_points(a_ltree, b, pack, max_dist2, pa, pb) : MT_INFINITY;; - GEN_set_min(max_dist2, dist2); - return rdist2 < max_dist2 ? GEN_min(dist2,closest_points(a_rtree, b, pack, max_dist2, pa, pb)) : dist2; - } - else - { - MT_Scalar dist2 = rdist2 < max_dist2 ? closest_points(a_rtree, b, pack, max_dist2, pa, pb) : MT_INFINITY; - GEN_set_min(max_dist2, dist2); - return ldist2 < max_dist2 ? GEN_min(dist2, closest_points(a_ltree, b, pack, max_dist2, pa, pb)) : dist2; - } - } -} - -#endif - diff --git a/extern/solid/src/complex/DT_CBox.h b/extern/solid/src/complex/DT_CBox.h deleted file mode 100644 index 7fc7c5df4db..00000000000 --- a/extern/solid/src/complex/DT_CBox.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_CBOX_H -#define DT_CBOX_H - -#include "MT_BBox.h" - -struct DT_CBox { - DT_CBox() {} - DT_CBox(const MT_Point3& center, const MT_Vector3& extent) - : m_center(center), - m_extent(extent) - {} - - explicit DT_CBox(const MT_BBox& bbox) { set(bbox); } - - const MT_Point3& getCenter() const { return m_center; } - const MT_Vector3& getExtent() const { return m_extent; } - - void set(const MT_BBox& bbox) - { - m_center = bbox.getCenter(); - m_extent = bbox.getExtent(); - } - - MT_BBox get() const - { - return MT_BBox(m_center - m_extent, m_center + m_extent); - } - - MT_Scalar size() const - { - return GEN_max(GEN_max(m_extent[0], m_extent[1]), m_extent[2]); - } - - - DT_CBox& operator+=(const DT_CBox& box) - { - m_center += box.getCenter(); - m_extent += box.getExtent(); - return *this; - } - - int longestAxis() const { return m_extent.closestAxis(); } - - DT_CBox hull(const DT_CBox& b) const - { - return DT_CBox(this->get().hull(b.get())); - } - - bool overlaps(const DT_CBox& b) const - { - return MT_abs(m_center[0] - b.m_center[0]) <= m_extent[0] + b.m_extent[0] && - MT_abs(m_center[1] - b.m_center[1]) <= m_extent[1] + b.m_extent[1] && - MT_abs(m_center[2] - b.m_center[2]) <= m_extent[2] + b.m_extent[2]; - } - - bool overlapsLineSegment(const MT_Point3& p, const MT_Point3& q) const - { - MT_Vector3 r = q - p; - MT_Vector3 r_abs = r.absolute(); - - if (!overlaps(DT_CBox(p + r * MT_Scalar(0.5), r_abs * MT_Scalar(0.5)))) - { - return false; - } - - MT_Vector3 s = p - m_center; - - if (MT_abs(r[2] * s[1] - r[1] * s[2]) > r_abs[2] * m_extent[1] + r_abs[1] * m_extent[2]) - { - return false; - } - - if (MT_abs(r[0] * s[2] - r[2] * s[0]) > r_abs[0] * m_extent[2] + r_abs[2] * m_extent[0]) - { - return false; - } - - if (MT_abs(r[1] * s[0] - r[0] * s[1]) > r_abs[1] * m_extent[0] + r_abs[0] * m_extent[1]) - { - return false; - } - - return true; - } - - MT_Point3 support(const MT_Vector3& v) const - { - return m_center + MT_Vector3(v[0] < MT_Scalar(0.0) ? -m_extent[0] : m_extent[0], - v[1] < MT_Scalar(0.0) ? -m_extent[1] : m_extent[1], - v[2] < MT_Scalar(0.0) ? -m_extent[2] : m_extent[2]); - - } - -private: - MT_Point3 m_center; - MT_Vector3 m_extent; -}; - -inline DT_CBox operator+(const DT_CBox& b1, const DT_CBox& b2) -{ - return DT_CBox(b1.getCenter() + b2.getCenter(), - b1.getExtent() + b2.getExtent()); -} - -inline DT_CBox operator-(const DT_CBox& b1, const DT_CBox& b2) -{ - return DT_CBox(b1.getCenter() - b2.getCenter(), - b1.getExtent() + b2.getExtent()); -} - -#endif diff --git a/extern/solid/src/complex/DT_Complex.cpp b/extern/solid/src/complex/DT_Complex.cpp deleted file mode 100644 index 023383a8427..00000000000 --- a/extern/solid/src/complex/DT_Complex.cpp +++ /dev/null @@ -1,327 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include <new> -#include <fstream> - -#include "DT_Complex.h" -#include "DT_Minkowski.h" -#include "DT_Sphere.h" -#include "DT_Transform.h" - -DT_Complex::DT_Complex(const DT_VertexBase *base) - : m_base(base), - m_count(0), - m_leaves(0), - m_nodes(0) -{ - assert(base); - base->addComplex(this); -} - - -DT_Complex::~DT_Complex() -{ - DT_Index i; - for (i = 0; i != m_count; ++i) - { - delete m_leaves[i]; - } - delete [] m_leaves; - delete [] m_nodes; - - m_base->removeComplex(this); - if (m_base->isOwner()) - { - delete m_base; - } -} - -void DT_Complex::finish(DT_Count n, const DT_Convex *p[]) -{ - m_count = n; - - - assert(n >= 1); - - m_leaves = new const DT_Convex *[n]; - assert(m_leaves); - - DT_CBox *boxes = new DT_CBox[n]; - DT_Index *indices = new DT_Index[n]; - assert(boxes); - - DT_Index i; - for (i = 0; i != n; ++i) - { - m_leaves[i] = p[i]; - boxes[i].set(p[i]->bbox()); - indices[i] = i; - } - - m_cbox = boxes[0]; - for (i = 1; i != n; ++i) - { - m_cbox = m_cbox.hull(boxes[i]); - } - - if (n == 1) - { - m_nodes = 0; - m_type = DT_BBoxTree::LEAF; - } - else - { - m_nodes = new DT_BBoxNode[n - 1]; - assert(m_nodes); - - int num_nodes = 0; - new(&m_nodes[num_nodes++]) DT_BBoxNode(0, n, num_nodes, m_nodes, boxes, indices, m_cbox); - - assert(num_nodes == n - 1); - - m_type = DT_BBoxTree::INTERNAL; - } - - delete [] boxes; -} - - -MT_BBox DT_Complex::bbox(const MT_Transform& t, MT_Scalar margin) const -{ - MT_Matrix3x3 abs_b = t.getBasis().absolute(); - MT_Point3 center = t(m_cbox.getCenter()); - MT_Vector3 extent(margin + abs_b[0].dot(m_cbox.getExtent()), - margin + abs_b[1].dot(m_cbox.getExtent()), - margin + abs_b[2].dot(m_cbox.getExtent())); - - return MT_BBox(center - extent, center + extent); -} - -inline DT_CBox computeCBox(const DT_Convex *p) -{ - return DT_CBox(p->bbox()); -} - -inline DT_CBox computeCBox(MT_Scalar margin, const MT_Transform& xform) -{ - const MT_Matrix3x3& basis = xform.getBasis(); - return DT_CBox(MT_Point3(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)), - MT_Vector3(basis[0].length() * margin, - basis[1].length() * margin, - basis[2].length() * margin)); -} - -void DT_Complex::refit() -{ - DT_RootData<const DT_Convex *> rd(m_nodes, m_leaves); - DT_Index i = m_count - 1; - while (i--) - { - ::refit(m_nodes[i], rd); - } - m_cbox = m_type == DT_BBoxTree::LEAF ? computeCBox(m_leaves[0]) : m_nodes[0].hull(); -} - -inline bool ray_cast(const DT_RootData<const DT_Convex *>& rd, DT_Index index, const MT_Point3& source, const MT_Point3& target, - MT_Scalar& lambda, MT_Vector3& normal) -{ - return rd.m_leaves[index]->ray_cast(source, target, lambda, normal); -} - -bool DT_Complex::ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& lambda, MT_Vector3& normal) const -{ - DT_RootData<const DT_Convex *> rd(m_nodes, m_leaves); - - return ::ray_cast(DT_BBoxTree(m_cbox, 0, m_type), rd, source, target, lambda, normal); -} - -inline bool intersect(const DT_Pack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Vector3& v) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - MT_Scalar a_margin = pack.m_a.m_plus; - return ::intersect((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(ta)), - pack.m_b, v); -} - -bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Vector3& v) -{ - DT_Pack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b); - - return intersect(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v); -} - -inline bool intersect(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - MT_Scalar a_margin = pack.m_a.m_plus; - DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]); - MT_Scalar b_margin = pack.m_b.m_plus; - return ::intersect((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(ta)), - (b_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : - static_cast<const DT_Convex&>(tb)), - v); -} - -bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, MT_Vector3& v) -{ - DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), - DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin)); - - - return intersect(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), - DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v); -} - -inline bool common_point(const DT_Pack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - MT_Scalar a_margin = pack.m_a.m_plus; - return ::common_point((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(ta)), - pack.m_b, v, pa, pb); -} - -bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_Pack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b); - - return common_point(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v, pb, pa); -} - -inline bool common_point(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - MT_Scalar a_margin = pack.m_a.m_plus; - DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]); - MT_Scalar b_margin = pack.m_b.m_plus; - return ::common_point((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(ta)), - (b_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : - static_cast<const DT_Convex&>(tb)), - v, pa, pb); -} - -bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), - DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin)); - - return common_point(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), - DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v, pa, pb); -} - -inline bool penetration_depth(const DT_HybridPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - return ::hybrid_penetration_depth(ta, pack.m_a.m_plus, pack.m_b, pack.m_margin, v, pa, pb); -} - -bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Scalar b_margin, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_HybridPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b, b_margin); - - MT_Scalar max_pen_len = MT_Scalar(0.0); - return penetration_depth(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, v, pa, pb, max_pen_len); -} - -inline bool penetration_depth(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]); - return ::hybrid_penetration_depth(ta, pack.m_a.m_plus, tb, pack.m_a.m_plus, v, pa, pb); -} - -bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), - DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin)); - - MT_Scalar max_pen_len = MT_Scalar(0.0); - return penetration_depth(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), - DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, v, pa, pb, max_pen_len); -} - - - -inline MT_Scalar closest_points(const DT_Pack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - MT_Scalar a_margin = pack.m_a.m_plus; - return ::closest_points((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(ta)), - pack.m_b, max_dist2, pa, pb); -} - -MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Point3& pa, MT_Point3& pb) -{ - DT_Pack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), b); - - return closest_points(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), pack, MT_INFINITY, pa, pb); -} - -inline MT_Scalar closest_points(const DT_DuoPack<const DT_Convex *, MT_Scalar>& pack, DT_Index a_index, DT_Index b_index, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb) -{ - DT_Transform ta = DT_Transform(pack.m_a.m_xform, *pack.m_a.m_leaves[a_index]); - MT_Scalar a_margin = pack.m_a.m_plus; - DT_Transform tb = DT_Transform(pack.m_b.m_xform, *pack.m_b.m_leaves[b_index]); - MT_Scalar b_margin = pack.m_b.m_plus; - return ::closest_points((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(ta, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(ta)), - (b_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(tb, DT_Sphere(b_margin))) : - static_cast<const DT_Convex&>(tb)), max_dist2, pa, pb); -} - -MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Point3& pa, MT_Point3& pb) -{ - DT_DuoPack<const DT_Convex *, MT_Scalar> pack(DT_ObjectData<const DT_Convex *, MT_Scalar>(a.m_nodes, a.m_leaves, a2w, a_margin), - DT_ObjectData<const DT_Convex *, MT_Scalar>(b.m_nodes, b.m_leaves, b2w, b_margin)); - - return closest_points(DT_BBoxTree(a.m_cbox + pack.m_a.m_added, 0, a.m_type), - DT_BBoxTree(b.m_cbox + pack.m_b.m_added, 0, b.m_type), pack, MT_INFINITY, pa, pb); -} - - diff --git a/extern/solid/src/complex/DT_Complex.h b/extern/solid/src/complex/DT_Complex.h deleted file mode 100644 index ae08a05d4c9..00000000000 --- a/extern/solid/src/complex/DT_Complex.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_COMPLEX_H -#define DT_COMPLEX_H - -#include <algorithm> - -#include "MT_Transform.h" -#include "DT_VertexBase.h" - -#include "DT_Shape.h" -#include "DT_CBox.h" -#include "DT_BBoxTree.h" - -class DT_Convex; - -class DT_Complex : public DT_Shape { -public: - DT_Complex(const DT_VertexBase *base); - virtual ~DT_Complex(); - - void finish(DT_Count n, const DT_Convex *p[]); - - virtual DT_ShapeType getType() const { return COMPLEX; } - - virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin) const; - - virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& lambda, MT_Vector3& normal) const; - - void refit(); - - - friend bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Vector3& v); - - friend bool intersect(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v); - - friend bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - - friend bool common_point(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - - friend bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Scalar b_margin, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - - friend bool penetration_depth(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - - friend MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Convex& b, MT_Point3& pa, MT_Point3& pb); - - friend MT_Scalar closest_points(const DT_Complex& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Complex& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Point3& pa, MT_Point3& pb); - - const DT_VertexBase *m_base; - DT_Count m_count; - const DT_Convex **m_leaves; - DT_BBoxNode *m_nodes; - DT_CBox m_cbox; - DT_BBoxTree::NodeType m_type; -}; - -#endif - - - diff --git a/extern/solid/src/complex/Makefile b/extern/solid/src/complex/Makefile deleted file mode 100644 index e8df4df51a3..00000000000 --- a/extern/solid/src/complex/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program 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 2 -# of the License, or (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = solid_complex -DIR = $(OCGDIR)/extern/$(LIBNAME) - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I../../include -I$(NAN_QHULL)/include -CPPFLAGS += -I../convex -CPPFLAGS += -DQHULL -DUSE_DOUBLES - -include nan_compile.mk - - diff --git a/extern/solid/src/convex/DT_Accuracy.cpp b/extern/solid/src/convex/DT_Accuracy.cpp deleted file mode 100644 index 113275b0dbd..00000000000 --- a/extern/solid/src/convex/DT_Accuracy.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Accuracy.h" - -static const MT_Scalar rel_error = MT_Scalar(1.0e-3); - -MT_Scalar DT_Accuracy::rel_error2 = rel_error * rel_error; -MT_Scalar DT_Accuracy::depth_tolerance = MT_Scalar(1.0) + MT_Scalar(2.0) * rel_error; -MT_Scalar DT_Accuracy::tol_error = MT_EPSILON; diff --git a/extern/solid/src/convex/DT_Accuracy.h b/extern/solid/src/convex/DT_Accuracy.h deleted file mode 100644 index 9759a6fd4c5..00000000000 --- a/extern/solid/src/convex/DT_Accuracy.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_ACCURACY_H -#define DT_ACCURACY_H - -#include "MT_Scalar.h" - -class DT_Accuracy { -public: - static MT_Scalar rel_error2; // squared relative error in the computed distance - static MT_Scalar depth_tolerance; // terminate EPA if upper_bound <= depth_tolerance * dist2 - static MT_Scalar tol_error; // error tolerance if the distance is almost zero - - static void setAccuracy(MT_Scalar rel_error) - { - rel_error2 = rel_error * rel_error; - depth_tolerance = MT_Scalar(1.0) + MT_Scalar(2.0) * rel_error; - } - - static void setTolerance(MT_Scalar epsilon) - { - tol_error = epsilon; - } -}; - -#endif diff --git a/extern/solid/src/convex/DT_Array.h b/extern/solid/src/convex/DT_Array.h deleted file mode 100644 index 1694f884e53..00000000000 --- a/extern/solid/src/convex/DT_Array.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_ARRAY_H -#define DT_ARRAY_H - -#if defined (__sgi) -#include <assert.h> -#else -#include <cassert> -#endif - -template <typename Data, typename Size = size_t> -class DT_Array { -public: - DT_Array() - : m_count(0), - m_data(0) - {} - - explicit DT_Array(Size count) - : m_count(count), - m_data(new Data[count]) - { - assert(m_data); - } - - DT_Array(Size count, const Data *data) - : m_count(count), - m_data(new Data[count]) - { - assert(m_data); - std::copy(&data[0], &data[count], m_data); - } - - ~DT_Array() - { - delete [] m_data; - } - - const Data& operator[](int i) const { return m_data[i]; } - Data& operator[](int i) { return m_data[i]; } - - Size size() const { return m_count; } - -private: - DT_Array(const DT_Array&); - DT_Array& operator=(const DT_Array&); - - Size m_count; - Data *m_data; -}; - -#endif - diff --git a/extern/solid/src/convex/DT_Box.cpp b/extern/solid/src/convex/DT_Box.cpp deleted file mode 100644 index 0b46f566fe8..00000000000 --- a/extern/solid/src/convex/DT_Box.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Box.h" - -MT_Scalar DT_Box::supportH(const MT_Vector3& v) const -{ - return v.absolute().dot(m_extent); -} - -MT_Point3 DT_Box::support(const MT_Vector3& v) const -{ - return MT_Point3(v[0] < MT_Scalar(0.0) ? -m_extent[0] : m_extent[0], - v[1] < MT_Scalar(0.0) ? -m_extent[1] : m_extent[1], - v[2] < MT_Scalar(0.0) ? -m_extent[2] : m_extent[2]); - -} - - -bool DT_Box::ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& param, MT_Vector3& normal) const -{ - T_Outcode source_bits = outcode(source); - T_Outcode target_bits = outcode(target); - - if ((source_bits & target_bits) == 0x0) - // None of the side planes separate the ray from the box. - { - MT_Scalar lambda_enter = MT_Scalar(0.0); - MT_Scalar lambda_exit = param; - MT_Vector3 r = target - source; - T_Outcode normal_bit = 0x0; // Indicates the axis that is returned as normal. - T_Outcode bit = 0x01; - int i; - for (i = 0; i != 3; ++i) - { - if (source_bits & bit) - // Point of intersection is entering - { - MT_Scalar lambda = (-source[i] - m_extent[i]) / r[i]; - if (lambda_enter < lambda) - { - lambda_enter = lambda; - normal_bit = bit; - } - } - else if (target_bits & bit) - // Point of intersection is exiting - { - MT_Scalar lambda = (-source[i] - m_extent[i]) / r[i]; - GEN_set_min(lambda_exit, lambda); - } - bit <<=1; - if (source_bits & bit) - // Point of intersection is entering - { - MT_Scalar lambda = (-source[i] + m_extent[i]) / r[i]; - if (lambda_enter < lambda) - { - lambda_enter = lambda; - normal_bit = bit; - } - } - else if (target_bits & bit) - // Point of intersection is exiting - { - MT_Scalar lambda = (-source[i] + m_extent[i]) / r[i]; - GEN_set_min(lambda_exit, lambda); - } - bit <<=1; - } - if (lambda_enter <= lambda_exit) - // The ray intersects the box - { - param = lambda_enter; - normal.setValue(normal_bit == 0x01 ? -MT_Scalar(1.0) : - normal_bit == 0x02 ? MT_Scalar(1.0) : - MT_Scalar(0.0), - normal_bit == 0x04 ? -MT_Scalar(1.0) : - normal_bit == 0x08 ? MT_Scalar(1.0) : - MT_Scalar(0.0), - normal_bit == 0x10 ? -MT_Scalar(1.0) : - normal_bit == 0x20 ? MT_Scalar(1.0) : - MT_Scalar(0.0)); - return true; - } - } - - return false; -} - - diff --git a/extern/solid/src/convex/DT_Box.h b/extern/solid/src/convex/DT_Box.h deleted file mode 100644 index ace9634b5e3..00000000000 --- a/extern/solid/src/convex/DT_Box.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_BOX_H -#define DT_BOX_H - -#include "DT_Convex.h" - -class DT_Box : public DT_Convex { -public: - DT_Box(MT_Scalar x, MT_Scalar y, MT_Scalar z) : - m_extent(x, y, z) - {} - - DT_Box(const MT_Vector3& e) : - m_extent(e) - {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& param, MT_Vector3& normal) const; - - const MT_Vector3& getExtent() const { return m_extent; } - -protected: - typedef unsigned int T_Outcode; - - T_Outcode outcode(const MT_Point3& p) const - { - return (p[0] < -m_extent[0] ? 0x01 : 0x0) | - (p[0] > m_extent[0] ? 0x02 : 0x0) | - (p[1] < -m_extent[1] ? 0x04 : 0x0) | - (p[1] > m_extent[1] ? 0x08 : 0x0) | - (p[2] < -m_extent[2] ? 0x10 : 0x0) | - (p[2] > m_extent[2] ? 0x20 : 0x0); - } - - MT_Vector3 m_extent; -}; - -#endif diff --git a/extern/solid/src/convex/DT_Cone.cpp b/extern/solid/src/convex/DT_Cone.cpp deleted file mode 100644 index 1dd6a7ddbbe..00000000000 --- a/extern/solid/src/convex/DT_Cone.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Cone.h" - -MT_Point3 DT_Cone::support(const MT_Vector3& v) const -{ - MT_Scalar v_len = v.length(); - - if (v[1] > v_len * sinAngle) - { - return MT_Point3(MT_Scalar(0.0), halfHeight, MT_Scalar(0.0)); - } - else - { - MT_Scalar s = MT_sqrt(v[0] * v[0] + v[2] * v[2]); - if (s != MT_Scalar(0.0)) - { - MT_Scalar d = bottomRadius / s; - return MT_Point3(v[0] * d, -halfHeight, v[2] * d); - } - else - { - return MT_Point3(bottomRadius, -halfHeight, MT_Scalar(0.0)); - } - } -} - diff --git a/extern/solid/src/convex/DT_Cone.h b/extern/solid/src/convex/DT_Cone.h deleted file mode 100644 index 85e416877dd..00000000000 --- a/extern/solid/src/convex/DT_Cone.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_CONE_H -#define DT_CONE_H - -#include "DT_Convex.h" - -class DT_Cone : public DT_Convex { -public: - DT_Cone(MT_Scalar r, MT_Scalar h) : - bottomRadius(r), - halfHeight(h * MT_Scalar(0.5)), - sinAngle(r / MT_sqrt(r * r + h * h)) - {} - - virtual MT_Point3 support(const MT_Vector3& v) const; - -protected: - MT_Scalar bottomRadius; - MT_Scalar halfHeight; - MT_Scalar sinAngle; -}; - -#endif diff --git a/extern/solid/src/convex/DT_Convex.cpp b/extern/solid/src/convex/DT_Convex.cpp deleted file mode 100644 index 3be47f6ed02..00000000000 --- a/extern/solid/src/convex/DT_Convex.cpp +++ /dev/null @@ -1,426 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Convex.h" -#include "GEN_MinMax.h" - -//#define DEBUG -#define SAFE_EXIT - -#include "DT_GJK.h" -#include "DT_PenDepth.h" - -#include <algorithm> -#include <new> - -#include "MT_BBox.h" -#include "DT_Sphere.h" -#include "DT_Minkowski.h" - -#include "DT_Accuracy.h" - -#ifdef STATISTICS -int num_iterations = 0; -int num_irregularities = 0; -#endif - -MT_BBox DT_Convex::bbox() const -{ - MT_Point3 min(-supportH(MT_Vector3(-1.0f, 0.0f, 0.0f)), - -supportH(MT_Vector3(0.0f, -1.0f, 0.0f)), - -supportH(MT_Vector3(0.0f, 0.0f, -1.0f))); - MT_Point3 max( supportH(MT_Vector3(1.0f, 0.0f, 0.0f)), - supportH(MT_Vector3(0.0f, 1.0f, 0.0f)), - supportH(MT_Vector3(0.0f, 0.0f, 1.0f))); - - - return MT_BBox(min, max); -} - -MT_BBox DT_Convex::bbox(const MT_Matrix3x3& basis) const -{ - MT_Point3 min(-supportH(-basis[0]), - -supportH(-basis[1]), - -supportH(-basis[2])); - MT_Point3 max( supportH( basis[0]), - supportH( basis[1]), - supportH( basis[2])); - return MT_BBox(min, max); -} - -MT_BBox DT_Convex::bbox(const MT_Transform& t, MT_Scalar margin) const -{ - MT_Point3 min(t.getOrigin()[0] - supportH(-t.getBasis()[0]) - margin, - t.getOrigin()[1] - supportH(-t.getBasis()[1]) - margin, - t.getOrigin()[2] - supportH(-t.getBasis()[2]) - margin); - MT_Point3 max(t.getOrigin()[0] + supportH( t.getBasis()[0]) + margin, - t.getOrigin()[1] + supportH( t.getBasis()[1]) + margin, - t.getOrigin()[2] + supportH( t.getBasis()[2]) + margin); - return MT_BBox(min, max); -} - -bool DT_Convex::ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& lambda, MT_Vector3& normal) const -{ - // Still working on this one... - return false; -} - -bool intersect(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v) -{ - DT_GJK gjk; - -#ifdef STATISTICS - num_iterations = 0; -#endif - MT_Scalar dist2 = MT_INFINITY; - - do - { - MT_Point3 p = a.support(-v); - MT_Point3 q = b.support(v); - MT_Vector3 w = p - q; - - if (v.dot(w) > MT_Scalar(0.0)) - { - return false; - } - - gjk.addVertex(w); - -#ifdef STATISTICS - ++num_iterations; -#endif - if (!gjk.closest(v)) - { -#ifdef STATISTICS - ++num_irregularities; -#endif - return false; - } - -#ifdef SAFE_EXIT - MT_Scalar prev_dist2 = dist2; -#endif - - dist2 = v.length2(); - -#ifdef SAFE_EXIT - if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) - { - return false; - } -#endif - } - while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); - - v.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - - return true; -} - - - - -bool common_point(const DT_Convex& a, const DT_Convex& b, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_GJK gjk; - -#ifdef STATISTICS - num_iterations = 0; -#endif - - MT_Scalar dist2 = MT_INFINITY; - - do - { - MT_Point3 p = a.support(-v); - MT_Point3 q = b.support(v); - MT_Vector3 w = p - q; - - if (v.dot(w) > MT_Scalar(0.0)) - { - return false; - } - - gjk.addVertex(w, p, q); - -#ifdef STATISTICS - ++num_iterations; -#endif - if (!gjk.closest(v)) - { -#ifdef STATISTICS - ++num_irregularities; -#endif - return false; - } - -#ifdef SAFE_EXIT - MT_Scalar prev_dist2 = dist2; -#endif - - dist2 = v.length2(); - -#ifdef SAFE_EXIT - if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) - { - return false; - } -#endif - } - while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); - - gjk.compute_points(pa, pb); - - v.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - - return true; -} - - - - - - - -bool penetration_depth(const DT_Convex& a, const DT_Convex& b, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - DT_GJK gjk; - -#ifdef STATISTICS - num_iterations = 0; -#endif - - MT_Scalar dist2 = MT_INFINITY; - - do - { - MT_Point3 p = a.support(-v); - MT_Point3 q = b.support(v); - MT_Vector3 w = p - q; - - if (v.dot(w) > MT_Scalar(0.0)) - { - return false; - } - - gjk.addVertex(w, p, q); - -#ifdef STATISTICS - ++num_iterations; -#endif - if (!gjk.closest(v)) - { -#ifdef STATISTICS - ++num_irregularities; -#endif - return false; - } - -#ifdef SAFE_EXIT - MT_Scalar prev_dist2 = dist2; -#endif - - dist2 = v.length2(); - -#ifdef SAFE_EXIT - if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) - { - return false; - } -#endif - } - while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); - - - return penDepth(gjk, a, b, v, pa, pb); - -} - -bool hybrid_penetration_depth(const DT_Convex& a, MT_Scalar a_margin, - const DT_Convex& b, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - MT_Scalar margin = a_margin + b_margin; - if (margin > MT_Scalar(0.0)) - { - MT_Scalar margin2 = margin * margin; - - DT_GJK gjk; - -#ifdef STATISTICS - num_iterations = 0; -#endif - MT_Scalar dist2 = MT_INFINITY; - - do - { - MT_Point3 p = a.support(-v); - MT_Point3 q = b.support(v); - - MT_Vector3 w = p - q; - - MT_Scalar delta = v.dot(w); - - if (delta > MT_Scalar(0.0) && delta * delta > dist2 * margin2) - { - return false; - } - - if (gjk.inSimplex(w) || dist2 - delta <= dist2 * DT_Accuracy::rel_error2) - { - gjk.compute_points(pa, pb); - MT_Scalar s = MT_sqrt(dist2); - assert(s > MT_Scalar(0.0)); - pa -= v * (a_margin / s); - pb += v * (b_margin / s); - return true; - } - - gjk.addVertex(w, p, q); - -#ifdef STATISTICS - ++num_iterations; -#endif - if (!gjk.closest(v)) - { -#ifdef STATISTICS - ++num_irregularities; -#endif - gjk.compute_points(pa, pb); - MT_Scalar s = MT_sqrt(dist2); - assert(s > MT_Scalar(0.0)); - pa -= v * (a_margin / s); - pb += v * (b_margin / s); - return true; - } - -#ifdef SAFE_EXIT - MT_Scalar prev_dist2 = dist2; -#endif - - dist2 = v.length2(); - -#ifdef SAFE_EXIT - if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) - { - gjk.backup_closest(v); - dist2 = v.length2(); - gjk.compute_points(pa, pb); - MT_Scalar s = MT_sqrt(dist2); - assert(s > MT_Scalar(0.0)); - pa -= v * (a_margin / s); - pb += v * (b_margin / s); - return true; - } -#endif - } - while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); - - } - // Second GJK phase. compute points on the boundary of the offset object - - return penetration_depth((a_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(a, DT_Sphere(a_margin))) : - static_cast<const DT_Convex&>(a)), - (b_margin > MT_Scalar(0.0) ? - static_cast<const DT_Convex&>(DT_Minkowski(b, DT_Sphere(b_margin))) : - static_cast<const DT_Convex&>(b)), v, pa, pb); -} - - -MT_Scalar closest_points(const DT_Convex& a, const DT_Convex& b, MT_Scalar max_dist2, - MT_Point3& pa, MT_Point3& pb) -{ - MT_Vector3 v(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - - DT_GJK gjk; - -#ifdef STATISTICS - num_iterations = 0; -#endif - - MT_Scalar dist2 = MT_INFINITY; - - do - { - MT_Point3 p = a.support(-v); - MT_Point3 q = b.support(v); - MT_Vector3 w = p - q; - - MT_Scalar delta = v.dot(w); - if (delta > MT_Scalar(0.0) && delta * delta > dist2 * max_dist2) - { - return MT_INFINITY; - } - - if (gjk.inSimplex(w) || dist2 - delta <= dist2 * DT_Accuracy::rel_error2) - { - break; - } - - gjk.addVertex(w, p, q); - -#ifdef STATISTICS - ++num_iterations; - if (num_iterations > 1000) - { - std::cout << "v: " << v << " w: " << w << std::endl; - } -#endif - if (!gjk.closest(v)) - { -#ifdef STATISTICS - ++num_irregularities; -#endif - break; - } - -#ifdef SAFE_EXIT - MT_Scalar prev_dist2 = dist2; -#endif - - dist2 = v.length2(); - -#ifdef SAFE_EXIT - if (prev_dist2 - dist2 <= MT_EPSILON * prev_dist2) - { - gjk.backup_closest(v); - dist2 = v.length2(); - break; - } -#endif - } - while (!gjk.fullSimplex() && dist2 > DT_Accuracy::tol_error * gjk.maxVertex()); - - assert(!gjk.emptySimplex()); - - if (dist2 <= max_dist2) - { - gjk.compute_points(pa, pb); - } - - return dist2; -} diff --git a/extern/solid/src/convex/DT_Convex.h b/extern/solid/src/convex/DT_Convex.h deleted file mode 100644 index dd620ac8b98..00000000000 --- a/extern/solid/src/convex/DT_Convex.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_CONVEX_H -#define DT_CONVEX_H - -#include "DT_Shape.h" - -#include "MT_Vector3.h" -#include "MT_Point3.h" - -#include "MT_Matrix3x3.h" -#include "MT_Transform.h" - -class DT_Convex : public DT_Shape { -public: - virtual ~DT_Convex() {} - virtual DT_ShapeType getType() const { return CONVEX; } - - virtual MT_Scalar supportH(const MT_Vector3& v) const { return v.dot(support(v)); } - virtual MT_Point3 support(const MT_Vector3& v) const = 0; - virtual MT_BBox bbox() const; - virtual MT_BBox bbox(const MT_Matrix3x3& basis) const; - virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin = MT_Scalar(0.0)) const; - virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& param, MT_Vector3& normal) const; - -protected: - DT_Convex() {} -}; - - -bool intersect(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v); - -bool common_point(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - -MT_Scalar closest_points(const DT_Convex&, const DT_Convex&, MT_Scalar max_dist2, MT_Point3& pa, MT_Point3& pb); - -bool penetration_depth(const DT_Convex& a, const DT_Convex& b, MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - -bool hybrid_penetration_depth(const DT_Convex& a, MT_Scalar a_margin, - const DT_Convex& b, MT_Scalar b_margin, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - -#endif diff --git a/extern/solid/src/convex/DT_Cylinder.cpp b/extern/solid/src/convex/DT_Cylinder.cpp deleted file mode 100644 index cff5ebcefb1..00000000000 --- a/extern/solid/src/convex/DT_Cylinder.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Cylinder.h" - -MT_Point3 DT_Cylinder::support(const MT_Vector3& v) const -{ - MT_Scalar s = MT_sqrt(v[0] * v[0] + v[2] * v[2]); - if (s != MT_Scalar(0.0)) - { - MT_Scalar d = radius / s; - return MT_Point3(v[0] * d, v[1] < 0.0 ? -halfHeight : halfHeight, v[2] * d); - } - else - { - return MT_Point3(radius, v[1] < 0.0 ? -halfHeight : halfHeight, MT_Scalar(0.0)); - } -} - diff --git a/extern/solid/src/convex/DT_Cylinder.h b/extern/solid/src/convex/DT_Cylinder.h deleted file mode 100644 index 2a0c07fd579..00000000000 --- a/extern/solid/src/convex/DT_Cylinder.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_CYLINDER_H -#define DT_CYLINDER_H - -#include "DT_Convex.h" - -class DT_Cylinder : public DT_Convex { -public: - DT_Cylinder(MT_Scalar r, MT_Scalar h) : - radius(r), - halfHeight(h * MT_Scalar(0.5)) {} - - virtual MT_Point3 support(const MT_Vector3& v) const; - -protected: - MT_Scalar radius; - MT_Scalar halfHeight; -}; - -#endif diff --git a/extern/solid/src/convex/DT_Facet.cpp b/extern/solid/src/convex/DT_Facet.cpp deleted file mode 100644 index 87ae5c3e0be..00000000000 --- a/extern/solid/src/convex/DT_Facet.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Facet.h" - -bool DT_Facet::link(int edge0, DT_Facet *facet, int edge1) -{ - m_adjFacets[edge0] = facet; - m_adjEdges[edge0] = edge1; - facet->m_adjFacets[edge1] = this; - facet->m_adjEdges[edge1] = edge0; - - bool b = m_indices[edge0] == facet->m_indices[incMod3(edge1)] && - m_indices[incMod3(edge0)] == facet->m_indices[edge1]; - return b; -} - -bool DT_Facet::computeClosest(const MT_Vector3 *verts) -{ - const MT_Vector3& p0 = verts[m_indices[0]]; - - MT_Vector3 v1 = verts[m_indices[1]] - p0; - MT_Vector3 v2 = verts[m_indices[2]] - p0; - MT_Scalar v1dv1 = v1.length2(); - MT_Scalar v1dv2 = v1.dot(v2); - MT_Scalar v2dv2 = v2.length2(); - MT_Scalar p0dv1 = p0.dot(v1); - MT_Scalar p0dv2 = p0.dot(v2); - - m_det = v1dv1 * v2dv2 - v1dv2 * v1dv2; // non-negative - m_lambda1 = p0dv2 * v1dv2 - p0dv1 * v2dv2; - m_lambda2 = p0dv1 * v1dv2 - p0dv2 * v1dv1; - - if (m_det > MT_Scalar(0.0)) { - m_closest = p0 + (m_lambda1 * v1 + m_lambda2 * v2) / m_det; - m_dist2 = m_closest.length2(); - return true; - } - - return false; -} - -void DT_Facet::silhouette(int index, const MT_Vector3& w, - DT_EdgeBuffer& edgeBuffer) -{ - if (!m_obsolete) { - if (m_closest.dot(w) < m_dist2) { - edgeBuffer.push_back(DT_Edge(this, index)); - } - else { - m_obsolete = true; // Facet is visible - int next = incMod3(index); - m_adjFacets[next]->silhouette(m_adjEdges[next], w, edgeBuffer); - next = incMod3(next); - m_adjFacets[next]->silhouette(m_adjEdges[next], w, edgeBuffer); - } - } -} - - diff --git a/extern/solid/src/convex/DT_Facet.h b/extern/solid/src/convex/DT_Facet.h deleted file mode 100644 index 873706346b8..00000000000 --- a/extern/solid/src/convex/DT_Facet.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_FACET_H -#define DT_FACET_H - -#include <string.h> -#include <vector> - -#include <MT_Vector3.h> -#include <MT_Point3.h> - -class DT_Facet; - - -class DT_Edge { -public: - DT_Edge() {} - DT_Edge(DT_Facet *facet, int index) : - m_facet(facet), - m_index(index) {} - - DT_Facet *getFacet() const { return m_facet; } - int getIndex() const { return m_index; } - - int getSource() const; - int getTarget() const; - -private: - DT_Facet *m_facet; - int m_index; -}; - -typedef std::vector<DT_Edge> DT_EdgeBuffer; - - -class DT_Facet { -public: - DT_Facet() {} - DT_Facet(int i0, int i1, int i2) - : m_obsolete(false) - { - m_indices[0] = i0; - m_indices[1] = i1; - m_indices[2] = i2; - } - - int operator[](int i) const { return m_indices[i]; } - - bool link(int edge0, DT_Facet *facet, int edge1); - - - bool isObsolete() const { return m_obsolete; } - - - bool computeClosest(const MT_Vector3 *verts); - - const MT_Vector3& getClosest() const { return m_closest; } - - bool isClosestInternal() const - { - return m_lambda1 >= MT_Scalar(0.0) && - m_lambda2 >= MT_Scalar(0.0) && - m_lambda1 + m_lambda2 <= m_det; - } - - MT_Scalar getDist2() const { return m_dist2; } - - MT_Point3 getClosestPoint(const MT_Point3 *points) const - { - const MT_Point3& p0 = points[m_indices[0]]; - - return p0 + (m_lambda1 * (points[m_indices[1]] - p0) + - m_lambda2 * (points[m_indices[2]] - p0)) / m_det; - } - - void silhouette(const MT_Vector3& w, DT_EdgeBuffer& edgeBuffer) - { - edgeBuffer.clear(); - m_obsolete = true; - m_adjFacets[0]->silhouette(m_adjEdges[0], w, edgeBuffer); - m_adjFacets[1]->silhouette(m_adjEdges[1], w, edgeBuffer); - m_adjFacets[2]->silhouette(m_adjEdges[2], w, edgeBuffer); - } - -private: - void silhouette(int index, const MT_Vector3& w, DT_EdgeBuffer& edgeBuffer); - - int m_indices[3]; - bool m_obsolete; - DT_Facet *m_adjFacets[3]; - int m_adjEdges[3]; - - MT_Scalar m_det; - MT_Scalar m_lambda1; - MT_Scalar m_lambda2; - MT_Vector3 m_closest; - MT_Scalar m_dist2; -}; - - -inline int incMod3(int i) { return ++i % 3; } - -inline int DT_Edge::getSource() const -{ - return (*m_facet)[m_index]; -} - -inline int DT_Edge::getTarget() const -{ - return (*m_facet)[incMod3(m_index)]; -} - -#endif diff --git a/extern/solid/src/convex/DT_GJK.h b/extern/solid/src/convex/DT_GJK.h deleted file mode 100644 index d8f44acf85e..00000000000 --- a/extern/solid/src/convex/DT_GJK.h +++ /dev/null @@ -1,438 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_GJK_H -#define DT_GJK_H - -//#define USE_BACKUP_PROCEDURE -#define JOHNSON_ROBUST -#define FAST_CLOSEST - -#include "MT_Point3.h" -#include "MT_Vector3.h" -#include "GEN_MinMax.h" -#include "DT_Accuracy.h" - - -class DT_GJK { -private: - typedef unsigned int T_Bits; - inline static bool subseteq(T_Bits a, T_Bits b) { return (a & b) == a; } - inline static bool contains(T_Bits a, T_Bits b) { return (a & b) != 0x0; } - -public: - DT_GJK() : - m_bits(0x0), - m_all_bits(0x0) - {} - - bool emptySimplex() const { return m_bits == 0x0; } - bool fullSimplex() const { return m_bits == 0xf; } - - void reset() - { - m_bits = 0x0; - m_all_bits = 0x0; - } - - bool inSimplex(const MT_Vector3& w) - { - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(m_all_bits, bit) && w == m_y[i]) - { - return true; - } - } - return false; - } - - void addVertex(const MT_Vector3& w) - { - assert(!fullSimplex()); - m_last = 0; - m_last_bit = 0x1; - while (contains(m_bits, m_last_bit)) - { - ++m_last; - m_last_bit <<= 1; - } - m_y[m_last] = w; - m_ylen2[m_last] = w.length2(); - m_all_bits = m_bits | m_last_bit; - - update_cache(); - compute_det(); - } - - void addVertex(const MT_Vector3& w, const MT_Point3& p, const MT_Point3& q) - { - addVertex(w); - m_p[m_last] = p; - m_q[m_last] = q; - } - - int getSimplex(MT_Point3 *pBuf, MT_Point3 *qBuf, MT_Vector3 *yBuf) const - { - int num_verts = 0; - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(m_bits, bit)) - { - pBuf[num_verts] = m_p[i]; - qBuf[num_verts] = m_q[i]; - yBuf[num_verts] = m_y[i]; - -#ifdef DEBUG - std::cout << "Point " << i << " = " << m_y[i] << std::endl; -#endif - - ++num_verts; - } - } - return num_verts; - } - - void compute_points(MT_Point3& p1, MT_Point3& p2) - { - MT_Scalar sum = MT_Scalar(0.0); - p1.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - p2.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(m_bits, bit)) - { - sum += m_det[m_bits][i]; - p1 += m_p[i] * m_det[m_bits][i]; - p2 += m_q[i] * m_det[m_bits][i]; - } - } - - assert(sum > MT_Scalar(0.0)); - MT_Scalar s = MT_Scalar(1.0) / sum; - p1 *= s; - p2 *= s; - } - - bool closest(MT_Vector3& v) - { -#ifdef FAST_CLOSEST - T_Bits s; - for (s = m_bits; s != 0x0; --s) - { - if (subseteq(s, m_bits) && valid(s | m_last_bit)) - { - m_bits = s | m_last_bit; - compute_vector(m_bits, v); - return true; - } - } - if (valid(m_last_bit)) - { - m_bits = m_last_bit; - m_maxlen2 = m_ylen2[m_last]; - v = m_y[m_last]; - return true; - } -#else - T_Bits s; - for (s = m_all_bits; s != 0x0; --s) - { - if (subseteq(s, m_all_bits) && valid(s)) - { - m_bits = s; - compute_vector(m_bits, v); - return true; - } - } -#endif - - // Original GJK calls the backup procedure at this point. -#ifdef USE_BACKUP_PROCEDURE - backup_closest(MT_Vector3& v); -#endif - return false; - } - - void backup_closest(MT_Vector3& v) - { - MT_Scalar min_dist2 = MT_INFINITY; - - T_Bits s; - for (s = m_all_bits; s != 0x0; --s) - { - if (subseteq(s, m_all_bits) && proper(s)) - { - MT_Vector3 u; - compute_vector(s, u); - MT_Scalar dist2 = u.length2(); - if (dist2 < min_dist2) - { - min_dist2 = dist2; - m_bits = s; - v = u; - } - } - } - } - - MT_Scalar maxVertex() { return m_maxlen2; } - - -private: - void update_cache(); - void compute_det(); - - bool valid(T_Bits s) - { - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(m_all_bits, bit)) - { - if (contains(s, bit)) - { - if (m_det[s][i] <= MT_Scalar(0.0)) - { - return false; - } - } - else if (m_det[s | bit][i] > MT_Scalar(0.0)) - { - return false; - } - } - } - return true; - } - - bool proper(T_Bits s) - { - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(s, bit) && m_det[s][i] <= MT_Scalar(0.0)) - { - return false; - } - } - return true; - } - - void compute_vector(T_Bits s, MT_Vector3& v) - { - m_maxlen2 = MT_Scalar(0.0); - MT_Scalar sum = MT_Scalar(0.0); - v .setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(s, bit)) - { - sum += m_det[s][i]; - GEN_set_max(m_maxlen2, m_ylen2[i]); - v += m_y[i] * m_det[s][i]; - } - } - - assert(sum > MT_Scalar(0.0)); - - v /= sum; - } - -private: - MT_Scalar m_det[16][4]; // cached sub-determinants - MT_Vector3 m_edge[4][4]; - -#ifdef JOHNSON_ROBUST - MT_Scalar m_norm[4][4]; -#endif - - MT_Point3 m_p[4]; // support points of object A in local coordinates - MT_Point3 m_q[4]; // support points of object B in local coordinates - MT_Vector3 m_y[4]; // support points of A - B in world coordinates - MT_Scalar m_ylen2[4]; // Squared lengths support points y - - MT_Scalar m_maxlen2; // Maximum squared length to a vertex of the current - // simplex - T_Bits m_bits; // identifies current simplex - T_Bits m_last; // identifies last found support point - T_Bits m_last_bit; // m_last_bit == 0x1 << last - T_Bits m_all_bits; // m_all_bits == m_bits | m_last_bit -}; - - - - -inline void DT_GJK::update_cache() -{ - int i; - T_Bits bit; - for (i = 0, bit = 0x1; i < 4; ++i, bit <<= 1) - { - if (contains(m_bits, bit)) - { - m_edge[i][m_last] = m_y[i] - m_y[m_last]; - m_edge[m_last][i] = -m_edge[i][m_last]; - -#ifdef JOHNSON_ROBUST - m_norm[i][m_last] = m_norm[m_last][i] = m_edge[i][m_last].length2(); -#endif - - } - } -} - -#ifdef JOHNSON_ROBUST - -inline void DT_GJK::compute_det() -{ - m_det[m_last_bit][m_last] = 1; - - int i; - T_Bits si; - for (i = 0, si = 0x1; i < 4; ++i, si <<= 1) - { - if (contains(m_bits, si)) - { - T_Bits s2 = si | m_last_bit; - m_det[s2][i] = m_edge[m_last][i].dot(m_y[m_last]); - m_det[s2][m_last] = m_edge[i][m_last].dot(m_y[i]); - - int j; - T_Bits sj; - for (j = 0, sj = 0x1; j < i; ++j, sj <<= 1) - { - if (contains(m_bits, sj)) - { - int k; - T_Bits s3 = sj | s2; - - k = m_norm[i][j] < m_norm[m_last][j] ? i : m_last; - m_det[s3][j] = m_det[s2][i] * m_edge[k][j].dot(m_y[i]) + - m_det[s2][m_last] * m_edge[k][j].dot(m_y[m_last]); - k = m_norm[j][i] < m_norm[m_last][i] ? j : m_last; - m_det[s3][i] = m_det[sj|m_last_bit][j] * m_edge[k][i].dot(m_y[j]) + - m_det[sj|m_last_bit][m_last] * m_edge[k][i].dot(m_y[m_last]); - k = m_norm[i][m_last] < m_norm[j][m_last] ? i : j; - m_det[s3][m_last] = m_det[sj|si][j] * m_edge[k][m_last].dot(m_y[j]) + - m_det[sj|si][i] * m_edge[k][m_last].dot(m_y[i]); - } - } - } - } - - if (m_all_bits == 0xf) - { - int k; - - k = m_norm[1][0] < m_norm[2][0] ? (m_norm[1][0] < m_norm[3][0] ? 1 : 3) : (m_norm[2][0] < m_norm[3][0] ? 2 : 3); - - m_det[0xf][0] = m_det[0xe][1] * m_edge[k][0].dot(m_y[1]) + - m_det[0xe][2] * m_edge[k][0].dot(m_y[2]) + - m_det[0xe][3] * m_edge[k][0].dot(m_y[3]); - - k = m_norm[0][1] < m_norm[2][1] ? (m_norm[0][1] < m_norm[3][1] ? 0 : 3) : (m_norm[2][1] < m_norm[3][1] ? 2 : 3); - - m_det[0xf][1] = m_det[0xd][0] * m_edge[k][1].dot(m_y[0]) + - m_det[0xd][2] * m_edge[k][1].dot(m_y[2]) + - m_det[0xd][3] * m_edge[k][1].dot(m_y[3]); - - k = m_norm[0][2] < m_norm[1][2] ? (m_norm[0][2] < m_norm[3][2] ? 0 : 3) : (m_norm[1][2] < m_norm[3][2] ? 1 : 3); - - m_det[0xf][2] = m_det[0xb][0] * m_edge[k][2].dot(m_y[0]) + - m_det[0xb][1] * m_edge[k][2].dot(m_y[1]) + - m_det[0xb][3] * m_edge[k][2].dot(m_y[3]); - - k = m_norm[0][3] < m_norm[1][3] ? (m_norm[0][3] < m_norm[2][3] ? 0 : 2) : (m_norm[1][3] < m_norm[2][3] ? 1 : 2); - - m_det[0xf][3] = m_det[0x7][0] * m_edge[k][3].dot(m_y[0]) + - m_det[0x7][1] * m_edge[k][3].dot(m_y[1]) + - m_det[0x7][2] * m_edge[k][3].dot(m_y[2]); - } -} - -#else - -inline void DT_GJK::compute_det() -{ - m_det[m_last_bit][m_last] = 1; - - int i; - T_Bits si; - for (i = 0, si = 0x1; i < 4; ++i, si <<= 1) - { - if (contains(m_bits, si)) - { - T_Bits s2 = si | m_last_bit; - m_det[s2][i] = m_edge[m_last][i].dot(m_y[m_last]); - m_det[s2][m_last] = m_edge[i][m_last].dot(m_y[i]); - - int j; - T_Bits sj; - for (j = 0, sj = 0x1; j < i; ++j, sj <<= 1) - { - if (contains(m_bits, sj)) - { - T_Bits s3 = sj | s2; - m_det[s3][j] = m_det[s2][i] * m_edge[i][j].dot(m_y[i]) + - m_det[s2][m_last] * m_edge[i][j].dot(m_y[m_last]); - m_det[s3][i] = m_det[sj|m_last_bit][j] * m_edge[j][i].dot(m_y[j]) + - m_det[sj|m_last_bit][m_last] * m_edge[j][i].dot(m_y[m_last]); - m_det[s3][m_last] = m_det[sj|si][j] * m_edge[j][m_last].dot(m_y[j]) + - m_det[sj|si][i] * m_edge[j][m_last].dot(m_y[i]); - } - } - } - } - - if (m_all_bits == 0xf) - { - m_det[0xf][0] = m_det[0xe][1] * m_edge[1][0].dot(m_y[1]) + - m_det[0xe][2] * m_edge[1][0].dot(m_y[2]) + - m_det[0xe][3] * m_edge[1][0].dot(m_y[3]); - m_det[0xf][1] = m_det[0xd][0] * m_edge[0][1].dot(m_y[0]) + - m_det[0xd][2] * m_edge[0][1].dot(m_y[2]) + - m_det[0xd][3] * m_edge[0][1].dot(m_y[3]); - m_det[0xf][2] = m_det[0xb][0] * m_edge[0][2].dot(m_y[0]) + - m_det[0xb][1] * m_edge[0][2].dot(m_y[1]) + - m_det[0xb][3] * m_edge[0][2].dot(m_y[3]); - m_det[0xf][3] = m_det[0x7][0] * m_edge[0][3].dot(m_y[0]) + - m_det[0x7][1] * m_edge[0][3].dot(m_y[1]) + - m_det[0x7][2] * m_edge[0][3].dot(m_y[2]); - } -} - -#endif - -#endif diff --git a/extern/solid/src/convex/DT_Hull.h b/extern/solid/src/convex/DT_Hull.h deleted file mode 100644 index a5bf56ae59d..00000000000 --- a/extern/solid/src/convex/DT_Hull.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_HULL_H -#define DT_HULL_H - -#include "DT_Convex.h" - -class DT_Hull : public DT_Convex { -public: - DT_Hull(const DT_Convex& lchild, const DT_Convex& rchild) : - m_lchild(lchild), - m_rchild(rchild) - {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const - { - return GEN_max(m_lchild.supportH(v), m_rchild.supportH(v)); - } - - virtual MT_Point3 support(const MT_Vector3& v) const - { - MT_Point3 lpnt = m_lchild.support(v); - MT_Point3 rpnt = m_rchild.support(v); - return v.dot(lpnt) > v.dot(rpnt) ? lpnt : rpnt; - } - -private: - const DT_Convex& m_lchild; - const DT_Convex& m_rchild; -}; - -#endif diff --git a/extern/solid/src/convex/DT_IndexArray.h b/extern/solid/src/convex/DT_IndexArray.h deleted file mode 100644 index 95551fa8483..00000000000 --- a/extern/solid/src/convex/DT_IndexArray.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_INDEXARRAY_H -#define DT_INDEXARRAY_H - -#include "SOLID_types.h" -#include "DT_Array.h" - -typedef DT_Array<DT_Index, DT_Count> DT_IndexArray; - -#endif - diff --git a/extern/solid/src/convex/DT_LineSegment.cpp b/extern/solid/src/convex/DT_LineSegment.cpp deleted file mode 100644 index 6c7ccf6b9b7..00000000000 --- a/extern/solid/src/convex/DT_LineSegment.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_LineSegment.h" - -MT_Scalar DT_LineSegment::supportH(const MT_Vector3& v) const -{ - return GEN_max(v.dot(m_source), v.dot(m_target)); -} - -MT_Point3 DT_LineSegment::support(const MT_Vector3& v) const -{ - return v.dot(m_source) > v.dot(m_target) ? m_source : m_target; -} - - diff --git a/extern/solid/src/convex/DT_LineSegment.h b/extern/solid/src/convex/DT_LineSegment.h deleted file mode 100644 index 979ff8a18a9..00000000000 --- a/extern/solid/src/convex/DT_LineSegment.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_LINESEGMENT_H -#define DT_LINESEGMENT_H - -#include "DT_Convex.h" - -class DT_LineSegment : public DT_Convex { -public: - DT_LineSegment(const MT_Point3& source, const MT_Point3& target) : - m_source(source), - m_target(target) {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - - const MT_Point3& getSource() const { return m_source; } - const MT_Point3& getTarget() const { return m_target; } - -private: - MT_Point3 m_source; - MT_Point3 m_target; -}; - -#endif - - - - - - diff --git a/extern/solid/src/convex/DT_Minkowski.h b/extern/solid/src/convex/DT_Minkowski.h deleted file mode 100644 index e90fed6a8e0..00000000000 --- a/extern/solid/src/convex/DT_Minkowski.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_MINKOWSKI_H -#define DT_MINKOWSKI_H - -#include "DT_Convex.h" - -class DT_Minkowski : public DT_Convex { -public: - DT_Minkowski(const DT_Convex& lchild, const DT_Convex& rchild) - : m_lchild(lchild), - m_rchild(rchild) - {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const - { - return m_lchild.supportH(v) + m_rchild.supportH(v); - } - - virtual MT_Point3 support(const MT_Vector3& v) const - { - return m_lchild.support(v) + (MT_Vector3)m_rchild.support(v); - } - -private: - const DT_Convex& m_lchild; - const DT_Convex& m_rchild; -}; - -#endif diff --git a/extern/solid/src/convex/DT_PenDepth.cpp b/extern/solid/src/convex/DT_PenDepth.cpp deleted file mode 100644 index e1c5c9a3949..00000000000 --- a/extern/solid/src/convex/DT_PenDepth.cpp +++ /dev/null @@ -1,376 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_PenDepth.h" - -#include "MT_Vector3.h" -#include "MT_Point3.h" -#include "MT_Quaternion.h" -#include "DT_Convex.h" -#include "DT_GJK.h" -#include "DT_Facet.h" - -//#define DEBUG - -const int MaxSupportPoints = 1000; -const int MaxFacets = 2000; - -static MT_Point3 pBuf[MaxSupportPoints]; -static MT_Point3 qBuf[MaxSupportPoints]; -static MT_Vector3 yBuf[MaxSupportPoints]; - -static DT_Facet facetBuf[MaxFacets]; -static int freeFacet = 0; -static DT_Facet *facetHeap[MaxFacets]; -static int num_facets; - -class DT_FacetComp { -public: - - bool operator()(const DT_Facet *face1, const DT_Facet *face2) - { - return face1->getDist2() > face2->getDist2(); - } - -} facetComp; - -inline DT_Facet *addFacet(int i0, int i1, int i2, - MT_Scalar lower2, MT_Scalar upper2) -{ - assert(i0 != i1 && i0 != i2 && i1 != i2); - if (freeFacet < MaxFacets) - { - DT_Facet *facet = new(&facetBuf[freeFacet++]) DT_Facet(i0, i1, i2); -#ifdef DEBUG - std::cout << "Facet " << i0 << ' ' << i1 << ' ' << i2; -#endif - if (facet->computeClosest(yBuf)) - { - if (facet->isClosestInternal() && - lower2 <= facet->getDist2() && facet->getDist2() <= upper2) - { - facetHeap[num_facets++] = facet; - std::push_heap(&facetHeap[0], &facetHeap[num_facets], facetComp); -#ifdef DEBUG - std::cout << " accepted" << std::endl; -#endif - } - else - { -#ifdef DEBUG - std::cout << " rejected, "; - if (!facet->isClosestInternal()) - { - std::cout << "closest point not internal"; - } - else if (lower2 > facet->getDist2()) - { - std::cout << "facet is closer than orignal facet"; - } - else - { - std::cout << "facet is further than upper bound"; - } - std::cout << std::endl; -#endif - } - - return facet; - } - } - - return 0; -} - -inline bool originInTetrahedron(const MT_Vector3& p1, const MT_Vector3& p2, - const MT_Vector3& p3, const MT_Vector3& p4) -{ - MT_Vector3 normal1 = (p2 - p1).cross(p3 - p1); - MT_Vector3 normal2 = (p3 - p2).cross(p4 - p2); - MT_Vector3 normal3 = (p4 - p3).cross(p1 - p3); - MT_Vector3 normal4 = (p1 - p4).cross(p2 - p4); - - return - normal1.dot(p1) > MT_Scalar(0.0) != normal1.dot(p4) > MT_Scalar(0.0) && - normal2.dot(p2) > MT_Scalar(0.0) != normal2.dot(p1) > MT_Scalar(0.0) && - normal3.dot(p3) > MT_Scalar(0.0) != normal3.dot(p2) > MT_Scalar(0.0) && - normal4.dot(p4) > MT_Scalar(0.0) != normal4.dot(p3) > MT_Scalar(0.0); -} - - -bool penDepth(const DT_GJK& gjk, const DT_Convex& a, const DT_Convex& b, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb) -{ - - int num_verts = gjk.getSimplex(pBuf, qBuf, yBuf); - - switch (num_verts) - { - case 1: - // Touching contact. Yes, we have a collision, - // but no penetration. - return false; - case 2: - { - // We have a line segment inside the Minkowski sum containing the - // origin. Blow it up by adding three additional support points. - - MT_Vector3 dir = (yBuf[1] - yBuf[0]).normalized(); - int axis = dir.furthestAxis(); - - static MT_Scalar sin_60 = MT_sqrt(MT_Scalar(3.0)) * MT_Scalar(0.5); - - MT_Quaternion rot(dir[0] * sin_60, dir[1] * sin_60, dir[2] * sin_60, MT_Scalar(0.5)); - MT_Matrix3x3 rot_mat(rot); - - MT_Vector3 aux1 = dir.cross(MT_Vector3(axis == 0, axis == 1, axis == 2)); - MT_Vector3 aux2 = rot_mat * aux1; - MT_Vector3 aux3 = rot_mat * aux2; - - pBuf[2] = a.support(aux1); - qBuf[2] = b.support(-aux1); - yBuf[2] = pBuf[2] - qBuf[2]; - - pBuf[3] = a.support(aux2); - qBuf[3] = b.support(-aux2); - yBuf[3] = pBuf[3] - qBuf[3]; - - pBuf[4] = a.support(aux3); - qBuf[4] = b.support(-aux3); - yBuf[4] = pBuf[4] - qBuf[4]; - - if (originInTetrahedron(yBuf[0], yBuf[2], yBuf[3], yBuf[4])) - { - pBuf[1] = pBuf[4]; - qBuf[1] = qBuf[4]; - yBuf[1] = yBuf[4]; - } - else if (originInTetrahedron(yBuf[1], yBuf[2], yBuf[3], yBuf[4])) - { - pBuf[0] = pBuf[4]; - qBuf[0] = qBuf[4]; - yBuf[0] = yBuf[4]; - } - else - { - // Origin not in initial polytope - return false; - } - - num_verts = 4; - - break; - } - case 3: - { - // We have a triangle inside the Minkowski sum containing - // the origin. First blow it up. - - MT_Vector3 v1 = yBuf[1] - yBuf[0]; - MT_Vector3 v2 = yBuf[2] - yBuf[0]; - MT_Vector3 vv = v1.cross(v2); - - pBuf[3] = a.support(vv); - qBuf[3] = b.support(-vv); - yBuf[3] = pBuf[3] - qBuf[3]; - pBuf[4] = a.support(-vv); - qBuf[4] = b.support(vv); - yBuf[4] = pBuf[4] - qBuf[4]; - - - if (originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[4])) - { - pBuf[3] = pBuf[4]; - qBuf[3] = qBuf[4]; - yBuf[3] = yBuf[4]; - } - else if (!originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[3])) - { - // Origin not in initial polytope - return false; - } - - num_verts = 4; - - break; - } - } - - // We have a tetrahedron inside the Minkowski sum containing - // the origin (if GJK did it's job right ;-) - - - if (!originInTetrahedron(yBuf[0], yBuf[1], yBuf[2], yBuf[3])) - { - // assert(false); - return false; - } - - num_facets = 0; - freeFacet = 0; - - DT_Facet *f0 = addFacet(0, 1, 2, MT_Scalar(0.0), MT_INFINITY); - DT_Facet *f1 = addFacet(0, 3, 1, MT_Scalar(0.0), MT_INFINITY); - DT_Facet *f2 = addFacet(0, 2, 3, MT_Scalar(0.0), MT_INFINITY); - DT_Facet *f3 = addFacet(1, 3, 2, MT_Scalar(0.0), MT_INFINITY); - - if (!f0 || f0->getDist2() == MT_Scalar(0.0) || - !f1 || f1->getDist2() == MT_Scalar(0.0) || - !f2 || f2->getDist2() == MT_Scalar(0.0) || - !f3 || f3->getDist2() == MT_Scalar(0.0)) - { - return false; - } - - f0->link(0, f1, 2); - f0->link(1, f3, 2); - f0->link(2, f2, 0); - f1->link(0, f2, 2); - f1->link(1, f3, 0); - f2->link(1, f3, 1); - - if (num_facets == 0) - { - return false; - } - - // at least one facet on the heap. - - DT_EdgeBuffer edgeBuffer(20); - - DT_Facet *facet = 0; - - MT_Scalar upper_bound2 = MT_INFINITY; - - do { - facet = facetHeap[0]; - std::pop_heap(&facetHeap[0], &facetHeap[num_facets], facetComp); - --num_facets; - - if (!facet->isObsolete()) - { - assert(facet->getDist2() > MT_Scalar(0.0)); - - if (num_verts == MaxSupportPoints) - { -#ifdef DEBUG - std::cout << "Ouch, no convergence!!!" << std::endl; -#endif - assert(false); - break; - } - - pBuf[num_verts] = a.support(facet->getClosest()); - qBuf[num_verts] = b.support(-facet->getClosest()); - yBuf[num_verts] = pBuf[num_verts] - qBuf[num_verts]; - - int index = num_verts++; - MT_Scalar far_dist2 = yBuf[index].dot(facet->getClosest()); - - // Make sure the support mapping is OK. - assert(far_dist2 > MT_Scalar(0.0)); - - GEN_set_min(upper_bound2, far_dist2 * far_dist2 / facet->getDist2()); - - if (upper_bound2 <= DT_Accuracy::depth_tolerance * facet->getDist2() -#define CHECK_NEW_SUPPORT -#ifdef CHECK_NEW_SUPPORT - || yBuf[index] == yBuf[(*facet)[0]] - || yBuf[index] == yBuf[(*facet)[1]] - || yBuf[index] == yBuf[(*facet)[2]] -#endif - ) - { - break; - } - - // Compute the silhouette cast by the new vertex - // Note that the new vertex is on the positive side - // of the current facet, so the current facet is will - // not be in the convex hull. Start local search - // from this facet. - - facet->silhouette(yBuf[index], edgeBuffer); - - if (edgeBuffer.empty()) - { - return false; - } - - DT_EdgeBuffer::const_iterator it = edgeBuffer.begin(); - DT_Facet *firstFacet = - addFacet((*it).getTarget(), (*it).getSource(), - index, facet->getDist2(), upper_bound2); - - if (!firstFacet) - { - break; - } - - firstFacet->link(0, (*it).getFacet(), (*it).getIndex()); - DT_Facet *lastFacet = firstFacet; - - ++it; - for (; it != edgeBuffer.end(); ++it) - { - DT_Facet *newFacet = - addFacet((*it).getTarget(), (*it).getSource(), - index, facet->getDist2(), upper_bound2); - - if (!newFacet) - { - break; - } - - if (!newFacet->link(0, (*it).getFacet(), (*it).getIndex())) - { - break; - } - - if (!newFacet->link(2, lastFacet, 1)) - { - break; - } - - lastFacet = newFacet; - } - if (it != edgeBuffer.end()) - { - break; - } - - firstFacet->link(2, lastFacet, 1); - } - } - while (num_facets > 0 && facetHeap[0]->getDist2() <= upper_bound2); - -#ifdef DEBUG - std::cout << "#facets left = " << num_facets << std::endl; -#endif - - v = facet->getClosest(); - pa = facet->getClosestPoint(pBuf); - pb = facet->getClosestPoint(qBuf); - return true; -} - diff --git a/extern/solid/src/convex/DT_PenDepth.h b/extern/solid/src/convex/DT_PenDepth.h deleted file mode 100644 index 97b3c6c0e0e..00000000000 --- a/extern/solid/src/convex/DT_PenDepth.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_PENDEPTH_H -#define DT_PENDEPTH_H - -#include "MT_Vector3.h" -#include "MT_Point3.h" - -class DT_GJK; -class DT_Convex; - -bool penDepth(const DT_GJK& gjk, const DT_Convex& a, const DT_Convex& b, - MT_Vector3& v, MT_Point3& pa, MT_Point3& pb); - -#endif diff --git a/extern/solid/src/convex/DT_Point.cpp b/extern/solid/src/convex/DT_Point.cpp deleted file mode 100644 index 770fe7775b7..00000000000 --- a/extern/solid/src/convex/DT_Point.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Point.h" - -MT_Scalar DT_Point::supportH(const MT_Vector3& v) const -{ - return v.dot(m_point); -} - -MT_Point3 DT_Point::support(const MT_Vector3& v) const -{ - return m_point; -} - - diff --git a/extern/solid/src/convex/DT_Point.h b/extern/solid/src/convex/DT_Point.h deleted file mode 100644 index b35d158ee53..00000000000 --- a/extern/solid/src/convex/DT_Point.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_POINT_H -#define DT_POINT_H - -#include "DT_Convex.h" - -class DT_Point : public DT_Convex { -public: - DT_Point(const MT_Point3& point) : m_point(point) {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - -private: - MT_Point3 m_point; -}; - -#endif - - - - - - diff --git a/extern/solid/src/convex/DT_Polyhedron.cpp b/extern/solid/src/convex/DT_Polyhedron.cpp deleted file mode 100644 index f48ac6e4b6d..00000000000 --- a/extern/solid/src/convex/DT_Polyhedron.cpp +++ /dev/null @@ -1,415 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Polyhedron.h" - -#ifdef QHULL - -extern "C" { -#include <qhull/qhull_a.h> -} - -#include <vector> -#include <new> - -typedef std::vector<MT_Point3> T_VertexBuf; -typedef std::vector<DT_Index> T_IndexBuf; -typedef std::vector<T_IndexBuf> T_MultiIndexBuf; - -static char options[] = "qhull Qts i Tv"; - -#define DK_HIERARCHY - -T_IndexBuf *adjacency_graph(DT_Count count, const MT_Point3 *verts, const char *flags) -{ - int curlong, totlong, exitcode; - - facetT *facet; - vertexT *vertex; - vertexT **vertexp; - - std::vector<MT::Tuple3<coordT> > array; - T_IndexBuf index; - DT_Index i; - for (i = 0; i != count; ++i) - { - if (flags == 0 || flags[i]) - { - array.push_back(MT::Tuple3<coordT>(verts[i])); - index.push_back(i); - } - } - - qh_init_A(stdin, stdout, stderr, 0, NULL); - if ((exitcode = setjmp(qh errexit))) - { - exit(exitcode); - } - qh_initflags(options); - qh_init_B(array[0], array.size(), 3, False); - qh_qhull(); - qh_check_output(); - - T_IndexBuf *indexBuf = new T_IndexBuf[count]; - FORALLfacets - { - setT *vertices = qh_facet3vertex(facet); - - T_IndexBuf facetIndices; - - FOREACHvertex_(vertices) - { - facetIndices.push_back(index[qh_pointid(vertex->point)]); - } - int i, j; - for (i = 0, j = facetIndices.size()-1; i < (int)facetIndices.size(); j = i++) - { - indexBuf[facetIndices[j]].push_back(facetIndices[i]); - } - } - - - qh NOerrexit = True; - qh_freeqhull(!qh_ALL); - qh_memfreeshort(&curlong, &totlong); - - return indexBuf; -} - -T_IndexBuf *simplex_adjacency_graph(DT_Count count, const char *flags) -{ - T_IndexBuf *indexBuf = new T_IndexBuf[count]; - - DT_Index index[4]; - - DT_Index k = 0; - DT_Index i; - for (i = 0; i != count; ++i) - { - if (flags == 0 || flags[i]) - { - index[k++] = i; - } - } - - assert(k <= 4); - - for (i = 0; i != k; ++i) - { - DT_Index j; - for (j = 0; j != k; ++j) - { - if (i != j) - { - indexBuf[index[i]].push_back(index[j]); - } - } - } - - return indexBuf; -} - -#ifdef DK_HIERARCHY - -void prune(DT_Count count, T_MultiIndexBuf *cobound) -{ - DT_Index i; - for (i = 0; i != count; ++i) - { - assert(cobound[i].size()); - - DT_Index j; - for (j = 0; j != cobound[i].size() - 1; ++j) - { - T_IndexBuf::iterator it = cobound[i][j].begin(); - while (it != cobound[i][j].end()) - { - T_IndexBuf::iterator jt = - std::find(cobound[i][j+1].begin(), cobound[i][j+1].end(), *it); - - if (jt != cobound[i][j+1].end()) - { - std::swap(*it, cobound[i][j].back()); - cobound[i][j].pop_back(); - } - else - { - ++it; - } - } - } - } -} - -#endif - -DT_Polyhedron::DT_Polyhedron(const DT_VertexBase *base, DT_Count count, const DT_Index *indices) -{ - assert(count); - - std::vector<MT_Point3> vertexBuf; - DT_Index i; - for (i = 0; i != count; ++i) - { - vertexBuf.push_back((*base)[indices[i]]); - } - - T_IndexBuf *indexBuf = count > 4 ? adjacency_graph(count, &vertexBuf[0], 0) : simplex_adjacency_graph(count, 0); - - std::vector<MT_Point3> pointBuf; - - for (i = 0; i != count; ++i) - { - if (!indexBuf[i].empty()) - { - pointBuf.push_back(vertexBuf[i]); - } - } - - delete [] indexBuf; - - m_count = pointBuf.size(); - m_verts = new MT_Point3[m_count]; - std::copy(pointBuf.begin(), pointBuf.end(), &m_verts[0]); - - T_MultiIndexBuf *cobound = new T_MultiIndexBuf[m_count]; - char *flags = new char[m_count]; - std::fill(&flags[0], &flags[m_count], 1); - - DT_Count num_layers = 0; - DT_Count layer_count = m_count; - while (layer_count > 4) - { - T_IndexBuf *indexBuf = adjacency_graph(m_count, m_verts, flags); - - DT_Index i; - for (i = 0; i != m_count; ++i) - { - if (flags[i]) - { - assert(!indexBuf[i].empty()); - cobound[i].push_back(indexBuf[i]); - } - } - - ++num_layers; - - delete [] indexBuf; - - std::fill(&flags[0], &flags[m_count], 0); - - for (i = 0; i != m_count; ++i) - { - if (cobound[i].size() == num_layers) - { - T_IndexBuf& curr_cobound = cobound[i].back(); - if (!flags[i] && curr_cobound.size() <= 8) - { - DT_Index j; - for (j = 0; j != curr_cobound.size(); ++j) - { - flags[curr_cobound[j]] = 1; - } - } - } - } - - layer_count = 0; - - for (i = 0; i != m_count; ++i) - { - if (flags[i]) - { - ++layer_count; - } - } - } - - indexBuf = simplex_adjacency_graph(m_count, flags); - - for (i = 0; i != m_count; ++i) - { - if (flags[i]) - { - assert(!indexBuf[i].empty()); - cobound[i].push_back(indexBuf[i]); - } - } - - ++num_layers; - - delete [] indexBuf; - delete [] flags; - - - -#ifdef DK_HIERARCHY - prune(m_count, cobound); -#endif - - m_cobound = new T_MultiIndexArray[m_count]; - - for (i = 0; i != m_count; ++i) - { - new (&m_cobound[i]) T_MultiIndexArray(cobound[i].size()); - - DT_Index j; - for (j = 0; j != cobound[i].size(); ++j) - { - new (&m_cobound[i][j]) DT_IndexArray(cobound[i][j].size(), &cobound[i][j][0]); - } - } - - delete [] cobound; - - m_start_vertex = 0; - while (m_cobound[m_start_vertex].size() != num_layers) - { - ++m_start_vertex; - assert(m_start_vertex < m_count); - } - - m_curr_vertex = m_start_vertex; -} - - -DT_Polyhedron::~DT_Polyhedron() -{ - delete [] m_verts; - delete [] m_cobound; -} - -#ifdef DK_HIERARCHY - -MT_Scalar DT_Polyhedron::supportH(const MT_Vector3& v) const -{ - m_curr_vertex = m_start_vertex; - MT_Scalar d = (*this)[m_curr_vertex].dot(v); - MT_Scalar h = d; - int curr_layer; - for (curr_layer = m_cobound[m_start_vertex].size(); curr_layer != 0; --curr_layer) - { - const DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][curr_layer-1]; - DT_Index i; - for (i = 0; i != curr_cobound.size(); ++i) - { - d = (*this)[curr_cobound[i]].dot(v); - if (d > h) - { - m_curr_vertex = curr_cobound[i]; - h = d; - } - } - } - - return h; -} - -MT_Point3 DT_Polyhedron::support(const MT_Vector3& v) const -{ - m_curr_vertex = m_start_vertex; - MT_Scalar d = (*this)[m_curr_vertex].dot(v); - MT_Scalar h = d; - int curr_layer; - for (curr_layer = m_cobound[m_start_vertex].size(); curr_layer != 0; --curr_layer) - { - const DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][curr_layer-1]; - DT_Index i; - for (i = 0; i != curr_cobound.size(); ++i) - { - d = (*this)[curr_cobound[i]].dot(v); - if (d > h) - { - m_curr_vertex = curr_cobound[i]; - h = d; - } - } - } - - return (*this)[m_curr_vertex]; -} - -#else - -MT_Scalar DT_Polyhedron::supportH(const MT_Vector3& v) const -{ - int last_vertex = -1; - MT_Scalar d = (*this)[m_curr_vertex].dot(v); - MT_Scalar h = d; - - for (;;) - { - DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][0]; - int i = 0, n = curr_cobound.size(); - while (i != n && - (curr_cobound[i] == last_vertex || - (d = (*this)[curr_cobound[i]].dot(v)) - h <= MT_abs(h) * MT_EPSILON)) - { - ++i; - } - - if (i == n) - { - break; - } - - last_vertex = m_curr_vertex; - m_curr_vertex = curr_cobound[i]; - h = d; - } - return h; -} - -MT_Point3 DT_Polyhedron::support(const MT_Vector3& v) const -{ - int last_vertex = -1; - MT_Scalar d = (*this)[m_curr_vertex].dot(v); - MT_Scalar h = d; - - for (;;) - { - DT_IndexArray& curr_cobound = m_cobound[m_curr_vertex][0]; - int i = 0, n = curr_cobound.size(); - while (i != n && - (curr_cobound[i] == last_vertex || - (d = (*this)[curr_cobound[i]].dot(v)) - h <= MT_abs(h) * MT_EPSILON)) - { - ++i; - } - - if (i == n) - { - break; - } - - last_vertex = m_curr_vertex; - m_curr_vertex = curr_cobound[i]; - h = d; - } - return (*this)[m_curr_vertex]; -} - -#endif - -#endif - diff --git a/extern/solid/src/convex/DT_Polyhedron.h b/extern/solid/src/convex/DT_Polyhedron.h deleted file mode 100644 index 58c991bd152..00000000000 --- a/extern/solid/src/convex/DT_Polyhedron.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_POLYHEDRON_H -#define DT_POLYHEDRON_H - -#ifdef HAVE_CONFIG_H -# include "config.h" -# if HAVE_QHULL_QHULL_A_H -# define QHULL -# endif -#endif - - -#ifdef QHULL - -#include "DT_Convex.h" -#include "DT_IndexArray.h" -#include "DT_VertexBase.h" - -class DT_Polyhedron : public DT_Convex { - typedef DT_Array<DT_IndexArray> T_MultiIndexArray; -public: - DT_Polyhedron() - : m_verts(0), - m_cobound(0) - {} - - DT_Polyhedron(const DT_VertexBase *base, DT_Count count, const DT_Index *indices); - - virtual ~DT_Polyhedron(); - - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - - const MT_Point3& operator[](int i) const { return m_verts[i]; } - DT_Count numVerts() const { return m_count; } - -private: - DT_Count m_count; - MT_Point3 *m_verts; - T_MultiIndexArray *m_cobound; - DT_Index m_start_vertex; - mutable DT_Index m_curr_vertex; -}; - -#else - -#include "DT_Polytope.h" - -typedef DT_Polytope DT_Polyhedron; - -#endif - -#endif - diff --git a/extern/solid/src/convex/DT_Polytope.cpp b/extern/solid/src/convex/DT_Polytope.cpp deleted file mode 100644 index e757c3bfdb4..00000000000 --- a/extern/solid/src/convex/DT_Polytope.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Polytope.h" - -MT_BBox DT_Polytope::bbox() const -{ - MT_BBox bbox = (*this)[0]; - DT_Index i; - for (i = 1; i < numVerts(); ++i) - { - bbox = bbox.hull((*this)[i]); - } - return bbox; -} - -MT_Scalar DT_Polytope::supportH(const MT_Vector3& v) const -{ - int c = 0; - MT_Scalar h = (*this)[0].dot(v), d; - DT_Index i; - for (i = 1; i < numVerts(); ++i) - { - if ((d = (*this)[i].dot(v)) > h) - { - c = i; - h = d; - } - } - return h; -} - -MT_Point3 DT_Polytope::support(const MT_Vector3& v) const -{ - int c = 0; - MT_Scalar h = (*this)[0].dot(v), d; - DT_Index i; - for (i = 1; i < numVerts(); ++i) - { - if ((d = (*this)[i].dot(v)) > h) - { - c = i; - h = d; - } - } - return (*this)[c]; -} - - diff --git a/extern/solid/src/convex/DT_Polytope.h b/extern/solid/src/convex/DT_Polytope.h deleted file mode 100644 index c715598defe..00000000000 --- a/extern/solid/src/convex/DT_Polytope.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_POLYTOPE_H -#define DT_POLYTOPE_H - -#include "DT_Convex.h" -#include "DT_IndexArray.h" -#include "DT_VertexBase.h" - -class DT_Polytope : public DT_Convex { -public: - DT_Polytope() {} - DT_Polytope(const DT_VertexBase *base, DT_Count count, const DT_Index *indices) - : m_base(base), - m_index(count, indices) - {} - - virtual MT_BBox bbox() const; - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - - MT_Point3 operator[](int i) const { return (*m_base)[m_index[i]]; } - DT_Count numVerts() const { return m_index.size(); } - -protected: - const DT_VertexBase *m_base; - DT_IndexArray m_index; -}; - -#endif diff --git a/extern/solid/src/convex/DT_Shape.h b/extern/solid/src/convex/DT_Shape.h deleted file mode 100644 index d48942fe515..00000000000 --- a/extern/solid/src/convex/DT_Shape.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_SHAPE_H -#define DT_SHAPE_H - -#include <algorithm> - -#include "MT_BBox.h" - -#include "MT_Transform.h" - -class DT_Object; - -enum DT_ShapeType { - COMPLEX, - CONVEX -}; - -class DT_Shape { -public: - virtual ~DT_Shape() {} - virtual DT_ShapeType getType() const = 0; - virtual MT_BBox bbox(const MT_Transform& t, MT_Scalar margin) const = 0; - virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& param, MT_Vector3& normal) const = 0; - -protected: - DT_Shape() {} -}; - -typedef bool (*Intersect)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3&); - -typedef bool (*Common_point)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3&, MT_Point3&, MT_Point3&); - -typedef bool (*Penetration_depth)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Vector3&, MT_Point3&, MT_Point3&); - -typedef MT_Scalar (*Closest_points)(const DT_Shape& a, const MT_Transform& a2w, MT_Scalar a_margin, - const DT_Shape& b, const MT_Transform& b2w, MT_Scalar b_margin, - MT_Point3&, MT_Point3&); - -#endif - - - - - diff --git a/extern/solid/src/convex/DT_Sphere.cpp b/extern/solid/src/convex/DT_Sphere.cpp deleted file mode 100644 index 3f2443dcf53..00000000000 --- a/extern/solid/src/convex/DT_Sphere.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#include "DT_Sphere.h" -#include "GEN_MinMax.h" - -MT_Scalar DT_Sphere::supportH(const MT_Vector3& v) const -{ - return m_radius * v.length(); -} - -MT_Point3 DT_Sphere::support(const MT_Vector3& v) const -{ - MT_Scalar s = v.length(); - - if (s > MT_Scalar(0.0)) - { - s = m_radius / s; - return MT_Point3(v[0] * s, v[1] * s, v[2] * s); - } - else - { - return MT_Point3(m_radius, MT_Scalar(0.0), MT_Scalar(0.0)); - } -} - -bool DT_Sphere::ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& param, MT_Vector3& normal) const -{ - MT_Vector3 r = target - source; - MT_Scalar delta = -source.dot(r); - MT_Scalar r_length2 = r.length2(); - MT_Scalar sigma = delta * delta - r_length2 * (source.length2() - m_radius * m_radius); - - if (sigma >= MT_Scalar(0.0)) - // The line trough source and target intersects the sphere. - { - MT_Scalar sqrt_sigma = MT_sqrt(sigma); - // We need only the sign of lambda2, so the division by the positive - // r_length2 can be left out. - MT_Scalar lambda2 = (delta + sqrt_sigma) /* / r_length2 */ ; - if (lambda2 >= MT_Scalar(0.0)) - // The ray points at the sphere - { - MT_Scalar lambda1 = (delta - sqrt_sigma) / r_length2; - if (lambda1 <= param) - // The ray hits the sphere, since - // [lambda1, lambda2] overlaps [0, param]. - { - if (lambda1 > MT_Scalar(0.0)) - { - param = lambda1; - normal = (source + r * lambda1) / m_radius; - // NB: division by m_radius to normalize the normal. - } - else - { - param = MT_Scalar(0.0); - normal.setValue(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(0.0)); - } - - return true; - } - } - } - - return false; -} - - diff --git a/extern/solid/src/convex/DT_Sphere.h b/extern/solid/src/convex/DT_Sphere.h deleted file mode 100644 index 92386a66f3a..00000000000 --- a/extern/solid/src/convex/DT_Sphere.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_SPHERE_H -#define DT_SPHERE_H - -#include "DT_Convex.h" - -class DT_Sphere : public DT_Convex { -public: - DT_Sphere(MT_Scalar radius) : m_radius(radius) {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - - virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& param, MT_Vector3& normal) const; - -protected: - MT_Scalar m_radius; -}; - -#endif diff --git a/extern/solid/src/convex/DT_Transform.h b/extern/solid/src/convex/DT_Transform.h deleted file mode 100644 index a976d48d22b..00000000000 --- a/extern/solid/src/convex/DT_Transform.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_TRANSFORM_H -#define DT_TRANSFORM_H - -#include "DT_Convex.h" - -class DT_Transform : public DT_Convex { -public: - DT_Transform(const MT_Transform& xform, const DT_Convex& child) : - m_xform(xform), - m_child(child) - {} - - virtual MT_Scalar supportH(const MT_Vector3& v) const - { - return m_child.supportH(v * m_xform.getBasis()) + - v.dot(m_xform.getOrigin()); - } - - virtual MT_Point3 support(const MT_Vector3& v) const - { - return m_xform(m_child.support(v * m_xform.getBasis())); - } - -private: - const MT_Transform& m_xform; - const DT_Convex& m_child; -}; - - -#endif diff --git a/extern/solid/src/convex/DT_Triangle.cpp b/extern/solid/src/convex/DT_Triangle.cpp deleted file mode 100644 index 1917910b39d..00000000000 --- a/extern/solid/src/convex/DT_Triangle.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -//#define BACKFACE_CULLING - -#include "DT_Triangle.h" - -MT_BBox DT_Triangle::bbox() const -{ - return MT_BBox((*this)[0]).hull((*this)[1]).hull((*this)[2]); -} - -MT_Scalar DT_Triangle::supportH(const MT_Vector3& v) const -{ - return GEN_max(GEN_max(v.dot((*this)[0]), v.dot((*this)[1])), v.dot((*this)[2])); -} - -MT_Point3 DT_Triangle::support(const MT_Vector3& v) const -{ - MT_Vector3 dots(v.dot((*this)[0]), v.dot((*this)[1]), v.dot((*this)[2])); - - return (*this)[dots.maxAxis()]; -} - -bool DT_Triangle::ray_cast(const MT_Point3& source, const MT_Point3& target, - MT_Scalar& param, MT_Vector3& normal) const -{ - MT_Vector3 d1 = (*this)[1] - (*this)[0]; - MT_Vector3 d2 = (*this)[2] - (*this)[0]; - MT_Vector3 n = d1.cross(d2); - MT_Vector3 r = target - source; - MT_Scalar delta = -r.dot(n); - - MT_Scalar rounding_error = GEN_max(GEN_max(MT_abs(n[0]), MT_abs(n[1])), MT_abs(n[2])) * MT_EPSILON; - -#ifdef BACKFACE_CULLING - if (delta > rounding_error) -#else - if (MT_abs(delta) > rounding_error) -#endif - // The ray is not parallel to the triangle's plane. - // (Coplanar rays are ignored.) - { - MT_Vector3 b = source - (*this)[0]; - MT_Scalar lambda = b.dot(n) / delta; - - if (MT_Scalar(0.0) <= lambda && lambda <= param) - // The ray intersects the triangle's plane. - { - MT_Vector3 u = b.cross(r); - MT_Scalar mu1 = d2.dot(u) / delta; - - if (MT_Scalar(0.0) <= mu1 && mu1 <= MT_Scalar(1.0)) - { - MT_Scalar mu2 = -d1.dot(u) / delta; - - if (MT_Scalar(0.0) <= mu2 && mu1 + mu2 <= MT_Scalar(1.0)) - // The ray intersects the triangle. - { - param = lambda; - // Return a normal that points at the source. -#ifdef BACKFACE_CULLING - normal = n; -#else - normal = delta > MT_Scalar(0.0) ? n : -n; -#endif - return true; - } - } - } - } - - return false; -} - - diff --git a/extern/solid/src/convex/DT_Triangle.h b/extern/solid/src/convex/DT_Triangle.h deleted file mode 100644 index 4192b5629ac..00000000000 --- a/extern/solid/src/convex/DT_Triangle.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_TRIANGLE_H -#define DT_TRIANGLE_H - -#include "SOLID_types.h" - -#include "DT_Convex.h" -#include "DT_IndexArray.h" -#include "DT_VertexBase.h" - -class DT_Triangle : public DT_Convex { -public: - DT_Triangle(const DT_VertexBase *base, DT_Index i0, DT_Index i1, DT_Index i2) : - m_base(base) - { - m_index[0] = i0; - m_index[1] = i1; - m_index[2] = i2; - } - - DT_Triangle(const DT_VertexBase *base, const DT_Index *index) : - m_base(base) - { - m_index[0] = index[0]; - m_index[1] = index[1]; - m_index[2] = index[2]; - } - - virtual MT_BBox bbox() const; - virtual MT_Scalar supportH(const MT_Vector3& v) const; - virtual MT_Point3 support(const MT_Vector3& v) const; - virtual bool ray_cast(const MT_Point3& source, const MT_Point3& target, MT_Scalar& lambda, MT_Vector3& normal) const; - - MT_Point3 operator[](int i) const { return (*m_base)[m_index[i]]; } - -private: - const DT_VertexBase *m_base; - DT_Index m_index[3]; -}; - -#endif diff --git a/extern/solid/src/convex/DT_VertexBase.h b/extern/solid/src/convex/DT_VertexBase.h deleted file mode 100644 index 37646fdd935..00000000000 --- a/extern/solid/src/convex/DT_VertexBase.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * SOLID - Software Library for Interference Detection - * - * Copyright (C) 2001-2003 Dtecta. All rights reserved. - * - * This library may be distributed under the terms of the Q Public License - * (QPL) as defined by Trolltech AS of Norway and appearing in the file - * LICENSE.QPL included in the packaging of this file. - * - * This library may be distributed and/or modified under the terms of the - * GNU General Public License (GPL) version 2 as published by the Free Software - * Foundation and appearing in the file LICENSE.GPL included in the - * packaging of this file. - * - * This library is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * Commercial use or any other use of this library not covered by either - * the QPL or the GPL requires an additional license from Dtecta. - * Please contact info@dtecta.com for enquiries about the terms of commercial - * use of this library. - */ - -#ifndef DT_VERTEXBASE_H -#define DT_VERTEXBASE_H - -#include "MT_Point3.h" - -#include <vector> - -class DT_Complex; - -typedef std::vector<DT_Complex *>DT_ComplexList; - -class DT_VertexBase { -public: - explicit DT_VertexBase(const void *base = 0, DT_Size stride = 0, bool owner = false) : - m_base((char *)base), - m_stride(stride ? stride : 3 * sizeof(DT_Scalar)), - m_owner(owner) - {} - - ~DT_VertexBase() - { - if (m_owner) - { - delete [] m_base; - } - } - - MT_Point3 operator[](DT_Index i) const - { - return MT_Point3(reinterpret_cast<DT_Scalar *>(m_base + i * m_stride)); - } - - void setPointer(const void *base, bool owner = false) - { - m_base = (char *)base; - m_owner = owner; - } - - const void *getPointer() const { return m_base; } - bool isOwner() const { return m_owner; } - - void addComplex(DT_Complex *complex) const { m_complexList.push_back(complex); } - void removeComplex(DT_Complex *complex) const - { - DT_ComplexList::iterator it = std::find(m_complexList.begin(), m_complexList.end(), complex); - if (it != m_complexList.end()) - { - m_complexList.erase(it); - } - } - - const DT_ComplexList& getComplexList() const { return m_complexList; } - -private: - char *m_base; - DT_Size m_stride; - bool m_owner; - mutable DT_ComplexList m_complexList; -}; - -#endif diff --git a/extern/solid/src/convex/Makefile b/extern/solid/src/convex/Makefile deleted file mode 100644 index 75fa578a292..00000000000 --- a/extern/solid/src/convex/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# $Id$ -# -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program 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 2 -# of the License, or (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. -# All rights reserved. -# -# The Original Code is: all of this file. -# -# Contributor(s): none yet. -# -# ***** END GPL LICENSE BLOCK ***** -# -# - -LIBNAME = solid_convex -DIR = $(OCGDIR)/extern/$(LIBNAME) - -CCFLAGS += $(LEVEL_1_CPP_WARNINGS) - -CPPFLAGS += -I../../include -I$(NAN_QHULL)/include -CPPFLAGS += -DQHULL -DUSE_DOUBLES - -include nan_compile.mk - - |