void Scene_c3t3_item::c3t3_changed() { // Update colors // Fill indices map and get max subdomain value indices_.clear(); int max = 0; for (C3t3::Cells_in_complex_iterator cit = this->c3t3().cells_in_complex_begin(), end = this->c3t3().cells_in_complex_end(); cit != end; ++cit) { max = (std::max)(max, cit->subdomain_index()); indices_.insert(cit->subdomain_index()); } for (C3t3::Facets_in_complex_iterator fit = this->c3t3().facets_in_complex_begin(), end = this->c3t3().facets_in_complex_end(); fit != end; ++fit) { max = (std::max)(max, fit->first->surface_patch_index(fit->second)); indices_.insert(fit->first->surface_patch_index(fit->second)); } d->colors.resize(max + 1); compute_color_map(color_); // Rebuild histogram build_histogram(); }
void Scene_c3t3_item::c3t3_changed() { // Update colors // Fill indices map and get max subdomain value indices_.clear(); int max = 0; for (C3t3::Cells_in_complex_iterator cit = this->c3t3().cells_in_complex_begin(), end = this->c3t3().cells_in_complex_end(); cit != end; ++cit) { max = (std::max)(max, cit->subdomain_index()); indices_.insert(cit->subdomain_index()); } d->colors.resize(max + 1); compute_color_map(color_); // Rebuild histogram build_histogram(); //compute_elements(); this->invalidate_buffers(); need_changed = false; }