Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-03-13 01:18:28 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-03-13 01:18:28 +0400
commite3cfca511f55495de1b58bf714fb4b8cabc633db (patch)
treebf666f2daff1542108b03464cfb662e6fc225af9 /extern
parent30790e9390305a1e9108318e98c85a2b4699a045 (diff)
Bundle latest version of Carve library which shall resolve compilation issues with clang
Diffstat (limited to 'extern')
-rw-r--r--extern/carve/CMakeLists.txt168
-rwxr-xr-xextern/carve/bundle.sh2
-rw-r--r--extern/carve/include/carve/exact.hpp8
-rw-r--r--extern/carve/include/carve/kd_node.hpp6
-rw-r--r--extern/carve/include/carve/mesh_impl.hpp3
-rw-r--r--extern/carve/include/carve/polyhedron_impl.hpp12
-rw-r--r--extern/carve/patches/strict_flags.patch24
7 files changed, 100 insertions, 123 deletions
diff --git a/extern/carve/CMakeLists.txt b/extern/carve/CMakeLists.txt
index cbf92ee293e..660538998a1 100644
--- a/extern/carve/CMakeLists.txt
+++ b/extern/carve/CMakeLists.txt
@@ -35,115 +35,115 @@ 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/intersection.cpp
+ lib/intersect.cpp
+ lib/triangulator.cpp
+ lib/convex_hull.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/pointset.cpp
lib/geom2d.cpp
+ lib/math.cpp
+ lib/intersect_half_classify_group.cpp
+ lib/intersect_face_division.cpp
lib/tag.cpp
- lib/intersection.cpp
- lib/convex_hull.cpp
+ lib/aabb.cpp
+ lib/intersect_classify_group.cpp
+ lib/mesh.cpp
+ lib/timing.cpp
+ lib/geom3d.cpp
+ lib/intersect_group.cpp
+ lib/carve.cpp
+ lib/intersect_classify_edge.cpp
lib/csg.cpp
- lib/intersect.cpp
lib/face.cpp
- lib/pointset.cpp
- lib/timing.cpp
- lib/octree.cpp
- lib/aabb.cpp
+ lib/csg_collector.cpp
lib/intersect_debug.cpp
+ lib/edge.cpp
+ lib/octree.cpp
- lib/intersect_classify_common.hpp
- lib/csg_data.hpp
+ lib/intersect_debug.hpp
lib/csg_collector.hpp
+ lib/csg_data.hpp
+ lib/intersect_classify_common.hpp
lib/intersect_common.hpp
- lib/intersect_classify_common_impl.hpp
lib/csg_detail.hpp
- lib/intersect_debug.hpp
+ lib/intersect_classify_common_impl.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/vertex_impl.hpp
include/carve/aabb_impl.hpp
- include/carve/colour.hpp
+ include/carve/csg.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/triangulator_impl.hpp
+ include/carve/edge_decl.hpp
+ include/carve/collection/unordered.hpp
+ include/carve/collection/unordered/tr1_impl.hpp
+ include/carve/collection/unordered/fallback_impl.hpp
+ include/carve/collection/unordered/std_impl.hpp
+ include/carve/collection/unordered/vcpp_impl.hpp
+ include/carve/collection/unordered/libstdcpp_impl.hpp
+ include/carve/collection/unordered/boost_impl.hpp
include/carve/convex_hull.hpp
- include/carve/vertex_decl.hpp
+ include/carve/geom.hpp
+ include/carve/collection_types.hpp
+ include/carve/cbrt.h
+ include/carve/util.hpp
+ include/carve/iobj.hpp
+ include/carve/polyline_decl.hpp
+ include/carve/polyline_impl.hpp
include/carve/win32.h
include/carve/edge_impl.hpp
- include/carve/tag.hpp
- include/carve/tree.hpp
- include/carve/heap.hpp
+ include/carve/carve.hpp
+ include/carve/polyline.hpp
+ include/carve/face_decl.hpp
include/carve/matrix.hpp
- include/carve/poly.hpp
- include/carve/vector.hpp
- include/carve/intersection.hpp
- include/carve/faceloop.hpp
+ include/carve/classification.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/faceloop.hpp
+ include/carve/mesh_ops.hpp
+ include/carve/tree.hpp
+ include/carve/geom2d.hpp
include/carve/face_impl.hpp
+ include/carve/polyhedron_decl.hpp
+ include/carve/interpolator.hpp
+ include/carve/poly_decl.hpp
+ include/carve/mesh_impl.hpp
+ include/carve/gnu_cxx.h
+ include/carve/mesh_simplify.hpp
+ include/carve/triangulator.hpp
include/carve/pointset_impl.hpp
- include/carve/cbrt.h
+ include/carve/rtree.hpp
+ include/carve/math_constants.hpp
+ include/carve/vector.hpp
+ include/carve/octree_impl.hpp
+ include/carve/pointset.hpp
+ include/carve/math.hpp
+ include/carve/intersection.hpp
+ include/carve/colour.hpp
+ include/carve/kd_node.hpp
+ include/carve/input.hpp
+ include/carve/geom3d.hpp
+ include/carve/exact.hpp
+ include/carve/rescale.hpp
+ include/carve/polyhedron_base.hpp
+ include/carve/heap.hpp
+ include/carve/spacetree.hpp
+ include/carve/polyhedron_impl.hpp
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/aabb.hpp
+ include/carve/polyline_iter.hpp
+ include/carve/djset.hpp
+ include/carve/vertex_decl.hpp
include/carve/csg_triangulator.hpp
- include/carve/iobj.hpp
- include/carve/collection_types.hpp
+ include/carve/poly.hpp
+ include/carve/timing.hpp
+ include/carve/octree_decl.hpp
+ include/carve/pointset_decl.hpp
+ include/carve/tag.hpp
+ include/carve/collection.hpp
+ include/carve/poly_impl.hpp
)
if(WITH_BOOST)
diff --git a/extern/carve/bundle.sh b/extern/carve/bundle.sh
index bc719ae5ba8..e68b2c7e90e 100755
--- a/extern/carve/bundle.sh
+++ b/extern/carve/bundle.sh
@@ -47,7 +47,7 @@ cat > CMakeLists.txt << EOF
#
# 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.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
diff --git a/extern/carve/include/carve/exact.hpp b/extern/carve/include/carve/exact.hpp
index afb491211fd..0d674e66ef7 100644
--- a/extern/carve/include/carve/exact.hpp
+++ b/extern/carve/include/carve/exact.hpp
@@ -639,9 +639,11 @@ namespace carve {
}
- // XXX: not implemented yet
- //exact_t operator+(const exact_t &a, const exact_t &b) {
- //}
+ exact_t operator+(const exact_t &a, const exact_t &b) {
+ exact_t r;
+ sum_zeroelim(a, b, r);
+ return r;
+ }
diff --git a/extern/carve/include/carve/kd_node.hpp b/extern/carve/include/carve/kd_node.hpp
index f62584d50c2..45e0ac85739 100644
--- a/extern/carve/include/carve/kd_node.hpp
+++ b/extern/carve/include/carve/kd_node.hpp
@@ -230,7 +230,7 @@ namespace carve {
}
// distance_t must provide:
- // double operator()(kd_node::data_t, vector<ndim>);
+ // double operator()(data_t, vector<ndim>);
// double operator()(axis_pos, vector<ndim>);
template<typename distance_t>
struct near_point_query {
@@ -238,7 +238,7 @@ namespace carve {
// q_t - the priority queue value type.
// q_t.first: distance from object to query point.
// q_t.second: pointer to object
- typedef std::pair<double, const typename kd_node::data_t *> q_t;
+ typedef std::pair<double, const data_t *> q_t;
// the queue priority should sort from smallest distance to largest, and on equal distance, by object pointer.
struct pcmp {
@@ -266,7 +266,7 @@ namespace carve {
}
}
- const typename kd_node::data_t *next() {
+ const data_t *next() {
while (1) {
if (pq.size()) {
q_t t = pq.top();
diff --git a/extern/carve/include/carve/mesh_impl.hpp b/extern/carve/include/carve/mesh_impl.hpp
index 23b0a436573..d55df8c8130 100644
--- a/extern/carve/include/carve/mesh_impl.hpp
+++ b/extern/carve/include/carve/mesh_impl.hpp
@@ -624,8 +624,7 @@ namespace carve {
CARVE_ASSERT(e->rev != NULL);
e = e->rev->next;
CARVE_ASSERT(e->v1() == emin->v1());
- CARVE_ASSERT(e->v1()->v < e->v2()->v);
- CARVE_ASSERT(e->v1()->v.x <= e->v2()->v.x);
+ CARVE_ASSERT(e->v1()->v <= e->v2()->v);
} while (e != emin);
double max_abs_x = 0.0;
diff --git a/extern/carve/include/carve/polyhedron_impl.hpp b/extern/carve/include/carve/polyhedron_impl.hpp
index 06d841c7192..de61324140d 100644
--- a/extern/carve/include/carve/polyhedron_impl.hpp
+++ b/extern/carve/include/carve/polyhedron_impl.hpp
@@ -88,9 +88,9 @@ namespace carve {
*(*result)++ = f;
int r = 1;
- for (size_t i = 0; i < f->edges.size(); ++i) {
- const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(f->edges[i])];
- const face_t *f2 = connectedFace(f, f->edges[i]);
+ for (size_t i = 0; i < f->nEdges(); ++i) {
+ const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(f->edge(i))];
+ const face_t *f2 = connectedFace(f, f->edge(i));
if (f2) {
r += _faceNeighbourhood(f2, depth - 1, (*result));
}
@@ -116,7 +116,7 @@ namespace carve {
int r = 0;
const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(e)];
for (size_t i = 0; i < edge_faces.size(); ++i) {
- face_t *f = edge_faces[i];
+ const face_t *f = edge_faces[i];
if (f && f->manifold_id == m_id) { r += _faceNeighbourhood(f, depth, &result); }
}
return r;
@@ -131,7 +131,7 @@ namespace carve {
int r = 0;
const std::vector<const face_t *> &vertex_faces = connectivity.vertex_to_face[vertexToIndex_fast(v)];
for (size_t i = 0; i < vertex_faces.size(); ++i) {
- face_t *f = vertex_faces[i];
+ const face_t *f = vertex_faces[i];
if (f && f->manifold_id == m_id) { r += _faceNeighbourhood(f, depth, &result); }
}
return r;
@@ -142,7 +142,7 @@ namespace carve {
// accessing connectivity information.
template<typename T>
int Geometry<3>::vertexToEdges(const vertex_t *v, T result) const {
- std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)];
+ const std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)];
std::copy(e.begin(), e.end(), result);
return e.size();
}
diff --git a/extern/carve/patches/strict_flags.patch b/extern/carve/patches/strict_flags.patch
index 5e4b867ba26..5c7e8967d39 100644
--- a/extern/carve/patches/strict_flags.patch
+++ b/extern/carve/patches/strict_flags.patch
@@ -9,30 +9,6 @@ diff -r 47dfdaff1dd5 include/carve/csg_triangulator.hpp
}
carve::mesh::MeshSet<3>::face_t *mergeQuad(edge_map_t::iterator i, edge_map_t &edge_map) {
-diff -r 47dfdaff1dd5 include/carve/exact.hpp
---- a/include/carve/exact.hpp Thu Jan 12 15:49:04 2012 -0500
-+++ b/include/carve/exact.hpp Fri Jan 13 03:13:32 2012 +0600
-@@ -379,7 +379,7 @@
- prod_2_1(b, a, r);
- }
-
-- static inline double prod_4_1(const double *a, const double *b, double *r) {
-+ static inline void prod_4_1(const double *a, const double *b, double *r) {
- double b_sp[2]; split(b[0], b_sp);
- double t1[2]; prod_1_1s(a+0, b, b_sp, t1);
- r[0] = t1[0];
-@@ -639,8 +639,9 @@
- }
-
-
-- exact_t operator+(const exact_t &a, const exact_t &b) {
-- }
-+ // XXX: not implemented yet
-+ //exact_t operator+(const exact_t &a, const exact_t &b) {
-+ //}
-
-
-
diff -r 47dfdaff1dd5 src/selfintersect.cpp
--- a/src/selfintersect.cpp Thu Jan 12 15:49:04 2012 -0500
+++ b/src/selfintersect.cpp Fri Jan 13 03:13:32 2012 +0600