Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/bvh/node.h
| Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | for (int i = 0; i < num_children; ++i) { | ||||
| visibility |= children[i]->visibility; | visibility |= children[i]->visibility; | ||||
| this->children[i] = children[i]; | this->children[i] = children[i]; | ||||
| time_from = min(time_from, children[i]->time_from); | time_from = min(time_from, children[i]->time_from); | ||||
| time_to = max(time_to, children[i]->time_to); | time_to = max(time_to, children[i]->time_to); | ||||
| } | } | ||||
| reset_unused_children(); | reset_unused_children(); | ||||
| } | } | ||||
| /* NOTE: This function is only used during binary BVH builder, and it | /* NOTE: This function is only used during binary BVH builder, and it's | ||||
| * supposed to be configured to have 2 children which will be filled-in in a | * supposed to be configured to have 2 children which will be filled-in in a | ||||
| * bit. But this is important to have children reset to NULL. */ | * bit. But this is important to have children reset to NULL. */ | ||||
| explicit InnerNode(const BoundBox &bounds) : BVHNode(bounds), num_children_(0) | explicit InnerNode(const BoundBox &bounds) : BVHNode(bounds), num_children_(0) | ||||
| { | { | ||||
| reset_unused_children(); | reset_unused_children(); | ||||
| visibility = 0; | visibility = 0; | ||||
| num_children_ = 2; | num_children_ = 2; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||