|
|
@ -152,11 +152,11 @@ dynamic_bitset_mp<> filter_cells_by_boolean(const baked_blobtree_t& |
|
|
|
|
|
|
|
const auto& other_cell_sign = stacked_nodes.top().cell_signs; |
|
|
|
switch (iter->get_operation()) { |
|
|
|
case internal::eNodeOperation::unionOp: temp_info.cell_signs |= other_cell_sign; break; |
|
|
|
case internal::eNodeOperation::intersectionOp: temp_info.cell_signs &= other_cell_sign; break; |
|
|
|
case internal::eNodeOperation::unionOp: temp_info.cell_signs &= other_cell_sign; break; |
|
|
|
case internal::eNodeOperation::intersectionOp: temp_info.cell_signs |= other_cell_sign; break; |
|
|
|
case internal::eNodeOperation::differenceOp: |
|
|
|
// stacked nodes are always left childs
|
|
|
|
temp_info.cell_signs.flip() &= other_cell_sign; |
|
|
|
temp_info.cell_signs.flip() |= other_cell_sign; |
|
|
|
break; |
|
|
|
default: throw std::runtime_error("ERROR: baked blobtree with unknown type operation node"); break; |
|
|
|
} |
|
|
@ -171,5 +171,6 @@ dynamic_bitset_mp<> filter_cells_by_boolean(const baked_blobtree_t& |
|
|
|
assert(stacked_nodes.size() == 1); |
|
|
|
assert(stacked_nodes.top().parent_index == 0xFFFFFFFF); |
|
|
|
|
|
|
|
return stacked_nodes.top().cell_signs; |
|
|
|
// sign 0 in blobtree means inside, so we need to flip the sign
|
|
|
|
return stacked_nodes.top().cell_signs.flip(); |
|
|
|
} |