Revision: 15945
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15945
Author:   jaguarandi
Date:     2008-08-04 13:50:36 +0200 (Mon, 04 Aug 2008)

Log Message:
-----------
Fixed double inflation in case of co_moving points

Modified Paths:
--------------
    branches/soc-2008-jaguarandi/source/blender/blenlib/intern/BLI_kdopbvh.c

Modified: 
branches/soc-2008-jaguarandi/source/blender/blenlib/intern/BLI_kdopbvh.c
===================================================================
--- branches/soc-2008-jaguarandi/source/blender/blenlib/intern/BLI_kdopbvh.c    
2008-08-04 11:47:17 UTC (rev 15944)
+++ branches/soc-2008-jaguarandi/source/blender/blenlib/intern/BLI_kdopbvh.c    
2008-08-04 11:50:36 UTC (rev 15945)
@@ -444,13 +444,6 @@
                                bv[(2 * i) + 1] = newminmax;
                }
        }
-
-       // inflate the bv with some epsilon
-       for (i = tree->start_axis; i < tree->stop_axis; i++)
-       {
-               bv[(2 * i)] -= tree->epsilon; // minimum 
-               bv[(2 * i) + 1] += tree->epsilon; // maximum 
-       }
 }
 
 // depends on the fact that the BVH's for each face is already build
@@ -503,6 +496,13 @@
        create_kdop_hull(tree, node, co, numpoints, 0);
        node->index= index;
        
+       // inflate the bv with some epsilon
+       for (i = tree->start_axis; i < tree->stop_axis; i++)
+       {
+               bv[(2 * i)] -= tree->epsilon; // minimum 
+               bv[(2 * i) + 1] += tree->epsilon; // maximum 
+       }
+
        return 1;
 }
 
@@ -890,6 +890,13 @@
        if(co_moving)
                create_kdop_hull(tree, node, co_moving, numpoints, 1);
        
+       // inflate the bv with some epsilon
+       for (i = tree->start_axis; i < tree->stop_axis; i++)
+       {
+               bv[(2 * i)] -= tree->epsilon; // minimum 
+               bv[(2 * i) + 1] += tree->epsilon; // maximum 
+       }
+
        return 1;
 }
 


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to