[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21332] branches/soc-2009-jaguarandi/ source/blender/render/intern/source/rayobject_bvh.c: *little fix

André Pinto andresusanopinto at gmail.com
Fri Jul 3 04:56:59 CEST 2009


Revision: 21332
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21332
Author:   jaguarandi
Date:     2009-07-03 04:56:54 +0200 (Fri, 03 Jul 2009)

Log Message:
-----------
*little fix

Modified Paths:
--------------
    branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c

Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c
===================================================================
--- branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c	2009-07-03 02:26:40 UTC (rev 21331)
+++ branches/soc-2009-jaguarandi/source/blender/render/intern/source/rayobject_bvh.c	2009-07-03 02:56:54 UTC (rev 21332)
@@ -186,6 +186,7 @@
 static BVHNode *bvh_new_node(BVHTree *tree, int nid)
 {
 	BVHNode *node = tree->alloc + nid - 1;
+	assert(RayObject_isAligned(node));
 	if(node+1 > tree->next_node)
 		tree->next_node = node+1;
 		
@@ -211,7 +212,8 @@
 		{
 			int i;
 			BVHNode *parent = bvh_new_node(tree, nid);
-			
+			parent->split_axis = 0;
+
 			INIT_MINMAX(parent->bb, parent->bb+3);
 
 			for(i=0; i<1; i++)
@@ -226,6 +228,7 @@
 		}
 		else
 		{
+			assert(!RayObject_isAligned(child));
 			//Its a sub-raytrace structure, assume it has it own raycast
 			//methods and adding a Bounding Box arround is unnecessary
 			return (BVHNode*)child;





More information about the Bf-blender-cvs mailing list