Loading...
Searching...
No Matches
OpenMesh::Subdivider::Adaptive::CompositeT< M > Class Template Reference

Adaptive Composite Subdivision framework. More...

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

## Public Types

typedef RuleInterfaceT< M > | Rule
typedef M | Mesh
typedef std::vector< Rule * > | RuleSequence
typedef M::VertexHandle | VH
typedef M::FaceHandle | FH
typedef M::EdgeHandle | EH
typedef M::HalfedgeHandle | HH

## Public Member Functions

| CompositeT (Mesh &_mesh)
| Constructor.
void | cleanup (void)
| Reset `self` to state after the default constructor except of the mesh.
bool | initialize (void)
| Initialize faces, edges, vertices, and rules.
void | refine (typename M::FaceHandle &_fh)
| Refine one face.
void | refine (typename M::VertexHandle &_vh)
| Raise one vertex to next final level.
int | subdiv_type ()
| Return subdivision split type (3 for 1-to-3 split, 4 for 1-to-4 split).
const Rule & | subdiv_rule () const

## Managing composite rules

template<typename R>
RuleHandleT< R > | add ()
| Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.
template<typename R>
RuleHandleT< R > & | add (RuleHandleT< R > &_rh)
| Add new rule to rule sequence by passing an appropriate handle to the method.
template<typename R>
RuleHandleT< R >::Rule & | rule (const RuleHandleT< R > &_rh)
| Get rule in the rule sequence by a handle.
RuleInterfaceT< M > & | rule (size_t _idx)
| Get rule (interface) by index.
size_t | n_rules () const
| Number of rules in the rule sequence.
std::string | rules_as_string (const std::string &_sep=" * ") const
| Return the sequence as string.
const RuleSequence & | rules () const
| The rule sequence.
state_t | generation (state_t _s) const
| Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.
state_t | generation (VH _vh) const
| Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.
state_t | generation (EH _eh) const
| Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.
state_t | generation (FH _fh) const
| Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.

## Detailed Description

template<typename M>
class OpenMesh::Subdivider::Adaptive::CompositeT< M >

Adaptive Composite Subdivision framework.

The adaptive composite subdivision framework is based on the work done by P. Oswald and P. Schroeder. This framework elevates the uniform case of the composite scheme to the adaptive setting.

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

For details on the transition from uniform to adaptive composite subdivision please refer to

- A. von Studnitz, A. Sovakar, L. Kobbelt "API Design for Adaptive Subdivision Schemes" OpenSG Symposium 2003

In the composite scheme a subdivision operator is created by combining smaller "atomic" rules. Depending on the selection and ordering of the operator many known subdivision schemes can be created.

Every rule inherits from RuleInterfaceT and is represented out of the subdivider object by a RuleHandleT (as usual within OpenMesh). You can add rules using the CompositeT::add() functions. The correct order of adding the rules is very important, and furthermore not all rules get along with each other very well. (Please read the given literature, especially the paper by Oswald and Schr�der.)

To use a composite subdivider first define a rule sequence describing the order of execution of the rules. In the order the rules habe been added they will be executed. E.g. the rules given in operator notation have to added from right to left.

After the rule sequence has been defined the subdivider has to be intialized using CompositeT::initialize(). If everything went well, use CompositeT::refine() to subdivide locally a face or vertex.

Note
  Not all (topological) operators have been implemented!
  Only triangle meshes are supported.
  The rule sequence must begin with a topological operator.

See also
  RuleInterfaceT, RuleHandleT

## Member Function Documentation

## add() [1/2]

template<typename M>
template<typename R>

RuleHandleT< R > OpenMesh::Subdivider::Adaptive::CompositeT< M >::add | ( |  | ) |

inline

Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.

Returns
  Valid handle on success. Else it is invalid.

## add() [2/2]

template<typename M>
template<typename R>

RuleHandleT< R > & OpenMesh::Subdivider::Adaptive::CompositeT< M >::add | ( | RuleHandleT< R > & | _rh | ) |

inline

Add new rule to rule sequence by passing an appropriate handle to the method.

Returns
  Valid handle on success. Else it is invalid.

## generation() [1/4]

template<typename M>

state_t OpenMesh::Subdivider::Adaptive::CompositeT< M >::generation | ( | EH | _eh | ) | const

inline protected

Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.

Returns
  Valid handle on success. Else it is invalid.

## generation() [2/4]

template<typename M>

state_t OpenMesh::Subdivider::Adaptive::CompositeT< M >::generation | ( | FH | _fh | ) | const

inline protected

Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.

Returns
  Valid handle on success. Else it is invalid.

## generation() [3/4]

template<typename M>

state_t OpenMesh::Subdivider::Adaptive::CompositeT< M >::generation | ( | state_t | _s | ) | const

inline protected

Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.

Returns
  Valid handle on success. Else it is invalid.

## generation() [4/4]

template<typename M>

state_t OpenMesh::Subdivider::Adaptive::CompositeT< M >::generation | ( | VH | _vh | ) | const

inline protected

Add new rule to rule sequence by passing the type of the wanted rule as template argument to the method.

Returns
  Valid handle on success. Else it is invalid.

## rule() [1/2]

template<typename M>
template<typename R>

RuleHandleT< R >::Rule & OpenMesh::Subdivider::Adaptive::CompositeT< M >::rule | ( | const RuleHandleT< R > & | _rh | ) |

inline

Get rule in the rule sequence by a handle.

Returns
  The wanted rule if the handle is valid. The return value is undefined if the handle is invalid!

## rule() [2/2]

template<typename M>

RuleInterfaceT< M > & OpenMesh::Subdivider::Adaptive::CompositeT< M >::rule | ( | size_t | _idx | ) |

inline

Get rule (interface) by index.

Returns
  The wanted rule if the handle is valid. The return value is undefined if the handle is invalid!

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

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