- added the set_error_tolerance_factor function to ModBaseT and implemented it in inherited classes as necessary

- added the set_error_tolerance_factor function to BaseDecimaterT, which calls set_error_tolerance_factor for all loaded Mods
- implemented a decimate_constraints_only function for the McDecimater (and adjusted the MixedDecimater accordingly)
- implemented stop criterions for the McDecimater
- added some OpenMP loops for the sample generation to the McDecimater

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@685 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Isaak Lim
2012-09-19 16:15:39 +00:00
parent 33b72fb6ba
commit 48289493f3
18 changed files with 493 additions and 119 deletions

View File

@@ -76,6 +76,20 @@ float ModEdgeLengthT<MeshT>::collapse_priority(const CollapseInfo& _ci) {
return ( (sqr_length <= sqr_edge_length_) ? sqr_length : float(Base::ILLEGAL_COLLAPSE));
}
//-----------------------------------------------------------------------------
template<class MeshT>
void ModEdgeLengthT<MeshT>::set_error_tolerance_factor(double _factor) {
if (_factor >= 0.0 && _factor <= 1.0) {
// the smaller the factor, the smaller edge_length_ gets
// thus creating a stricter constraint
// division by error_tolerance_factor_ is for normalization
float edge_length = edge_length_ * _factor / this->error_tolerance_factor_;
set_edge_length(edge_length);
this->error_tolerance_factor_ = _factor;
}
}
//=============================================================================
}
}