diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-21 18:49:41 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-24 10:46:40 +0300 |
commit | 99c1870ad5462d1fd81324c8607aad44d0b2deb1 (patch) | |
tree | 96c93b6eeec2419c41ece40f881625eb8441da2c /intern/cycles/bvh/bvh_split.h | |
parent | 9b57d70f3b486611701e8a5b966fce9e1c380d81 (diff) |
Cycles: Move primitive splitting into own functions
This way it's easy to add more reference types allowed for splitting to the
BVH reference split function without making this function too much big. This
way it's possible to experiment with such features as splitting object instance
references.
So far should not be any functional changes.
Diffstat (limited to 'intern/cycles/bvh/bvh_split.h')
-rw-r--r-- | intern/cycles/bvh/bvh_split.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_split.h b/intern/cycles/bvh/bvh_split.h index 5b739311e5f..1b550d11b15 100644 --- a/intern/cycles/bvh/bvh_split.h +++ b/intern/cycles/bvh/bvh_split.h @@ -55,7 +55,26 @@ public: BVHSpatialSplit(BVHBuild *builder, const BVHRange& range, float nodeSAH); void split(BVHBuild *builder, BVHRange& left, BVHRange& right, const BVHRange& range); - void split_reference(BVHBuild *builder, BVHReference& left, BVHReference& right, const BVHReference& ref, int dim, float pos); + void split_reference(BVHBuild *builder, + BVHReference& left, + BVHReference& right, + const BVHReference& ref, + int dim, + float pos); + +protected: + void split_triangle_reference(const BVHReference& ref, + const Mesh *mesh, + int dim, + float pos, + BoundBox& left_bounds, + BoundBox& right_bounds); + void split_curve_reference(const BVHReference& ref, + const Mesh *mesh, + int dim, + float pos, + BoundBox& left_bounds, + BoundBox& right_bounds); }; /* Mixed Object-Spatial Split */ |