[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51315] trunk/blender/source/blender/ render/intern/raytrace/svbvh.h: fix for incorrect initial boundbox with svbvh raytracing.

Campbell Barton ideasman42 at gmail.com
Sun Oct 14 15:18:33 CEST 2012


Revision: 51315
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51315
Author:   campbellbarton
Date:     2012-10-14 13:18:32 +0000 (Sun, 14 Oct 2012)
Log Message:
-----------
fix for incorrect initial boundbox with svbvh raytracing. (bad use of FLT_MIN)

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/raytrace/svbvh.h

Modified: trunk/blender/source/blender/render/intern/raytrace/svbvh.h
===================================================================
--- trunk/blender/source/blender/render/intern/raytrace/svbvh.h	2012-10-14 13:08:19 UTC (rev 51314)
+++ trunk/blender/source/blender/render/intern/raytrace/svbvh.h	2012-10-14 13:18:32 UTC (rev 51315)
@@ -230,7 +230,7 @@
 		return node;
 	}
 	
-	void copy_bb(float *bb, const float *old_bb)
+	void copy_bb(float bb[6], const float old_bb[6])
 	{
 		std::copy(old_bb, old_bb + 6, bb);
 	}
@@ -281,7 +281,7 @@
 		
 		useless_bb += alloc_childs - nchilds;
 		while (alloc_childs > nchilds) {
-			const static float def_bb[6] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MIN, FLT_MIN, FLT_MIN };
+			const static float def_bb[6] = {FLT_MAX,  FLT_MAX,  FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX};
 			alloc_childs--;
 			node->child[alloc_childs] = NULL;
 			copy_bb(node->child_bb + alloc_childs * 6, def_bb);




More information about the Bf-blender-cvs mailing list