diff --git a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc index 8b6cb215..6d160fec 100644 --- a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc +++ b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc @@ -60,8 +60,8 @@ namespace Decimater { //== IMPLEMENTATION ========================================================== -template -typename ModAspectRatioT::Scalar ModAspectRatioT::aspectRatio( +template +typename ModAspectRatioT::Scalar ModAspectRatioT::aspectRatio( const Point& _v0, const Point& _v1, const Point& _v2) { Point d0 = _v0 - _v1; Point d1 = _v1 - _v2; @@ -91,8 +91,8 @@ typename ModAspectRatioT::Scalar ModAspectRatioT::aspect //----------------------------------------------------------------------------- -template -void ModAspectRatioT::initialize() { +template +void ModAspectRatioT::initialize() { typename Mesh::FaceIter f_it, f_end(mesh_.faces_end()); typename Mesh::FVIter fv_it; @@ -107,8 +107,8 @@ void ModAspectRatioT::initialize() { //----------------------------------------------------------------------------- -template -void ModAspectRatioT::preprocess_collapse(const CollapseInfo& _ci) { +template +void ModAspectRatioT::preprocess_collapse(const CollapseInfo& _ci) { typename Mesh::FaceHandle fh; typename Mesh::FVIter fv_it; @@ -126,8 +126,8 @@ void ModAspectRatioT::preprocess_collapse(const CollapseInfo& _ci) { //----------------------------------------------------------------------------- -template -float ModAspectRatioT::collapse_priority(const CollapseInfo& _ci) { +template +float ModAspectRatioT::collapse_priority(const CollapseInfo& _ci) { typename Mesh::VertexHandle v2, v3; typename Mesh::FaceHandle fh; const typename Mesh::Point *p1(&_ci.p1), *p2, *p3; diff --git a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh index b91e41ce..b04f246a 100644 --- a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh +++ b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.hh @@ -76,20 +76,20 @@ namespace Decimater { * * */ -template -class ModAspectRatioT: public ModBaseT { +template +class ModAspectRatioT: public ModBaseT { public: - DECIMATING_MODULE( ModAspectRatioT, DecimaterT, Roundness ) + DECIMATING_MODULE( ModAspectRatioT, MeshT, Roundness ) ; typedef typename Mesh::Scalar Scalar; typedef typename Mesh::Point Point; /// constructor - ModAspectRatioT(DecimaterT& _dec, float _min_aspect = 5.0, bool _is_binary = + ModAspectRatioT(MeshT& _mesh, float _min_aspect = 5.0, bool _is_binary = true) : - Base(_dec, _is_binary), mesh_(Base::mesh()), min_aspect_( + Base(_mesh, _is_binary), mesh_(Base::mesh()), min_aspect_( 1.0 / _min_aspect) { mesh_.add_property(aspect_); } diff --git a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc index e235d6fe..7e7f8538 100644 --- a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc +++ b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.cc @@ -60,17 +60,17 @@ namespace Decimater { //== IMPLEMENTATION ========================================================== -template -ModEdgeLengthT::ModEdgeLengthT(DecimaterT &_dec, float _edge_length, +template +ModEdgeLengthT::ModEdgeLengthT(MeshT &_mesh, float _edge_length, bool _is_binary) : - Base(_dec, _is_binary), mesh_(Base::mesh()) { + Base(_mesh, _is_binary), mesh_(Base::mesh()) { set_edge_length(_edge_length); } //----------------------------------------------------------------------------- -template -float ModEdgeLengthT::collapse_priority(const CollapseInfo& _ci) { +template +float ModEdgeLengthT::collapse_priority(const CollapseInfo& _ci) { typename Mesh::Scalar sqr_length = (_ci.p0 - _ci.p1).sqrnorm(); return ( (sqr_length <= sqr_edge_length_) ? sqr_length : float(Base::ILLEGAL_COLLAPSE)); diff --git a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh index 603d9aa0..4b3c7fdd 100644 --- a/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh +++ b/src/OpenMesh/Tools/Decimater/ModEdgeLengthT.hh @@ -70,15 +70,15 @@ namespace Decimater { * - The length after the collapse is lower than the given tolerance * */ -template -class ModEdgeLengthT: public ModBaseT { +template +class ModEdgeLengthT: public ModBaseT { public: - DECIMATING_MODULE( ModEdgeLengthT, DecimaterT, EdgeLength ) + DECIMATING_MODULE( ModEdgeLengthT, MeshT, EdgeLength ) ; /// Constructor - ModEdgeLengthT(DecimaterT& _dec, float _edge_length = FLT_MAX, + ModEdgeLengthT(MeshT& _mesh, float _edge_length = FLT_MAX, bool _is_binary = true); /// get edge_length diff --git a/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc b/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc index f8387fc9..91184eb4 100644 --- a/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc +++ b/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc @@ -64,9 +64,9 @@ namespace Decimater { //== IMPLEMENTATION ========================================================== -template -typename ModHausdorffT::Scalar -ModHausdorffT:: +template +typename ModHausdorffT::Scalar +ModHausdorffT:: distPointTriangleSquared( const Point& _p, const Point& _v0, const Point& _v1, @@ -191,9 +191,9 @@ distPointTriangleSquared( const Point& _p, } -template +template void -ModHausdorffT:: +ModHausdorffT:: initialize() { typename Mesh::FIter f_it(mesh_.faces_begin()), f_end(mesh_.faces_end()); @@ -206,9 +206,9 @@ initialize() //----------------------------------------------------------------------------- -template +template float -ModHausdorffT:: +ModHausdorffT:: collapse_priority(const CollapseInfo& _ci) { static Points points; points.clear(); @@ -268,9 +268,9 @@ collapse_priority(const CollapseInfo& _ci) //----------------------------------------------------------------------------- -template +template void -ModHausdorffT:: +ModHausdorffT:: postprocess_collapse(const CollapseInfo& _ci) { static Points points; @@ -351,9 +351,9 @@ postprocess_collapse(const CollapseInfo& _ci) //----------------------------------------------------------------------------- -template -typename ModHausdorffT::Scalar -ModHausdorffT:: +template +typename ModHausdorffT::Scalar +ModHausdorffT:: compute_sqr_error(FaceHandle _fh, const Point& _p) const { typename Mesh::CFVIter fv_it = mesh_.cfv_iter(_fh); diff --git a/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh b/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh index 7b6b6ef6..24428637 100644 --- a/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh +++ b/src/OpenMesh/Tools/Decimater/ModHausdorffT.hh @@ -74,11 +74,11 @@ namespace Decimater { * * No continuous mode */ -template -class ModHausdorffT: public ModBaseT { +template +class ModHausdorffT: public ModBaseT { public: - DECIMATING_MODULE( ModHausdorffT, DecimaterT, Roundness ); + DECIMATING_MODULE( ModHausdorffT, MeshT, Roundness ); typedef typename Mesh::Scalar Scalar; typedef typename Mesh::Point Point; @@ -86,8 +86,8 @@ class ModHausdorffT: public ModBaseT { typedef std::vector Points; /// Constructor - ModHausdorffT(DecimaterT& _dec, Scalar _error_tolerance = FLT_MAX) : - Base(_dec, true), mesh_(Base::mesh()), tolerance_(_error_tolerance) { + ModHausdorffT(MeshT& _mesh, Scalar _error_tolerance = FLT_MAX) : + Base(_mesh, true), mesh_(Base::mesh()), tolerance_(_error_tolerance) { mesh_.add_property(points_); } diff --git a/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh b/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh index 9b2bc88b..64727e71 100644 --- a/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh +++ b/src/OpenMesh/Tools/Decimater/ModIndependentSetsT.hh @@ -65,15 +65,15 @@ namespace Decimater { // BEGIN_NS_DECIMATER /** Lock one-ring around remaining vertex after a collapse to prevent * further collapses of halfedges incident to the one-ring vertices. */ -template -class ModIndependentSetsT: public ModBaseT { +template +class ModIndependentSetsT: public ModBaseT { public: - DECIMATING_MODULE( ModIndependentSetsT, DecimaterType, IndependentSets ) + DECIMATING_MODULE( ModIndependentSetsT, MeshT, IndependentSets ) ; /// Constructor - ModIndependentSetsT(DecimaterType &_dec) : - Base(_dec, true) { + ModIndependentSetsT(MeshT &_mesh) : + Base(_mesh, true) { } /// override diff --git a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh index 0f55a592..7532adc6 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh @@ -83,12 +83,12 @@ namespace Decimater { * * In continuous mode the maximal deviation is returned */ -template -class ModNormalDeviationT : public ModBaseT< DecimaterT > +template +class ModNormalDeviationT : public ModBaseT< MeshT > { public: - DECIMATING_MODULE( ModNormalDeviationT, DecimaterT, NormalDeviation ); + DECIMATING_MODULE( ModNormalDeviationT, MeshT, NormalDeviation ); typedef typename Mesh::Scalar Scalar; typedef typename Mesh::Point Point; @@ -103,8 +103,8 @@ public: public: /// Constructor - ModNormalDeviationT(DecimaterT& _dec, float _max_dev = 180.0) - : Base(_dec, true), mesh_(Base::mesh()) + ModNormalDeviationT(MeshT& _mesh, float _max_dev = 180.0) + : Base(_mesh, true), mesh_(Base::mesh()) { set_normal_deviation(_max_dev); mesh_.add_property(normal_cones_); diff --git a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh index d6b8be9a..5ec40c03 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh @@ -74,17 +74,17 @@ namespace Decimater { // BEGIN_NS_DECIMATER * collapse. The collapse will pass the test, if the deviation is below * a given threshold. */ -template -class ModNormalFlippingT : public ModBaseT< DecimaterT > +template +class ModNormalFlippingT : public ModBaseT< MeshT > { public: - DECIMATING_MODULE( ModNormalFlippingT, DecimaterT, NormalFlipping ); + DECIMATING_MODULE( ModNormalFlippingT, MeshT, NormalFlipping ); public: /// Constructor - ModNormalFlippingT( DecimaterT &_dec) : Base(_dec, true) + ModNormalFlippingT( MeshT &_mesh) : Base(_mesh, true) { set_max_normal_deviation( 90.0f ); } diff --git a/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc b/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc index a13c7956..c2624bac 100644 --- a/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc +++ b/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc @@ -74,9 +74,9 @@ namespace Decimater { //== IMPLEMENTATION ========================================================== -template +template bool -ModProgMeshT:: +ModProgMeshT:: write( const std::string& _ofname ) { // sort vertices diff --git a/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh b/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh index 3c1ac45f..b05eab24 100644 --- a/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh +++ b/src/OpenMesh/Tools/Decimater/ModProgMeshT.hh @@ -74,12 +74,12 @@ namespace Decimater { * can be evaluated after the decimation process and (!) before calling * the garbage collection of the decimated mesh. */ -template -class ModProgMeshT : public ModBaseT +template +class ModProgMeshT : public ModBaseT { public: - DECIMATING_MODULE( ModProgMeshT, DecimaterType, ProgMesh ); + DECIMATING_MODULE( ModProgMeshT, MeshT, ProgMesh ); /** Struct storing progressive mesh information * \see CollapseInfoT, ModProgMeshT @@ -106,7 +106,7 @@ public: public: /// Constructor - ModProgMeshT( DecimaterType &_dec ) : Base(_dec, true) + ModProgMeshT( MeshT &_mesh ) : Base(_mesh, true) { Base::mesh().add_property( idx_ ); } diff --git a/src/OpenMesh/Tools/Decimater/ModQuadricT.hh b/src/OpenMesh/Tools/Decimater/ModQuadricT.hh index cc3a9305..4a5fe008 100644 --- a/src/OpenMesh/Tools/Decimater/ModQuadricT.hh +++ b/src/OpenMesh/Tools/Decimater/ModQuadricT.hh @@ -72,22 +72,22 @@ namespace Decimater { * * This module can be used as a binary and non-binary module. */ -template -class ModQuadricT : public ModBaseT +template +class ModQuadricT : public ModBaseT { public: // Defines the types Self, Handle, Base, Mesh, and CollapseInfo // and the memberfunction name() - DECIMATING_MODULE( ModQuadricT, DecimaterType, Quadric ); + DECIMATING_MODULE( ModQuadricT, MeshT, Quadric ); public: /** Constructor * \internal */ - ModQuadricT( DecimaterType &_dec ) - : Base(_dec, false) + ModQuadricT( MeshT &_mesh ) + : Base(_mesh, false) { unset_max_err(); Base::mesh().add_property( quadrics_ ); diff --git a/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh b/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh index 4caebe94..b1295816 100644 --- a/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh +++ b/src/OpenMesh/Tools/Decimater/ModRoundnessT.hh @@ -80,11 +80,11 @@ namespace Decimater { // BEGIN_NS_DECIMATER * * In continuous mode the roundness after the collapse is returned */ -template -class ModRoundnessT : public ModBaseT +template +class ModRoundnessT : public ModBaseT { public: - DECIMATING_MODULE( ModRoundnessT, DecimaterType, Roundness ); + DECIMATING_MODULE( ModRoundnessT, MeshT, Roundness ); public: @@ -95,7 +95,7 @@ class ModRoundnessT : public ModBaseT public: /// Constructor - ModRoundnessT( DecimaterType &_dec ) : + ModRoundnessT( MeshT &_dec ) : Base(_dec, false), min_r_(-1.0) { }