Domain_status Domain_operation::update_domains(Board& board, Cell& triggering_cell) { std::set<Cell*> cells = board.get_constraining_cells(triggering_cell); for (std::set<Cell*>::iterator it = cells.begin(); it != cells.end(); ++it) { if (update_domain(board, *(*it)) == DOM_FAILURE) return DOM_FAILURE; } return DOM_SUCCESS; }
Domain_status Domain_operation::refresh_domains(Board& board) { reset_domains(board); std::vector<Cell*> cells = board.get_cells(); for (int i = 0; i < (int)cells.size(); ++i) { Cell* cell = cells.at(i); if (update_domain(board, *cell) == DOM_FAILURE) return DOM_FAILURE; } return DOM_SUCCESS; }
void Painter::update(DSC::DeformableSimplicialComplex& dsc) { interface->clear_data(); wire_frame->clear_data(); edges->clear_data(); domain->clear_data(); low_quality->clear_data(); unmoved->clear_data(); switch (display_type) { case INTERFACE: update_interface(dsc); break; case WIRE_FRAME: update_wire_frame(dsc); break; case BOUNDARY: update_interface(dsc); update_domain(dsc); break; case EDGES: update_wire_frame(dsc); update_edges(dsc); break; case LOW_QUALITY: update_interface(dsc); update_low_quality(dsc); break; case UNMOVED: update_interface(dsc); update_unmoved(dsc); break; default: break; } }