projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix da bugs
[carveJwlIkooP6JGAAIwe30JlM.git]
/
bvh.h
diff --git
a/bvh.h
b/bvh.h
index 8b6b0784785973f1adf89ddbbb01636d656f1d64..52ce24ab75e39175923ab95a00e508882349afe8 100644
(file)
--- a/
bvh.h
+++ b/
bvh.h
@@
-90,7
+90,6
@@
VG_STATIC void bh_subdivide( bh_tree *bh, u32 inode )
if( extent[2] > extent[axis] ) axis = 2;
float split = node->bbx[0][axis] + extent[axis]*0.5f;
if( extent[2] > extent[axis] ) axis = 2;
float split = node->bbx[0][axis] + extent[axis]*0.5f;
-
float avg = 0.0;
for( u32 t=0; t<node->count; t++ )
{
float avg = 0.0;
for( u32 t=0; t<node->count; t++ )
{
@@
-98,9
+97,9
@@
VG_STATIC void bh_subdivide( bh_tree *bh, u32 inode )
avg += bh->system->item_centroid( bh->user, idx, axis );
}
avg /= (float)node->count;
avg += bh->system->item_centroid( bh->user, idx, axis );
}
avg /= (float)node->count;
-
split = avg;
split = avg;
+
i32 i = node->start,
j = i + node->count-1;
i32 i = node->start,
j = i + node->count-1;