Bundle latest version of Carve library which shall resolve compilation issues with...
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 12 Mar 2012 21:18:28 +0000 (21:18 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 12 Mar 2012 21:18:28 +0000 (21:18 +0000)
extern/carve/CMakeLists.txt
extern/carve/bundle.sh
extern/carve/include/carve/exact.hpp
extern/carve/include/carve/kd_node.hpp
extern/carve/include/carve/mesh_impl.hpp
extern/carve/include/carve/polyhedron_impl.hpp
extern/carve/patches/strict_flags.patch

index cbf92ee293ef9dadc488935f1d72903183ff4071..660538998a1c379414db5fb1ecf9124ca98ef9b9 100644 (file)
@@ -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)
index bc719ae5ba8a80795d2ee58dfb68c90914b9d0cf..e68b2c7e90e4dcf92b5d1097f3f967c23b6ff6f0 100755 (executable)
@@ -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.
index afb491211fddb572f5487a2a8405c0154c7f10d2..0d674e66ef7df83db920809e71cc6046d06b8c96 100644 (file)
@@ -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;
+    }
 
 
 
index f62584d50c27688f85387dc54cafd03a53fd06ce..45e0ac85739870a57e1d4a6a57ca7373e6de57e9 100644 (file)
@@ -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();
index 23b0a4365739391f6431b23fa4fecf974282b84f..d55df8c8130ecc473c237ebfebe9a8aab38bd1c1 100644 (file)
@@ -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;
index 06d841c71921d2e7f0ccf68ecb972008c202f918..de61324140d2e5f909c67577a3b99ee9e8c97888 100644 (file)
@@ -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();
     }
index 5e4b867ba2652fd601767c5d41a0b25bf0533d0c..5c7e8967d395839801cf5cee8cf5968d26a8f16e 100644 (file)
@@ -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