From f3ece5a108db0bdbefb4663ef4ebd9a7e039e263 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 21 Oct 2012 05:46:41 +0000 Subject: style cleanup: trailing tabs & expand some non prefix tabs into spaces. --- source/blender/render/intern/raytrace/bvh.h | 2 +- .../render/intern/raytrace/rayobject_blibvh.cpp | 4 ++-- .../render/intern/raytrace/rayobject_instance.cpp | 2 +- .../render/intern/raytrace/rayobject_internal.h | 2 +- .../render/intern/raytrace/rayobject_qbvh.cpp | 2 +- .../render/intern/raytrace/rayobject_raycounter.cpp | 4 ++-- .../render/intern/raytrace/rayobject_rtbuild.cpp | 14 +++++++------- .../render/intern/raytrace/rayobject_vbvh.cpp | 4 ++-- source/blender/render/intern/raytrace/reorganize.h | 20 ++++++++++---------- source/blender/render/intern/raytrace/svbvh.h | 4 ++-- source/blender/render/intern/raytrace/vbvh.h | 2 +- 11 files changed, 30 insertions(+), 30 deletions(-) (limited to 'source/blender/render/intern/raytrace') diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index 103c04a590f..47d3a892e84 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -91,7 +91,7 @@ static inline int rayobject_bb_intersect_test(const Isect *isec, const float *_b if (t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return 0; if (t2x < 0.0f || t2y < 0.0f || t2z < 0.0f) return 0; if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0; - RE_RC_COUNT(isec->raycounter->bb.hit); + RE_RC_COUNT(isec->raycounter->bb.hit); return 1; } diff --git a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp index 2d642a0a0d8..198577f61c6 100644 --- a/source/blender/render/intern/raytrace/rayobject_blibvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_blibvh.cpp @@ -79,7 +79,7 @@ typedef struct BVHObject { RayObject *RE_rayobject_blibvh_create(int size) { BVHObject *obj = (BVHObject *)MEM_callocN(sizeof(BVHObject), "BVHObject"); - assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */ + assert(RE_rayobject_isAligned(obj)); /* RayObject API assumes real data to be 4-byte aligned */ obj->rayobj.api = &bvh_api; obj->bvh = BLI_bvhtree_new(size, 0.0, 4, 6); @@ -137,7 +137,7 @@ static void RE_rayobject_blibvh_add(RayObject *o, RayObject *ob) DO_MIN(min_max, obj->bb[0]); DO_MAX(min_max + 3, obj->bb[1]); - BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2); + BLI_bvhtree_insert(obj->bvh, obj->next_leaf - obj->leafs, min_max, 2); *(obj->next_leaf++) = ob; } diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp index c3e761ae069..f797f7a4311 100644 --- a/source/blender/render/intern/raytrace/rayobject_instance.cpp +++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp @@ -59,7 +59,7 @@ static RayObjectAPI instance_api = RE_rayobject_instance_free, RE_rayobject_instance_bb, RE_rayobject_instance_cost, - RE_rayobject_instance_hint_bb + RE_rayobject_instance_hint_bb }; typedef struct InstanceRayObject { diff --git a/source/blender/render/intern/raytrace/rayobject_internal.h b/source/blender/render/intern/raytrace/rayobject_internal.h index 07672f7bfb2..92ac39909a8 100644 --- a/source/blender/render/intern/raytrace/rayobject_internal.h +++ b/source/blender/render/intern/raytrace/rayobject_internal.h @@ -50,7 +50,7 @@ typedef int (*RE_rayobjectcontrol_test_break_callback)(void *data); typedef struct RayObjectControl { void *data; - RE_rayobjectcontrol_test_break_callback test_break; + RE_rayobjectcontrol_test_break_callback test_break; } RayObjectControl; /* Returns true if for some reason a heavy processing function should stop diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp index 16d70297a34..33ce3bd33d5 100644 --- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp @@ -68,7 +68,7 @@ void bvh_done(QBVHTree *obj) //Build and optimize the tree //TODO do this in 1 pass (half memory usage during building) - VBVHNode *root = BuildBinaryVBVH(arena1, &obj->rayobj.control).transform(obj->builder); + VBVHNode *root = BuildBinaryVBVH(arena1, &obj->rayobj.control).transform(obj->builder); if (RE_rayobjectcontrol_test_break(&obj->rayobj.control)) { BLI_memarena_free(arena1); diff --git a/source/blender/render/intern/raytrace/rayobject_raycounter.cpp b/source/blender/render/intern/raytrace/rayobject_raycounter.cpp index 7d86b6cf8cb..5335bf50cbc 100644 --- a/source/blender/render/intern/raytrace/rayobject_raycounter.cpp +++ b/source/blender/render/intern/raytrace/rayobject_raycounter.cpp @@ -43,10 +43,10 @@ void RE_RC_INFO(RayCounter *info) printf("\n"); printf("BB tests: %llu\n", info->bb.test ); printf("BB hits: %llu\n", info->bb.hit ); - printf("\n"); + printf("\n"); printf("SIMD BB tests: %llu\n", info->simd_bb.test ); printf("SIMD BB hits: %llu\n", info->simd_bb.hit ); - printf("\n"); + printf("\n"); printf("Primitives tests: %llu\n", info->faces.test ); printf("Primitives hits: %llu\n", info->faces.hit ); printf("------------------------------------\n"); diff --git a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp index 678aa8e5634..3ca21e14e4e 100644 --- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp +++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp @@ -77,7 +77,7 @@ RTBuilder *rtbuild_create(int size) for (int i = 0; i < 3; i++) { builder->sorted_begin[i] = (RTBuilder::Object **)MEM_mallocN(sizeof(RTBuilder::Object *) * size, "RTBuilder.sorted_objects"); builder->sorted_end[i] = builder->sorted_begin[i]; - } + } return builder; @@ -224,7 +224,7 @@ int rtbuild_mean_split(RTBuilder *b, int nchilds, int axis) Mleafs_per_child = s / nchilds; mleafs_per_child = Mleafs_per_child / nchilds; - //split min leafs per child + //split min leafs per child b->child_offset[0] = 0; for (i = 1; i <= nchilds; i++) b->child_offset[i] = mleafs_per_child; @@ -295,7 +295,7 @@ int rtbuild_median_split(RTBuilder *b, float *separators, int nchilds, int axis) return rtbuild_mean_split(b, nchilds, axis); return nchilds; - } + } } int rtbuild_median_split_largest_axis(RTBuilder *b, int nchilds) @@ -324,7 +324,7 @@ struct SweepCost { /* Object Surface Area Heuristic splitter */ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds) { - int size = rtbuild_size(b); + int size = rtbuild_size(b); assert(nchilds == 2); assert(size > 1); int baxis = -1, boffset = 0; @@ -429,7 +429,7 @@ int rtbuild_heuristic_object_split(RTBuilder *b, int nchilds) for (int i = 0; i < 3; i++) std::stable_partition(b->sorted_begin[i], b->sorted_end[i], selected_node); - return nchilds; + return nchilds; } /* @@ -494,7 +494,7 @@ int bb_largest_axis(const float min[3], const float max[3]) return 1; else return 2; - } + } } /* only returns 0 if merging inner and outerbox would create a box larger than outer box */ @@ -508,5 +508,5 @@ int bb_fits_inside(const float outer_min[3], const float outer_max[3], for (i = 0; i < 3; i++) if (outer_max[i] < inner_max[i]) return 0; - return 1; + return 1; } diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp index 85c9d0d402f..d03bdb74407 100644 --- a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp @@ -112,7 +112,7 @@ void bvh_done(VBVHTree *obj) //Finds the optimal packing of this tree using a given cost model //TODO this uses quite a lot of memory, find ways to reduce memory usage during building - OVBVHNode *root = BuildBinaryVBVH(arena2).transform(obj->builder); + OVBVHNode *root = BuildBinaryVBVH(arena2).transform(obj->builder); VBVH_optimalPackSIMD(PackCost()).transform(root); obj->root = Reorganize_VBVH(arena1).transform(root); @@ -125,7 +125,7 @@ void bvh_done(VBVHTree *obj) obj->builder = NULL; obj->node_arena = arena1; - obj->cost = 1.0; + obj->cost = 1.0; } template diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index a9ed71a76bc..9d9711eee56 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -75,7 +75,7 @@ void reorganize_find_fittest_parent(Node *tree, Node *node, std::pairbb, parent->bb + 3); cost = std::min(cost, std::make_pair(pcost, parent) ); for (Node *child = parent->child; child; child = child->sibling) - q.push(child); + q.push(child); } } } @@ -140,7 +140,7 @@ void remove_useless(Node *node, Node **new_node) (*prev)->sibling = next; prev = &((*prev)->sibling); } - } + } } if (node->child) { if (RE_rayobject_isAligned(node->child) && node->child->sibling == 0) @@ -181,7 +181,7 @@ void pushup(Node *parent) *prev = child; prev = &(*prev)->sibling; child = *prev; - } + } } for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling) @@ -205,13 +205,13 @@ void pushup_simd(Node *parent) n += (cn - 1); append_sibling(child, child->child); child = child->sibling; - *prev = child; + *prev = child; } else { *prev = child; prev = &(*prev)->sibling; child = *prev; - } + } } for (Node *child = parent->child; RE_rayobject_isAligned(child) && child; child = child->sibling) @@ -320,7 +320,7 @@ struct OVBVHNode { /* * Reorganize the node based on calculated cut costs - */ + */ int best_cutsize; void set_cut(int cutsize, OVBVHNode ***cut) { @@ -357,7 +357,7 @@ struct OVBVHNode { //Optimize new childs for (OVBVHNode *child = this->child; child && RE_rayobject_isAligned(child); child = child->sibling) child->optimize(); - } + } } }; @@ -431,7 +431,7 @@ struct VBVH_optimalPackSIMD { current_size -= bt[j][current_size]; } } - } + } } }; @@ -493,6 +493,6 @@ struct VBVH_optimalPackSIMD { if ((G.debug & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize); node->optimize(); } - return node; - } + return node; + } }; diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h index 4fdf3ac23e8..a515b986d77 100644 --- a/source/blender/render/intern/raytrace/svbvh.h +++ b/source/blender/render/intern/raytrace/svbvh.h @@ -96,7 +96,7 @@ static int svbvh_bb_intersect_test(const Isect *isec, const float *_bb) if (t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return 0; if (t1x > isec->dist || t1y > isec->dist || t1z > isec->dist) return 0; - RE_RC_COUNT(isec->raycounter->bb.hit); + RE_RC_COUNT(isec->raycounter->bb.hit); return 1; } @@ -307,7 +307,7 @@ struct Reorganize_SVBVH { prepare_for_simd(node); return node; - } + } }; #endif /* __SSE__ */ diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index ec671f95c76..9755bf89668 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -233,6 +233,6 @@ struct Reorganize_VBVH { *child_ptr = 0; return node; - } + } }; #endif -- cgit v1.2.3