OpenMesh
OpenMesh::Decimater::ModAspectRatioT< MeshT > Class Template Reference

Use aspect ratio to control decimation. More...

#include <OpenMesh/Tools/Decimater/ModAspectRatioT.hh>

Inheritance diagram for OpenMesh::Decimater::ModAspectRatioT< MeshT >:
Collaboration diagram for OpenMesh::Decimater::ModAspectRatioT< MeshT >:

Public Types

typedef ModAspectRatioT< MeshT > Self
 
typedef OpenMesh::Decimater::ModHandleT< SelfHandle
 
typedef OpenMesh::Decimater::ModBaseT< MeshT > Base
 
typedef Base::Mesh Mesh
 
typedef Base::CollapseInfo CollapseInfo
 
typedef Mesh::Scalar Scalar
 
typedef Mesh::Point Point
 
- Public Types inherited from OpenMesh::Decimater::ModBaseT< MeshT >
enum  { ILLEGAL_COLLAPSE = -1 , LEGAL_COLLAPSE = 0 }
 
typedef MeshT Mesh
 
typedef CollapseInfoT< MeshT > CollapseInfo
 

Public Member Functions

virtual const std::string & name () const override
 Set module's name. More...
 
 ModAspectRatioT (MeshT &_mesh, float _min_aspect=5.0, bool _is_binary=true)
 constructor
 
 ~ModAspectRatioT ()
 destructor
 
float aspect_ratio () const
 get aspect ratio
 
void set_aspect_ratio (float _f)
 set aspect ratio
 
void initialize () override
 precompute face aspect ratio More...
 
float collapse_priority (const CollapseInfo &_ci) override
 Returns the collapse priority.
 
void preprocess_collapse (const CollapseInfo &_ci) override
 update aspect ratio of one-ring
 
void set_error_tolerance_factor (double _factor) override
 set percentage of aspect ratio More...
 
- Public Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
virtual ~ModBaseT ()
 Virtual desctructor.
 
virtual const std::string & name () const
 Set module's name. More...
 
bool is_binary (void) const
 Returns true if criteria returns a binary value.
 
void set_binary (bool _b)
 Set whether module is binary or not.
 
virtual void initialize ()
 Initialize module-internal stuff. More...
 
virtual float collapse_priority (const CollapseInfoT< MeshT > &)
 Return collapse priority. More...
 
virtual void preprocess_collapse (const CollapseInfoT< MeshT > &)
 Before _from_vh has been collapsed into _to_vh, this method will be called.
 
virtual void postprocess_collapse (const CollapseInfoT< MeshT > &)
 After _from_vh has been collapsed into _to_vh, this method will be called. More...
 
virtual void set_error_tolerance_factor (double _factor)
 This provides a function that allows the setting of a percentage of the original contraint. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMesh::Decimater::ModBaseT< MeshT >
 ModBaseT (MeshT &_mesh, bool _is_binary)
 Default constructor. More...
 
MeshT & mesh ()
 Access the mesh associated with the decimater.
 
- Protected Attributes inherited from OpenMesh::Decimater::ModBaseT< MeshT >
double error_tolerance_factor_
 

Detailed Description

template<class MeshT>
class OpenMesh::Decimater::ModAspectRatioT< MeshT >

Use aspect ratio to control decimation.

This module computes the aspect ratio.

In binary mode, the collapse is legal if:

  • The aspect ratio after the collapse is greater
  • The aspect ratio after the collapse is greater than the given minimum

In continuous mode the collapse is illegal if:

  • The aspect ratio after the collapse is smaller than the given minimum

Member Function Documentation

◆ initialize()

template<class MeshT >
void OpenMesh::Decimater::ModAspectRatioT< MeshT >::initialize ( void  )
overridevirtual

precompute face aspect ratio

Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.

◆ name()

template<class MeshT >
virtual const std::string & OpenMesh::Decimater::ModAspectRatioT< MeshT >::name ( ) const
inlineoverridevirtual

Set module's name.

Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.

◆ set_error_tolerance_factor()

template<class MeshT >
void OpenMesh::Decimater::ModAspectRatioT< MeshT >::set_error_tolerance_factor ( double  _factor)
overridevirtual

set percentage of aspect ratio

Reimplemented from OpenMesh::Decimater::ModBaseT< MeshT >.


The documentation for this class was generated from the following files:

Project OpenMesh, ©  Visual Computing Institute, RWTH Aachen. Documentation generated using doxygen .