Loading...
Searching...
No Matches
OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType > Class Template Reference

Midpoint subdivision algorithm. More...

`#include <OpenMesh/Tools/Subdivider/Uniform/MidpointT.hh>`

Inheritance diagram for OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >:
[legend]
Collaboration diagram for OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >:
[legend]

## Public Types

typedef RealType | real_t
typedef MeshType | mesh_t
typedef SubdividerT< MeshType, RealType > | parent_t
Public Types inherited from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >
typedef MeshType | mesh_t
typedef RealType | real_t

## Public Member Functions

| MidpointT (mesh_t &_m)
const char * | name () const
| Return name of subdivision algorithm.
Public Member Functions inherited from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >
| SubdividerT (void)
| Constructor to be used with interface 2.
| SubdividerT (MeshType &_m)
| Constructor to be used with interface 1 (calls attach())
virtual | ~SubdividerT ()
| Destructor (calls detach())
bool | operator() (MeshType &_m, size_t _n, const bool _update_points=true)
| Subdivide the mesh `_m` `_n` times.
bool | attach (MeshType &_m)
| Attach mesh `_m` to self.
bool | operator() (size_t _n, const bool _update_points=true)
| Subdivide the attached `_n` times.
void | detach (void)
| Detach an eventually attached mesh.

## Protected Member Functions

bool | prepare (mesh_t &_m)
| Prepare mesh, e.g. add properties.
bool | subdivide (mesh_t &_m, size_t _n, const bool _update_points=true)
| Performs one step of Midpoint subdivision.
bool | cleanup (mesh_t &_m)
| Cleanup mesh after usage, e.g. remove added properties.
Protected Member Functions inherited from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >

## Detailed Description

template<typename MeshType, typename RealType = double>
class OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >

Midpoint subdivision algorithm.

With every step, the set of vertices is replaced by the midpoints of all current edges. Then, two sets of faces are created to set up the new connectivity: From all midpoints of edges surrounding an original face, a new face is created. Also, for all midpoints of edges surrounding an original vertex, a new face is created.

Note
  This algorithm ignores the _update_points option.
  This algorithm is best suited for closed meshes since boundaries tend to fragment into isolated faces after a few iterations.

## Member Function Documentation

## cleanup()

template<typename MeshType , typename RealType = double>

bool OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >::cleanup | ( | mesh_t & | _m | ) |

inline protected virtual

Cleanup mesh after usage, e.g. remove added properties.

Implements OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >.

## name()

template<typename MeshType , typename RealType = double>

const char * OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >::name | ( |  | ) | const

inline virtual

Return name of subdivision algorithm.

Implements OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >.

## prepare()

template<typename MeshType , typename RealType = double>

bool OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >::prepare | ( | mesh_t & | _m | ) |

inline protected virtual

Prepare mesh, e.g. add properties.

Implements OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >.

## subdivide()

template<typename MeshType , typename RealType = double>

bool OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >::subdivide | ( | mesh_t & | _m,
|  | size_t | _n,
|  | const bool | _update_points = `true`
| ) |  |

inline protected virtual

Performs one step of Midpoint subdivision.

Note
  The _update_points option is ignored

Implements OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >.

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

- OpenMesh/Tools/Subdivider/Uniform/MidpointT.hh