Bundle updated version of carve. Should be no functional changes, small code cleanup
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 10 May 2012 11:00:02 +0000 (11:00 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 10 May 2012 11:00:02 +0000 (11:00 +0000)
extern/carve/CMakeLists.txt
extern/carve/lib/intersect.cpp

index 660538998a1c379414db5fb1ecf9124ca98ef9b9..3916047ff32b19bd3c4081e56ff59a0845b1d87e 100644 (file)
@@ -35,115 +35,115 @@ set(INC_SYS
 )
 
 set(SRC
-       lib/intersection.cpp
-       lib/intersect.cpp
-       lib/triangulator.cpp
-       lib/convex_hull.cpp
-       lib/polyhedron.cpp
-       lib/polyline.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/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/convex_hull.cpp
+       lib/csg_collector.cpp
        lib/csg.cpp
+       lib/edge.cpp
        lib/face.cpp
-       lib/csg_collector.cpp
+       lib/geom2d.cpp
+       lib/geom3d.cpp
+       lib/intersect_classify_edge.cpp
+       lib/intersect_classify_group.cpp
+       lib/intersect.cpp
        lib/intersect_debug.cpp
-       lib/edge.cpp
+       lib/intersect_face_division.cpp
+       lib/intersect_group.cpp
+       lib/intersect_half_classify_group.cpp
+       lib/intersection.cpp
+       lib/math.cpp
+       lib/mesh.cpp
        lib/octree.cpp
+       lib/pointset.cpp
+       lib/polyhedron.cpp
+       lib/polyline.cpp
+       lib/tag.cpp
+       lib/timing.cpp
+       lib/triangulator.cpp
 
-       lib/intersect_debug.hpp
        lib/csg_collector.hpp
        lib/csg_data.hpp
-       lib/intersect_classify_common.hpp
-       lib/intersect_common.hpp
        lib/csg_detail.hpp
+       lib/intersect_classify_common.hpp
        lib/intersect_classify_common_impl.hpp
+       lib/intersect_common.hpp
+       lib/intersect_debug.hpp
 
-       include/carve/vertex_impl.hpp
+       include/carve/aabb.hpp
        include/carve/aabb_impl.hpp
-       include/carve/csg.hpp
-       include/carve/pointset_iter.hpp
-       include/carve/debug_hooks.hpp
-       include/carve/mesh.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/carve.hpp
+       include/carve/cbrt.h
+       include/carve/classification.hpp
+       include/carve/collection.hpp
+       include/carve/collection_types.hpp
+       include/carve/collection/unordered/boost_impl.hpp
        include/carve/collection/unordered/fallback_impl.hpp
+       include/carve/collection/unordered.hpp
+       include/carve/collection/unordered/libstdcpp_impl.hpp
        include/carve/collection/unordered/std_impl.hpp
+       include/carve/collection/unordered/tr1_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/colour.hpp
        include/carve/convex_hull.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/csg.hpp
+       include/carve/csg_triangulator.hpp
+       include/carve/debug_hooks.hpp
+       include/carve/djset.hpp
+       include/carve/edge_decl.hpp
        include/carve/edge_impl.hpp
-       include/carve/carve.hpp
-       include/carve/polyline.hpp
+       include/carve/exact.hpp
        include/carve/face_decl.hpp
-       include/carve/matrix.hpp
-       include/carve/classification.hpp
-       include/carve/geom_impl.hpp
+       include/carve/face_impl.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/geom3d.hpp
+       include/carve/geom.hpp
+       include/carve/geom_impl.hpp
+       include/carve/gnu_cxx.h
+       include/carve/heap.hpp
+       include/carve/input.hpp
        include/carve/interpolator.hpp
-       include/carve/poly_decl.hpp
+       include/carve/intersection.hpp
+       include/carve/iobj.hpp
+       include/carve/kd_node.hpp
+       include/carve/math_constants.hpp
+       include/carve/math.hpp
+       include/carve/matrix.hpp
+       include/carve/mesh.hpp
        include/carve/mesh_impl.hpp
-       include/carve/gnu_cxx.h
+       include/carve/mesh_ops.hpp
        include/carve/mesh_simplify.hpp
-       include/carve/triangulator.hpp
-       include/carve/pointset_impl.hpp
-       include/carve/rtree.hpp
-       include/carve/math_constants.hpp
-       include/carve/vector.hpp
+       include/carve/octree_decl.hpp
        include/carve/octree_impl.hpp
+       include/carve/pointset_decl.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/pointset_impl.hpp
+       include/carve/pointset_iter.hpp
+       include/carve/poly_decl.hpp
        include/carve/polyhedron_base.hpp
-       include/carve/heap.hpp
-       include/carve/spacetree.hpp
+       include/carve/polyhedron_decl.hpp
        include/carve/polyhedron_impl.hpp
-       include/carve/vcpp_config.h
-       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/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
+       include/carve/polyline_decl.hpp
+       include/carve/polyline.hpp
+       include/carve/polyline_impl.hpp
+       include/carve/polyline_iter.hpp
+       include/carve/rescale.hpp
+       include/carve/rtree.hpp
+       include/carve/spacetree.hpp
+       include/carve/tag.hpp
+       include/carve/timing.hpp
+       include/carve/tree.hpp
+       include/carve/triangulator.hpp
+       include/carve/triangulator_impl.hpp
+       include/carve/util.hpp
+       include/carve/vcpp_config.h
+       include/carve/vector.hpp
+       include/carve/vertex_decl.hpp
+       include/carve/vertex_impl.hpp
+       include/carve/win32.h
 )
 
 if(WITH_BOOST)
index 35166a6411e7356291e4e3ba4f77e772a756dbf9..2063164de083977e5c0052e33a40334a09342715 100644 (file)
@@ -647,12 +647,9 @@ void carve::csg::CSG::_generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::
     return;
   }
 
-  if (std::min(eb->v1()->v.x, eb->v2()->v.x) - carve::EPSILON > va->v.x ||
-      std::max(eb->v1()->v.x, eb->v2()->v.x) + carve::EPSILON < va->v.x ||
-      std::min(eb->v1()->v.y, eb->v2()->v.y) - carve::EPSILON > va->v.y ||
-      std::max(eb->v1()->v.y, eb->v2()->v.y) + carve::EPSILON < va->v.y ||
-      std::min(eb->v1()->v.z, eb->v2()->v.z) - carve::EPSILON > va->v.z ||
-      std::max(eb->v1()->v.z, eb->v2()->v.z) + carve::EPSILON < va->v.z) {
+  carve::geom::aabb<3> eb_aabb;
+  eb_aabb.fit(eb->v1()->v, eb->v2()->v);
+  if (eb_aabb.maxAxisSeparation(va->v) > carve::EPSILON) {
     return;
   }