54#ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITET_HH
55#define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITET_HH
60#include <OpenMesh/Core/System/config.hh>
78template <
typename R>
struct RuleHandleT;
79template <
typename M>
class RuleInterfaceT;
139 typedef std::vector<Rule*> RuleSequence;
141 typedef typename M::VertexHandle VH;
142 typedef typename M::FaceHandle FH;
143 typedef typename M::EdgeHandle EH;
144 typedef typename M::HalfedgeHandle HH;
173 bool initialize(
void);
177 void refine(
typename M::FaceHandle& _fh);
181 void refine(
typename M::VertexHandle& _vh);
189 const Rule& subdiv_rule()
const {
return *subdiv_rule_; }
200 template <
typename R >
212 template <
typename R >
215 return _rh = add< R >();
223 template <
typename R >
226 typedef typename RuleHandleT<R>::Rule rule_t;
247 std::string rules_as_string(
const std::string& _sep=
" * ")
const;
288#ifndef DOXY_IGNORE_THIS
289 struct DeleteRule {
void operator()(
Rule* _r ) {
delete _r; } };
305#if defined(OM_INCLUDE_TEMPLATES) && !defined(OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITET_CC)
306# define OPENMESH_SUBDIVIDER_TEMPLATES
307# include "CompositeT_impl.hh"
bool is_valid() const
The handle is valid iff the index is not negative.
int idx() const
Get the underlying index of this handle.
CompositeT(const CompositeT &)
CompositeT(Mesh &_mesh)
Constructor.
state_t generation(VH _vh) const
RuleInterfaceT< M > & rule(size_t _idx)
size_t n_rules() const
Number of rules in the rule sequence.
RuleHandleT< R > & add(RuleHandleT< R > &_rh)
RuleSequence rule_sequence_
state_t generation(FH _fh) const
state_t generation(state_t _s) const
const RuleSequence & rules() const
The rule sequence.
state_t generation(EH _eh) const
RuleHandleT< R >::Rule & rule(const RuleHandleT< R > &_rh)
int subdiv_type()
Return subdivision split type (3 for 1-to-3 split, 4 for 1-to-4 split).
CompositeTraits::state_t state_t