diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-16 20:46:00 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-01-16 20:46:00 +0400 |
commit | e81f2853c8785b0a84ecebf7c4db433af434c5c8 (patch) | |
tree | f3145e592452e5d2cb2d162ec53813f0e552a2fe /extern/carve/CMakeLists.txt | |
parent | c150d0084f0e1cf86f063d993b31d02fc3e9c71f (diff) |
Carve booleans library integration
==================================
Merging Carve library integration project into the trunk.
This commit switches Boolean modifier to another library which handles
mesh boolean operations in much stable and faster way, resolving old
well-known limitations of intern boolop library.
Carve is integrating as alternative interface for boolop library and
which makes it totally transparent for blender sources to switch between
old-fashioned boolop and new Carve backends.
Detailed changes in this commit:
- Integrated needed subset of Carve library sources into extern/
Added script for re-bundling it (currently works only if repo
was cloned by git-svn).
- Added BOP_CarveInterface for boolop library which can be used by
Boolean modifier.
- Carve backend is enabled by default, can be disabled by WITH_BF_CARVE
SCons option and WITH_CARVE CMake option.
- If Boost library is found in build environment it'll be used for
unordered collections. If Boost isn't found, it'll fallback to TR1
implementation for GCC compilers. Boost is obligatory if MSVC is used.
Tested on Linux 64bit and Windows 7 64bit.
NOTE: behavior of flat objects was changed. E.g. Plane-Sphere now gives
plane with circle hole, not plane with semisphere. Don't think
it's really issue because it's not actually defined behavior in
such situations and both of ways might be useful. Since it's
only known "regression" think it's OK to deal with it.
Details are there http://wiki.blender.org/index.php/User:Nazg-gul/CarveBooleans
Special thanks to:
- Ken Hughes: author of original carve integration patch.
- Campbell Barton: help in project development, review tests.
- Tobias Sargeant: author of Carve library, help in resolving some
merge stoppers, bug fixing.
Diffstat (limited to 'extern/carve/CMakeLists.txt')
-rw-r--r-- | extern/carve/CMakeLists.txt | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/extern/carve/CMakeLists.txt b/extern/carve/CMakeLists.txt new file mode 100644 index 00000000000..abd35d33c1c --- /dev/null +++ b/extern/carve/CMakeLists.txt @@ -0,0 +1,166 @@ +# ***** 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 Beaurai, Erwin Coumans +# +# ***** END GPL LICENSE BLOCK ***** + +# NOTE: This file is automatically generated by bundle.sh script +# If you're doing changes in this file, please update template +# in that script too + +set(INC + include +) + +set(INC_SYS +) + +set(SRC + lib/carve.cpp + lib/mesh.cpp + lib/intersect_group.cpp + lib/intersect_classify_edge.cpp + lib/intersect_classify_group.cpp + lib/polyhedron.cpp + lib/geom3d.cpp + lib/polyline.cpp + lib/csg_collector.cpp + lib/triangulator.cpp + lib/intersect_face_division.cpp + lib/intersect_half_classify_group.cpp + lib/edge.cpp + lib/math.cpp + lib/geom2d.cpp + lib/tag.cpp + lib/intersection.cpp + lib/convex_hull.cpp + lib/csg.cpp + lib/intersect.cpp + lib/face.cpp + lib/pointset.cpp + lib/timing.cpp + lib/octree.cpp + lib/aabb.cpp + lib/intersect_debug.cpp + + lib/intersect_classify_common.hpp + lib/csg_data.hpp + lib/csg_collector.hpp + lib/intersect_common.hpp + lib/intersect_classify_common_impl.hpp + lib/csg_detail.hpp + lib/intersect_debug.hpp + + include/carve/polyhedron_decl.hpp + include/carve/geom2d.hpp + include/carve/exact.hpp + include/carve/triangulator_impl.hpp + include/carve/collection.hpp + include/carve/pointset.hpp + include/carve/djset.hpp + include/carve/kd_node.hpp + include/carve/polyline.hpp + include/carve/polyline_iter.hpp + include/carve/geom3d.hpp + include/carve/edge_decl.hpp + include/carve/face_decl.hpp + include/carve/aabb_impl.hpp + include/carve/colour.hpp + include/carve/pointset_iter.hpp + include/carve/polyline_decl.hpp + include/carve/rescale.hpp + include/carve/mesh_impl.hpp + include/carve/classification.hpp + include/carve/util.hpp + include/carve/triangulator.hpp + include/carve/polyhedron_base.hpp + include/carve/rtree.hpp + include/carve/math.hpp + include/carve/math_constants.hpp + include/carve/octree_decl.hpp + include/carve/input.hpp + include/carve/mesh_ops.hpp + include/carve/debug_hooks.hpp + include/carve/mesh_simplify.hpp + include/carve/interpolator.hpp + include/carve/poly_decl.hpp + include/carve/csg.hpp + include/carve/mesh.hpp + include/carve/carve.hpp + include/carve/gnu_cxx.h + include/carve/polyhedron_impl.hpp + include/carve/poly_impl.hpp + include/carve/aabb.hpp + include/carve/convex_hull.hpp + include/carve/vertex_decl.hpp + include/carve/win32.h + include/carve/edge_impl.hpp + include/carve/tag.hpp + include/carve/tree.hpp + include/carve/heap.hpp + include/carve/matrix.hpp + include/carve/poly.hpp + include/carve/vector.hpp + include/carve/intersection.hpp + include/carve/faceloop.hpp + include/carve/geom_impl.hpp + include/carve/octree_impl.hpp + include/carve/spacetree.hpp + include/carve/collection/unordered/std_impl.hpp + include/carve/collection/unordered/tr1_impl.hpp + include/carve/collection/unordered/libstdcpp_impl.hpp + include/carve/collection/unordered/boost_impl.hpp + include/carve/collection/unordered/vcpp_impl.hpp + include/carve/collection/unordered/fallback_impl.hpp + include/carve/collection/unordered.hpp + include/carve/face_impl.hpp + include/carve/pointset_impl.hpp + include/carve/cbrt.h + include/carve/vcpp_config.h + include/carve/geom.hpp + include/carve/vertex_impl.hpp + include/carve/polyline_impl.hpp + include/carve/pointset_decl.hpp + include/carve/timing.hpp + include/carve/csg_triangulator.hpp + include/carve/iobj.hpp + include/carve/collection_types.hpp +) + +if(WITH_BOOST) + if(NOT MSVC) + # Boost is setting as preferred collections library in the Carve code when using MSVC compiler + add_definitions( + -DHAVE_BOOST_UNORDERED_COLLECTIONS + ) + endif() + + add_definitions( + -DCARVE_SYSTEM_BOOST + ) + + list(APPEND INC + ${BOOST_INCLUDE_DIR} + ) +endif() + +blender_add_lib(extern_carve "${SRC}" "${INC}" "${INC_SYS}") |