diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-21 18:36:57 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-31 11:06:21 +0300 |
commit | e69a0ab5fcd54dbc9e4172739e41650bc07905c6 (patch) | |
tree | 28bfaa0164294c7500ed3b5eca243fa29e062a8d /intern/cycles/bvh/bvh_build.cpp | |
parent | d9b729e342b72bfe31e7932723a149db3b7aa77c (diff) |
Cycles: Pass BVH builder by const reference to spatial splitters
Diffstat (limited to 'intern/cycles/bvh/bvh_build.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh_build.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index ce15e1bbc65..9f1fb9c520d 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -339,7 +339,7 @@ void BVHBuild::thread_build_node(InnerNode *inner, int child, BVHObjectBinning * } } -bool BVHBuild::range_within_max_leaf_size(const BVHRange& range) +bool BVHBuild::range_within_max_leaf_size(const BVHRange& range) const { size_t size = range.size(); size_t max_leaf_size = max(params.max_triangle_leaf_size, params.max_curve_leaf_size); @@ -352,7 +352,7 @@ bool BVHBuild::range_within_max_leaf_size(const BVHRange& range) size_t num_motion_curves = 0; for(int i = 0; i < size; i++) { - BVHReference& ref = references[range.start() + i]; + const BVHReference& ref = references[range.start() + i]; if(ref.prim_type() & PRIMITIVE_CURVE) num_curves++; @@ -424,7 +424,7 @@ BVHNode* BVHBuild::build_node(const BVHRange& range, int level) } /* splitting test */ - BVHMixedSplit split(this, &spatial_storage[0], range, level); + BVHMixedSplit split(*this, &spatial_storage[0], range, level); if(!(range.size() > 0 && params.top_level && level == 0)) { if(split.no_split) { |