Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/bvh/bvh2.cpp')
-rw-r--r--intern/cycles/bvh/bvh2.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/intern/cycles/bvh/bvh2.cpp b/intern/cycles/bvh/bvh2.cpp
index 4a423c16559..e5dc4e6b1a8 100644
--- a/intern/cycles/bvh/bvh2.cpp
+++ b/intern/cycles/bvh/bvh2.cpp
@@ -30,6 +30,11 @@ BVH2::BVH2(const BVHParams& params_, const vector<Object*>& objects_)
{
}
+BVHNode *BVH2::widen_children_nodes(const BVHNode *root)
+{
+ return const_cast<BVHNode *>(root);
+}
+
void BVH2::pack_leaf(const BVHStackEntry& e,
const LeafNode *leaf)
{
@@ -188,9 +193,8 @@ void BVH2::pack_nodes(const BVHNode *root)
}
else {
stack.push_back(BVHStackEntry(root, nextNodeIdx));
- nextNodeIdx += node_is_unaligned(root, bvh2)
- ? BVH_UNALIGNED_NODE_SIZE
- : BVH_NODE_SIZE;
+ nextNodeIdx += root->has_unaligned() ? BVH_UNALIGNED_NODE_SIZE
+ : BVH_NODE_SIZE;
}
while(stack.size()) {
@@ -203,7 +207,7 @@ void BVH2::pack_nodes(const BVHNode *root)
pack_leaf(e, leaf);
}
else {
- /* innner node */
+ /* inner node */
int idx[2];
for(int i = 0; i < 2; ++i) {
if(e.node->get_child(i)->is_leaf()) {
@@ -211,7 +215,7 @@ void BVH2::pack_nodes(const BVHNode *root)
}
else {
idx[i] = nextNodeIdx;
- nextNodeIdx += node_is_unaligned(e.node->get_child(i), bvh2)
+ nextNodeIdx += e.node->get_child(i)->has_unaligned()
? BVH_UNALIGNED_NODE_SIZE
: BVH_NODE_SIZE;
}