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/bvh_node.cpp')
-rw-r--r--intern/cycles/bvh/bvh_node.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/intern/cycles/bvh/bvh_node.cpp b/intern/cycles/bvh/bvh_node.cpp
index 4edfb4b70a4..63683bae4a3 100644
--- a/intern/cycles/bvh/bvh_node.cpp
+++ b/intern/cycles/bvh/bvh_node.cpp
@@ -24,8 +24,6 @@
CCL_NAMESPACE_BEGIN
-/* BVH Node */
-
int BVHNode::getSubtreeSize(BVH_STAT stat) const
{
int cnt = 0;
@@ -61,8 +59,7 @@ int BVHNode::getSubtreeSize(BVH_STAT stat) const
void BVHNode::deleteSubtree()
{
for(int i=0;i<num_children();i++)
- if(get_child(i))
- get_child(i)->deleteSubtree();
+ get_child(i)->deleteSubtree();
delete this;
}
@@ -73,27 +70,12 @@ float BVHNode::computeSubtreeSAHCost(const BVHParams& p, float probability) cons
for(int i=0;i<num_children();i++) {
BVHNode *child = get_child(i);
- SAH += child->computeSubtreeSAHCost(p, probability * child->m_bounds.safe_area()/m_bounds.safe_area());
+ SAH += child->computeSubtreeSAHCost(p, probability * child->m_bounds.area()/m_bounds.area());
}
return SAH;
}
-uint BVHNode::update_visibility()
-{
- if(!is_leaf() && m_visibility == 0) {
- InnerNode *inner = (InnerNode*)this;
- BVHNode *child0 = inner->children[0];
- BVHNode *child1 = inner->children[1];
-
- m_visibility = child0->update_visibility()|child1->update_visibility();
- }
-
- return m_visibility;
-}
-
-/* Inner Node */
-
void InnerNode::print(int depth) const
{
for(int i = 0; i < depth; i++)