diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-29 15:30:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-29 15:45:49 +0300 |
commit | 270df9a60fd892b52ba5104ca9352ea4b4082ecd (patch) | |
tree | d6a800f6e4c02c2cc4eae8080182eb15cd5ddf92 /intern/cycles/bvh/bvh.cpp | |
parent | 30bed91b78366e7e2b2f0bc928517c36756e28c2 (diff) |
Cycles: Cleanup, don't use m_ prefix for public properties
Diffstat (limited to 'intern/cycles/bvh/bvh.cpp')
-rw-r--r-- | intern/cycles/bvh/bvh.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/intern/cycles/bvh/bvh.cpp b/intern/cycles/bvh/bvh.cpp index cb579aea499..18e8c2bfdf2 100644 --- a/intern/cycles/bvh/bvh.cpp +++ b/intern/cycles/bvh/bvh.cpp @@ -424,7 +424,7 @@ static bool node_bvh_is_unaligned(const BVHNode *node) { const BVHNode *node0 = node->get_child(0), *node1 = node->get_child(1); - return node0->is_unaligned() || node1->is_unaligned(); + return node0->is_unaligned || node1->is_unaligned; } RegularBVH::RegularBVH(const BVHParams& params_, const vector<Object*>& objects_) @@ -438,19 +438,19 @@ void RegularBVH::pack_leaf(const BVHStackEntry& e, assert(e.idx + BVH_NODE_LEAF_SIZE <= pack.leaf_nodes.size()); float4 data[BVH_NODE_LEAF_SIZE]; memset(data, 0, sizeof(data)); - if(leaf->num_triangles() == 1 && pack.prim_index[leaf->m_lo] == -1) { + if(leaf->num_triangles() == 1 && pack.prim_index[leaf->lo] == -1) { /* object */ - data[0].x = __int_as_float(~(leaf->m_lo)); + data[0].x = __int_as_float(~(leaf->lo)); data[0].y = __int_as_float(0); } else { /* triangle */ - data[0].x = __int_as_float(leaf->m_lo); - data[0].y = __int_as_float(leaf->m_hi); + data[0].x = __int_as_float(leaf->lo); + data[0].y = __int_as_float(leaf->hi); } - data[0].z = __uint_as_float(leaf->m_visibility); + data[0].z = __uint_as_float(leaf->visibility); if(leaf->num_triangles() != 0) { - data[0].w = __uint_as_float(pack.prim_type[leaf->m_lo]); + data[0].w = __uint_as_float(pack.prim_type[leaf->lo]); } memcpy(&pack.leaf_nodes[e.idx], data, sizeof(float4)*BVH_NODE_LEAF_SIZE); @@ -460,7 +460,7 @@ void RegularBVH::pack_inner(const BVHStackEntry& e, const BVHStackEntry& e0, const BVHStackEntry& e1) { - if(e0.node->is_unaligned() || e1.node->is_unaligned()) { + if(e0.node->is_unaligned || e1.node->is_unaligned) { pack_unaligned_inner(e, e0, e1); } else { pack_aligned_inner(e, e0, e1); @@ -472,9 +472,9 @@ void RegularBVH::pack_aligned_inner(const BVHStackEntry& e, const BVHStackEntry& e1) { pack_aligned_node(e.idx, - e0.node->m_bounds, e1.node->m_bounds, + e0.node->bounds, e1.node->bounds, e0.encodeIdx(), e1.encodeIdx(), - e0.node->m_visibility, e1.node->m_visibility); + e0.node->visibility, e1.node->visibility); } void RegularBVH::pack_aligned_node(int idx, @@ -515,10 +515,10 @@ void RegularBVH::pack_unaligned_inner(const BVHStackEntry& e, pack_unaligned_node(e.idx, e0.node->get_aligned_space(), e1.node->get_aligned_space(), - e0.node->m_bounds, - e1.node->m_bounds, + e0.node->bounds, + e1.node->bounds, e0.encodeIdx(), e1.encodeIdx(), - e0.node->m_visibility, e1.node->m_visibility); + e0.node->visibility, e1.node->visibility); } void RegularBVH::pack_unaligned_node(int idx, @@ -769,18 +769,18 @@ static bool node_qbvh_is_unaligned(const BVHNode *node) *node1 = node->get_child(1); bool has_unaligned = false; if(node0->is_leaf()) { - has_unaligned |= node0->is_unaligned(); + has_unaligned |= node0->is_unaligned; } else { - has_unaligned |= node0->get_child(0)->is_unaligned(); - has_unaligned |= node0->get_child(1)->is_unaligned(); + has_unaligned |= node0->get_child(0)->is_unaligned; + has_unaligned |= node0->get_child(1)->is_unaligned; } if(node1->is_leaf()) { - has_unaligned |= node1->is_unaligned(); + has_unaligned |= node1->is_unaligned; } else { - has_unaligned |= node1->get_child(0)->is_unaligned(); - has_unaligned |= node1->get_child(1)->is_unaligned(); + has_unaligned |= node1->get_child(0)->is_unaligned; + has_unaligned |= node1->get_child(1)->is_unaligned; } return has_unaligned; } @@ -795,19 +795,19 @@ void QBVH::pack_leaf(const BVHStackEntry& e, const LeafNode *leaf) { float4 data[BVH_QNODE_LEAF_SIZE]; memset(data, 0, sizeof(data)); - if(leaf->num_triangles() == 1 && pack.prim_index[leaf->m_lo] == -1) { + if(leaf->num_triangles() == 1 && pack.prim_index[leaf->lo] == -1) { /* object */ - data[0].x = __int_as_float(~(leaf->m_lo)); + data[0].x = __int_as_float(~(leaf->lo)); data[0].y = __int_as_float(0); } else { /* triangle */ - data[0].x = __int_as_float(leaf->m_lo); - data[0].y = __int_as_float(leaf->m_hi); + data[0].x = __int_as_float(leaf->lo); + data[0].y = __int_as_float(leaf->hi); } - data[0].z = __uint_as_float(leaf->m_visibility); + data[0].z = __uint_as_float(leaf->visibility); if(leaf->num_triangles() != 0) { - data[0].w = __uint_as_float(pack.prim_type[leaf->m_lo]); + data[0].w = __uint_as_float(pack.prim_type[leaf->lo]); } memcpy(&pack.leaf_nodes[e.idx], data, sizeof(float4)*BVH_QNODE_LEAF_SIZE); @@ -823,7 +823,7 @@ void QBVH::pack_inner(const BVHStackEntry& e, */ if(params.use_unaligned_nodes) { for(int i = 0; i < num; i++) { - if(en[i].node->is_unaligned()) { + if(en[i].node->is_unaligned) { has_unaligned = true; break; } @@ -848,15 +848,15 @@ void QBVH::pack_aligned_inner(const BVHStackEntry& e, BoundBox bounds[4]; int child[4]; for(int i = 0; i < num; ++i) { - bounds[i] = en[i].node->m_bounds; + bounds[i] = en[i].node->bounds; child[i] = en[i].encodeIdx(); } pack_aligned_node(e.idx, bounds, child, - e.node->m_visibility, - e.node->m_time_from, - e.node->m_time_to, + e.node->visibility, + e.node->time_from, + e.node->time_to, num); } @@ -917,16 +917,16 @@ void QBVH::pack_unaligned_inner(const BVHStackEntry& e, int child[4]; for(int i = 0; i < num; ++i) { aligned_space[i] = en[i].node->get_aligned_space(); - bounds[i] = en[i].node->m_bounds; + bounds[i] = en[i].node->bounds; child[i] = en[i].encodeIdx(); } pack_unaligned_node(e.idx, aligned_space, bounds, child, - e.node->m_visibility, - e.node->m_time_from, - e.node->m_time_to, + e.node->visibility, + e.node->time_from, + e.node->time_to, num); } |