Commit a093b541 authored by Matthias Möller's avatar Matthias Möller

- rename module template parameters

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@650 fdac6126-5c0c-442c-9429-916003d36597
parent 54fafe05
......@@ -60,8 +60,8 @@ namespace Decimater {
//== IMPLEMENTATION ==========================================================
template<class DecimaterT>
typename ModAspectRatioT<DecimaterT>::Scalar ModAspectRatioT<DecimaterT>::aspectRatio(
template<class MeshT>
typename ModAspectRatioT<MeshT>::Scalar ModAspectRatioT<MeshT>::aspectRatio(
const Point& _v0, const Point& _v1, const Point& _v2) {
Point d0 = _v0 - _v1;
Point d1 = _v1 - _v2;
......@@ -91,8 +91,8 @@ typename ModAspectRatioT<DecimaterT>::Scalar ModAspectRatioT<DecimaterT>::aspect
//-----------------------------------------------------------------------------
template<class DecimaterT>
void ModAspectRatioT<DecimaterT>::initialize() {
template<class MeshT>
void ModAspectRatioT<MeshT>::initialize() {
typename Mesh::FaceIter f_it, f_end(mesh_.faces_end());
typename Mesh::FVIter fv_it;
......@@ -107,8 +107,8 @@ void ModAspectRatioT<DecimaterT>::initialize() {
//-----------------------------------------------------------------------------
template<class DecimaterT>
void ModAspectRatioT<DecimaterT>::preprocess_collapse(const CollapseInfo& _ci) {
template<class MeshT>
void ModAspectRatioT<MeshT>::preprocess_collapse(const CollapseInfo& _ci) {
typename Mesh::FaceHandle fh;
typename Mesh::FVIter fv_it;
......@@ -126,8 +126,8 @@ void ModAspectRatioT<DecimaterT>::preprocess_collapse(const CollapseInfo& _ci) {
//-----------------------------------------------------------------------------
template<class DecimaterT>
float ModAspectRatioT<DecimaterT>::collapse_priority(const CollapseInfo& _ci) {
template<class MeshT>
float ModAspectRatioT<MeshT>::collapse_priority(const CollapseInfo& _ci) {
typename Mesh::VertexHandle v2, v3;
typename Mesh::FaceHandle fh;
const typename Mesh::Point *p1(&_ci.p1), *p2, *p3;
......
......@@ -76,20 +76,20 @@ namespace Decimater {
*
*
*/
template<class DecimaterT>
class ModAspectRatioT: public ModBaseT<DecimaterT> {
template<class MeshT>
class ModAspectRatioT: public ModBaseT<MeshT> {
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_);
}
......
......@@ -60,17 +60,17 @@ namespace Decimater {
//== IMPLEMENTATION ==========================================================
template<class DecimaterT>
ModEdgeLengthT<DecimaterT>::ModEdgeLengthT(DecimaterT &_dec, float _edge_length,
template<class MeshT>
ModEdgeLengthT<MeshT>::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<class DecimaterT>
float ModEdgeLengthT<DecimaterT>::collapse_priority(const CollapseInfo& _ci) {
template<class MeshT>
float ModEdgeLengthT<MeshT>::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));
......
......@@ -70,15 +70,15 @@ namespace Decimater {
* - The length after the collapse is lower than the given tolerance
*
*/
template<class DecimaterT>
class ModEdgeLengthT: public ModBaseT<DecimaterT> {
template<class MeshT>
class ModEdgeLengthT: public ModBaseT<MeshT> {
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
......
......@@ -64,9 +64,9 @@ namespace Decimater {
//== IMPLEMENTATION ==========================================================
template <class DecimaterT>
typename ModHausdorffT<DecimaterT>::Scalar
ModHausdorffT<DecimaterT>::
template <class MeshT>
typename ModHausdorffT<MeshT>::Scalar
ModHausdorffT<MeshT>::
distPointTriangleSquared( const Point& _p,
const Point& _v0,
const Point& _v1,
......@@ -191,9 +191,9 @@ distPointTriangleSquared( const Point& _p,
}
template <class DecimaterT>
template <class MeshT>
void
ModHausdorffT<DecimaterT>::
ModHausdorffT<MeshT>::
initialize()
{
typename Mesh::FIter f_it(mesh_.faces_begin()), f_end(mesh_.faces_end());
......@@ -206,9 +206,9 @@ initialize()
//-----------------------------------------------------------------------------
template <class DecimaterT>
template <class MeshT>
float
ModHausdorffT<DecimaterT>::
ModHausdorffT<MeshT>::
collapse_priority(const CollapseInfo& _ci)
{
static Points points; points.clear();
......@@ -268,9 +268,9 @@ collapse_priority(const CollapseInfo& _ci)
//-----------------------------------------------------------------------------
template <class DecimaterT>
template <class MeshT>
void
ModHausdorffT<DecimaterT>::
ModHausdorffT<MeshT>::
postprocess_collapse(const CollapseInfo& _ci)
{
static Points points;
......@@ -351,9 +351,9 @@ postprocess_collapse(const CollapseInfo& _ci)
//-----------------------------------------------------------------------------
template <class DecimaterT>
typename ModHausdorffT<DecimaterT>::Scalar
ModHausdorffT<DecimaterT>::
template <class MeshT>
typename ModHausdorffT<MeshT>::Scalar
ModHausdorffT<MeshT>::
compute_sqr_error(FaceHandle _fh, const Point& _p) const
{
typename Mesh::CFVIter fv_it = mesh_.cfv_iter(_fh);
......
......@@ -74,11 +74,11 @@ namespace Decimater {
*
* No continuous mode
*/
template<class DecimaterT>
class ModHausdorffT: public ModBaseT<DecimaterT> {
template<class MeshT>
class ModHausdorffT: public ModBaseT<MeshT> {
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<DecimaterT> {
typedef std::vector<Point> 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_);
}
......
......@@ -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 DecimaterType>
class ModIndependentSetsT: public ModBaseT<DecimaterType> {
template<class MeshT>
class ModIndependentSetsT: public ModBaseT<MeshT> {
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
......
......@@ -83,12 +83,12 @@ namespace Decimater {
*
* In continuous mode the maximal deviation is returned
*/
template <class DecimaterT>
class ModNormalDeviationT : public ModBaseT< DecimaterT >
template <class MeshT>
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_);
......
......@@ -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 <typename DecimaterT>
class ModNormalFlippingT : public ModBaseT< DecimaterT >
template <typename MeshT>
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 );
}
......
......@@ -74,9 +74,9 @@ namespace Decimater {
//== IMPLEMENTATION ==========================================================
template <class DecimaterType>
template <class MeshT>
bool
ModProgMeshT<DecimaterType>::
ModProgMeshT<MeshT>::
write( const std::string& _ofname )
{
// sort vertices
......
......@@ -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 DecimaterType>
class ModProgMeshT : public ModBaseT<DecimaterType>
template <class MeshT>
class ModProgMeshT : public ModBaseT<MeshT>
{
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_ );
}
......
......@@ -72,22 +72,22 @@ namespace Decimater {
*
* This module can be used as a binary and non-binary module.
*/
template <class DecimaterType>
class ModQuadricT : public ModBaseT<DecimaterType>
template <class MeshT>
class ModQuadricT : public ModBaseT<MeshT>
{
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_ );
......
......@@ -80,11 +80,11 @@ namespace Decimater { // BEGIN_NS_DECIMATER
*
* In continuous mode the roundness after the collapse is returned
*/
template <class DecimaterType>
class ModRoundnessT : public ModBaseT<DecimaterType>
template <class MeshT>
class ModRoundnessT : public ModBaseT<MeshT>
{
public:
DECIMATING_MODULE( ModRoundnessT, DecimaterType, Roundness );
DECIMATING_MODULE( ModRoundnessT, MeshT, Roundness );
public:
......@@ -95,7 +95,7 @@ class ModRoundnessT : public ModBaseT<DecimaterType>
public:
/// Constructor
ModRoundnessT( DecimaterType &_dec ) :
ModRoundnessT( MeshT &_dec ) :
Base(_dec, false),
min_r_(-1.0)
{ }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment