[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15945] branches/soc-2008-jaguarandi/ source/blender/blenlib/intern/BLI_kdopbvh.c: Fixed double inflation in case of co_moving points

André Pinto andresusanopinto at gmail.com
Mon Aug 4 13:50:36 CEST 2008


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;
 }
 





More information about the Bf-blender-cvs mailing list