Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool MainWindow::able_to_move(Model &new_model) {
- for (int i = 0; i < manager.model_list.size(); i++) {
- if (i != ui->modelList->currentRow()) {
- for (const Polygon& new_pol: new_model.polygons) {
- for (const Polygon& pol: manager.model_list[i].polygons) {
- bool check = pol.infront(new_model.get_center());
- for (const Point& new_p: new_pol.points) {
- if (new_pol.infront(new_p) != check) {
- return false;
- }
- }
- }
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement