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

Abstract base class for uniform subdivision algorithms. More...

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

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

## Public Types

typedef MeshType | mesh_t
typedef RealType | real_t

## Public Member Functions

Constructors
| 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())
virtual const char * | name (void) const =0
| Return name of subdivision algorithm.
Interface 1
bool | operator() (MeshType &_m, size_t _n, const bool _update_points=true)
| Subdivide the mesh `_m` `_n` times.
Interface 2
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.

## Overload theses methods

virtual bool | prepare (MeshType &_m)=0
| Prepare mesh, e.g. add properties.
virtual bool | subdivide (MeshType &_m, size_t _n, const bool _update_points=true)=0
| Subdivide mesh `_m` `_n` times.
virtual bool | cleanup (MeshType &_m)=0
| Cleanup mesh after usage, e.g. remove added properties.

## Detailed Description

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

Abstract base class for uniform subdivision algorithms.

A derived class must overload the following functions:

1. const char* name() const
2. void prepare(MeshType&)
3. void subdivide(MeshType&, size_t, bool)
4. void cleanup(MeshType&)

## Constructor & Destructor Documentation

## SubdividerT() [1/2]

template<typename MeshType , typename RealType = double>

OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >::SubdividerT | ( | void |  | ) |

inline

Constructor to be used with interface 2.

See also
  attach(), operator()(size_t), detach()

## SubdividerT() [2/2]

template<typename MeshType , typename RealType = double>

OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >::SubdividerT | ( | MeshType & | _m | ) |

inline explicit

Constructor to be used with interface 1 (calls attach())

See also
  operator()( MeshType&, size_t )

## Member Function Documentation

## attach()

template<typename MeshType , typename RealType = double>

bool OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >::attach | ( | MeshType & | _m | ) |

inline

Attach mesh `_m` to self.

See also
  SubdividerT(), operator()(size_t), detach()

## cleanup()

template<typename MeshType , typename RealType = double>

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

protected pure virtual

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

Implemented in OpenMesh::Subdivider::Uniform::LongestEdgeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::ModifiedButterflyT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CatmullClarkT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, double >, OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT< MeshType, RealType >, and OpenMesh::Subdivider::Uniform::Sqrt3T< MeshType, RealType >.

## detach()

template<typename MeshType , typename RealType = double>

void OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >::detach | ( | void |  | ) |

inline

Detach an eventually attached mesh.

See also
  SubdividerT(), attach(), operator()(size_t)

## name()

template<typename MeshType , typename RealType = double>

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

pure virtual

Return name of subdivision algorithm.

Implemented in OpenMesh::Subdivider::Uniform::LongestEdgeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CatmullClarkT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeLoopT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeSqrt3T< MeshType, RealType >, OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::ModifiedButterflyT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::Sqrt3T< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >, and OpenMesh::Subdivider::Uniform::CompositeT< MeshType, double >.

## operator()() [1/2]

template<typename MeshType , typename RealType = double>

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

inline

Subdivide the mesh `_m` `_n` times.

See also
  SubdividerT(MeshType&)

## operator()() [2/2]

template<typename MeshType , typename RealType = double>

bool OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >::operator() | ( | size_t | _n,
|  | const bool | _update_points = `true`
| ) |  |

inline

Subdivide the attached `_n` times.

See also
  SubdividerT(), attach(), detach()

## prepare()

template<typename MeshType , typename RealType = double>

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

protected pure virtual

Prepare mesh, e.g. add properties.

Implemented in OpenMesh::Subdivider::Uniform::LongestEdgeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::ModifiedButterflyT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CatmullClarkT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, double >, OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT< MeshType, RealType >, and OpenMesh::Subdivider::Uniform::Sqrt3T< MeshType, RealType >.

## subdivide()

template<typename MeshType , typename RealType = double>

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

protected pure virtual

Subdivide mesh `_m` `_n` times.

Implemented in OpenMesh::Subdivider::Uniform::MidpointT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::LoopT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::LongestEdgeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CatmullClarkT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::CompositeT< MeshType, double >, OpenMesh::Subdivider::Uniform::ModifiedButterflyT< MeshType, RealType >, OpenMesh::Subdivider::Uniform::InterpolatingSqrt3LGT< MeshType, RealType >, and OpenMesh::Subdivider::Uniform::Sqrt3T< MeshType, RealType >.

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

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