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

This class provides the composite subdivision rules for the uniform case. More...

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

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

## Classes

struct | Coeff
| Abstract base class for coefficient functions. More...

## Public Types

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

## Public Member Functions

| CompositeT (MeshType &_mesh)
virtual const char * | name (void) const override=0
| 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 Types

typedef MeshType::Scalar | scalar_t
typedef MeshType::VertexHandle | VertexHandle
typedef MeshType::FaceHandle | FaceHandle
typedef MeshType::EdgeHandle | EdgeHandle
typedef MeshType::HalfedgeHandle | HalfedgeHandle

## Protected Member Functions

bool | prepare (MeshType &_m) override
| Prepare mesh, e.g.
bool | subdivide (MeshType &_m, size_t _n, const bool _update_points=true) override
| Subdivide mesh `_m` `_n` times.
bool | cleanup (MeshType &_m) override
| Cleanup mesh after usage, e.g. remove added properties.
virtual void | apply_rules (void)=0
| Assemble here the rule sequence, by calling the constructor of the wanted rules.
void | commit (MeshType &_m)
| Move vertices to new positions after the rules have been applied to the mesh (called by subdivide()).
Protected Member Functions inherited from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >

## Uniform composite subdivision rules

void | Tvv3 ()
| Split Face, using Vertex information (1-3 split)
void | Tvv4 ()
| Split Face, using Vertex information (1-4 split)
void | Tfv ()
| Split Face, using Face Information.
void | FF ()
| Face to face averaging.
void | FFc (Coeff &_coeff)
| Weighted face to face averaging.
void | FFc (scalar_t _c)
| Weighted face to face averaging.
void | FV ()
| Face to vertex averaging.
void | FVc (Coeff &_coeff)
| Weighted face to vertex Averaging with flaps.
void | FVc (scalar_t _c)
| Weighted face to vertex Averaging with flaps.
void | FE ()
| Face to edge averaging.
void | VF ()
| Vertex to Face Averaging.
void | VFa (Coeff &_coeff)
| Vertex to Face Averaging, weighted.
void | VFa (scalar_t _alpha)
| Vertex to Face Averaging, weighted.
void | VV ()
| Vertex to vertex averaging.
void | VVc (Coeff &_coeff)
| Vertex to vertex averaging, weighted.
void | VVc (scalar_t _c)
| Vertex to vertex averaging, weighted.
void | VE ()
| VE Step (Vertex to Edge Averaging)
void | VdE ()
| Vertex to edge averaging, using diamond of edges.
void | VdEc (scalar_t _c)
| Weighted vertex to edge averaging, using diamond of edges.
void | VdEg (Coeff &_coeff)
| Weigthed vertex to edge averaging, using diamond of edges for irregular vertices.
void | VdEg (scalar_t _gamma)
| Weigthed vertex to edge averaging, using diamond of edges for irregular vertices.
void | EF ()
| Edge to face averaging.
void | EV ()
| Edge to vertex averaging.
void | EVc (Coeff &_coeff)
| Weighted edge to vertex averaging.
void | EVc (scalar_t _c)
| Weighted edge to vertex averaging.
void | EdE ()
| Edge to edge averaging w/ flap rule.
void | EdEc (scalar_t _c)
| Weighted edge to edge averaging w/ flap rule.
void | corner_cutting (HalfedgeHandle _heh)
| Corner Cutting.
VertexHandle | split_edge (HalfedgeHandle _heh)
| Split Edge.

## Detailed Description

template<typename MeshType, typename RealType = float>
class OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >

This class provides the composite subdivision rules for the uniform case.

To create a subdivider derive from this class and overload the functions name() and apply_rules(). In the latter one call the wanted rules.

For details on the composite scheme refer to

- P. Oswald, P. Schroeder "Composite primal/dual sqrt(3)-subdivision schemes", CAGD 20, 3, 2003, 135–164

Note
  Not all rules are implemented!

See also
  class Adaptive::CompositeT

## Member Function Documentation

## apply_rules()

template<typename MeshType , typename RealType = float>

virtual void OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >::apply_rules | ( | void |  | ) |

protected pure virtual

Assemble here the rule sequence, by calling the constructor of the wanted rules.

Implemented in OpenMesh::Subdivider::Uniform::CompositeLoopT< MeshType, RealType >, and OpenMesh::Subdivider::Uniform::CompositeSqrt3T< MeshType, RealType >.

## cleanup()

template<typename MeshType , typename RealType = float>

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

inline override protected virtual

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

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

## name()

template<typename MeshType , typename RealType = float>

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

override pure virtual

Return name of subdivision algorithm.

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

Implemented in OpenMesh::Subdivider::Uniform::CompositeLoopT< MeshType, RealType >, and OpenMesh::Subdivider::Uniform::CompositeSqrt3T< MeshType, RealType >.

## prepare()

template<typename MeshType , typename RealType >

bool OpenMesh::Subdivider::Uniform::CompositeT< MeshType, RealType >::prepare | ( | MeshType & |  | ) |

override protected virtual

Prepare mesh, e.g.

add properties

You have to reimplement this function to setup your mesh. The default implementation will always return false and therefore block your algorithm.

Reimplemented from OpenMesh::Subdivider::Uniform::SubdividerT< MeshType, RealType >.

## subdivide()

template<typename MeshType , typename RealType = float>

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

inline override protected virtual

Subdivide mesh `_m` `_n` times.

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

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

- OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh
- OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT_impl.hh