```Bottom-up adjacencies are now computed automatically on-the-fly when adding/deleting
entities. For this only a minimal subset of affected entities is recomputed.

Refactored delete functions and normal attrib class.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@169 66977474-1d4b-4f09-8fe9-267525286df2```
parent 81588995
 ... ... @@ -66,7 +66,7 @@ NormalAttrib::~NormalAttrib() { template void NormalAttrib::update_vertex_normals() { if(!kernel_.has_bottom_up_adjacencies()) { if(!kernel_.has_face_bottom_up_adjacencies()) { std::cerr << "Error: update_vertex_normals() needs bottom-up adjacencies!" << std::endl; return; } ... ... @@ -82,6 +82,11 @@ void NormalAttrib::update_vertex_normals() { template void NormalAttrib::update_face_normals() { if(!kernel_.has_face_bottom_up_adjacencies()) { std::cerr << "Error: update_normals() needs bottom-up adjacencies!" << std::endl; return; } for(FaceIter f_it = kernel_.f_iter(); f_it.valid(); ++f_it) { // Assume the face is planar, so just take the // first two edges ... ... @@ -134,7 +139,7 @@ void NormalAttrib::compute_face_normal(const FaceHandle& _fh) { ++he_it; typename GeomKernelT::PointT p3 = kernel_.vertex(kernel_.halfedge(*he_it).to_vertex()); typename GeomKernelT::PointT n = (p3 - p2) % (p1 - p2); typename GeomKernelT::PointT n = (p1 - p2) % (p3 - p2); n.normalize(); f_normals_[_fh.idx()] = n; ... ...
 ... ... @@ -112,14 +112,9 @@ void StatusAttrib::garbage_collection(bool _preserveManifoldness) { } } // Step 5 if(kernel_.has_bottom_up_adjacencies()) { kernel_.update_adjacencies(); } // Step 6 if(_preserveManifoldness) { if(kernel_.has_bottom_up_adjacencies()) { if(kernel_.has_full_bottom_up_adjacencies()) { // Go over all faces and find those // that are not incident to any cell ... ... @@ -135,15 +130,11 @@ void StatusAttrib::garbage_collection(bool _preserveManifoldness) { f_it = kernel_.delete_face(*f_it); kernel_.update_face_adjacencies(); } else { ++f_it; } } kernel_.update_edge_adjacencies(); // Go over all edges and find those // whose half-edges are not incident to any half-face for(EdgeIter e_it = kernel_.edges_begin(); e_it != kernel_.edges_end();) { ... ... @@ -160,17 +151,11 @@ void StatusAttrib::garbage_collection(bool _preserveManifoldness) { e_it = kernel_.delete_edge(*e_it); kernel_.update_edge_adjacencies(); } else { ++e_it; } } // Vertex caches have to be re-computed because the face/half-face // indices have changed since the last deletions kernel_.update_vertex_adjacencies(); // Go over all vertices and find those // that are not incident to any edge for(VertexIter v_it = kernel_.vertices_begin(); v_it != kernel_.vertices_end();) { ... ... @@ -182,10 +167,8 @@ void StatusAttrib::garbage_collection(bool _preserveManifoldness) { v_it = kernel_.delete_vertex(*v_it); kernel_.update_vertex_adjacencies(); } else { ++v_it; ++v_it; } } ... ...
 ... ... @@ -72,11 +72,8 @@ public: // Store vertex in list vertices_.push_back(_p); // Resize vertex props KernelT::resize_vprops(vertices_.size()); // Get handle of recently created vertex return VertexHandle(vertices_.size() - 1); return KernelT::add_vertex(); } /// Set the coordinates of point _vh ... ...
{"ft_lang_label":"__label__en","ft_lang_prob":0.8183661,"math_prob":0.7922822,"size":470,"snap":"2020-34-2020-40","text_gpt3_token_len":122,"char_repetition_ratio":0.08583691,"word_repetition_ratio":0.0,"special_character_ratio":0.24255319,"punctuation_ratio":0.125,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9632027,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-05T02:01:42Z\",\"WARC-Record-ID\":\"<urn:uuid:d9be47c7-4ae0-4ba2-81da-27ec363146ab>\",\"Content-Length\":\"932070\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:0099d21e-127c-41c0-8315-4a0c1e77efda>\",\"WARC-Concurrent-To\":\"<urn:uuid:fce034e5-3b83-4f87-b28c-1d66e78fd1f4>\",\"WARC-IP-Address\":\"137.226.35.174\",\"WARC-Target-URI\":\"https://www.graphics.rwth-aachen.de:9000/OpenVolumeMesh/OpenVolumeMesh/-/commit/d2d3162c5d622abbc07fb8883b47a191bc2e4776\",\"WARC-Payload-Digest\":\"sha1:RORCVMJ4NHCFX7TQFNDK2PFOHBZRIMP4\",\"WARC-Block-Digest\":\"sha1:7URTRSG6RFJWNXM3ANA56XG7H6GS22JH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439735906.77_warc_CC-MAIN-20200805010001-20200805040001-00510.warc.gz\"}"}