add observer pattern to all decimaters
closes #2366 git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1197 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -198,6 +198,10 @@ size_t McDecimaterT<Mesh>::decimate(size_t _n_collapses) {
|
||||
// post-process collapse
|
||||
this->postprocess_collapse(ci);
|
||||
|
||||
// notify observer and stop if the observer requests it
|
||||
if (!this->notify_observer(n_collapses))
|
||||
return n_collapses;
|
||||
|
||||
} else {
|
||||
if (oldCollapses == n_collapses) {
|
||||
if (collapsesUnchanged == false) {
|
||||
@@ -337,6 +341,10 @@ size_t McDecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
|
||||
// post-process collapse
|
||||
this->postprocess_collapse(ci);
|
||||
|
||||
// notify observer and stop if the observer requests it
|
||||
if (!this->notify_observer(n_collapses))
|
||||
return n_collapses;
|
||||
|
||||
} else {
|
||||
if (oldCollapses == n_collapses) {
|
||||
if (collapsesUnchanged == false) {
|
||||
@@ -491,6 +499,10 @@ size_t McDecimaterT<Mesh>::decimate_constraints_only(float _factor) {
|
||||
// post-process collapse
|
||||
this->postprocess_collapse(ci);
|
||||
|
||||
// notify observer and stop if the observer requests it
|
||||
if (!this->notify_observer(n_collapses))
|
||||
return n_collapses;
|
||||
|
||||
} else {
|
||||
if (oldCollapses == n_collapses) {
|
||||
if (collapsesUnchanged == false) {
|
||||
|
||||
Reference in New Issue
Block a user