diff options
Diffstat (limited to 'source/blender/render/intern/raytrace/rayobject_svbvh.cpp')
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject_svbvh.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp index 7ce444a2e99..02821d45c50 100644 --- a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp @@ -79,11 +79,11 @@ void bvh_done<SVBVHTree>(SVBVHTree *obj) BLI_memarena_use_align(arena2, 16); //Build and optimize the tree - if(0) + if (0) { VBVHNode *root = BuildBinaryVBVH<VBVHNode>(arena1, &obj->rayobj.control).transform(obj->builder); - if(RE_rayobjectcontrol_test_break(&obj->rayobj.control)) + if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) { BLI_memarena_free(arena1); BLI_memarena_free(arena2); @@ -106,14 +106,14 @@ void bvh_done<SVBVHTree>(SVBVHTree *obj) //TODO this uses quite a lot of memory, find ways to reduce memory usage during building OVBVHNode *root = BuildBinaryVBVH<OVBVHNode>(arena1,&obj->rayobj.control).transform(obj->builder); - if(RE_rayobjectcontrol_test_break(&obj->rayobj.control)) + if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) { BLI_memarena_free(arena1); BLI_memarena_free(arena2); return; } - if(root) { + if (root) { VBVH_optimalPackSIMD<OVBVHNode,PackCost>(PackCost()).transform(root); obj->root = Reorganize_SVBVH<OVBVHNode>(arena2).transform(root); } @@ -135,8 +135,8 @@ template<int StackSize> int intersect(SVBVHTree *obj, Isect* isec) { //TODO renable hint support - if(RE_rayobject_isAligned(obj->root)) { - if(isec->mode == RE_RAY_SHADOW) + if (RE_rayobject_isAligned(obj->root)) { + if (isec->mode == RE_RAY_SHADOW) return svbvh_node_stack_raycast<StackSize,true>(obj->root, isec); else return svbvh_node_stack_raycast<StackSize,false>(obj->root, isec); @@ -177,7 +177,7 @@ RayObjectAPI* bvh_get_api(int maxstacksize) { static RayObjectAPI bvh_api256 = make_api<Tree,1024>(); - if(maxstacksize <= 1024) return &bvh_api256; + if (maxstacksize <= 1024) return &bvh_api256; assert(maxstacksize <= 256); return 0; } |