45 #include <OpenMesh/Core/Mesh/PolyConnectivity.hh>
46 #include <OpenMesh/Core/Utils/PropertyManager.hh>
52 #include <type_traits>
58 namespace Predicates {
64 template <
typename PredicateT>
69 template <
typename PredicateT>
78 bool operator()(
const T& _t)
const {
return p_(_t); }
83 template <
typename PredicateT>
86 template <
typename PredicateT>
87 Predicate<PredicateT> make_predicate(PredicateT&& _p) {
return { _p }; }
89 template <
typename Predicate1T,
typename Predicate2T>
99 bool operator()(
const T& _t)
const {
return p1_( _t) || p2_( _t); }
105 template <
typename Predicate1T,
typename Predicate2T>
114 template <
typename T>
115 bool operator()(
const T& _t)
const {
return p1_( _t) && p2_( _t); }
122 template <
typename PredicateT>
130 template <
typename T>
131 bool operator()(
const T& _t)
const {
return !p1_( _t); }
136 template <
typename P1,
typename P2>
142 template <
typename P1,
typename P2>
143 Disjunction<const P1&, P2> operator||(PredicateBase<P1>& p1, PredicateBase<P2>&& p2)
145 return Disjunction<const P1&, P2>(
static_cast<const P1&
>(p1),
static_cast<P2&&
>(p2));
148 template <
typename P1,
typename P2>
149 Disjunction<P1, const P2&> operator||(PredicateBase<P1>&& p1, PredicateBase<P2>& p2)
151 return Disjunction<P1, const P2&>(
static_cast<P1&&
>(p1),
static_cast<const P2&
>(p2));
154 template <
typename P1,
typename P2>
155 Disjunction<P1, P2> operator||(PredicateBase<P1>&& p1, PredicateBase<P2>&& p2)
157 return Disjunction<P1, P2>(
static_cast<P1&&
>(p1),
static_cast<P2&&
>(p2));
160 template <
typename P1,
typename P2>
161 Conjunction<const P1&, const P2&> operator&&(PredicateBase<P1>& p1, PredicateBase<P2>& p2)
163 return Conjunction<const P1&, const P2&>(
static_cast<const P1&
>(p1),
static_cast<const P2&
>(p2));
166 template <
typename P1,
typename P2>
167 Conjunction<const P1&, P2> operator&&(PredicateBase<P1>& p1, PredicateBase<P2>&& p2)
169 return Conjunction<const P1&, P2>(
static_cast<const P1&
>(p1),
static_cast<P2&&
>(p2));
172 template <
typename P1,
typename P2>
173 Conjunction<P1, const P2&> operator&&(PredicateBase<P1>&& p1, PredicateBase<P2>& p2)
175 return Conjunction<P1, const P2&>(
static_cast<P1
>(p1),
static_cast<const P2&
>(p2));
178 template <
typename P1,
typename P2>
179 Conjunction<P1, P2> operator&&(PredicateBase<P1>&& p1, PredicateBase<P2>&& p2)
181 return Conjunction<P1, P2>(
static_cast<P1&&
>(p1),
static_cast<P2&&
>(p2));
184 template <
typename P>
185 Negation<const P&> operator!(PredicateBase<P>& p)
187 return Negation<const P&>(
static_cast<const P&
>(p));
190 template <
typename P>
191 Negation<P> operator!(PredicateBase<P>&& p)
193 return Negation<P>(
static_cast<P&&
>(p));
198 template <
typename HandleType>
204 template <
typename HandleType>
210 template <
typename HandleType>
216 template <
typename HandleType>
222 template <
typename HandleType>
228 template <
typename HandleType>
234 template <
typename HandleType>
240 template <
typename HandleType>
244 template <
int inner_reg,
int boundary_reg>
256 template <
typename T,
typename MF>
268 template <
typename O>
269 auto operator()(
const O& _o) -> decltype ((t_.*mf_)(_o))
271 return (t_.*mf_)(_o);
276 template <
typename T,
typename MF>
283 #define OM_MFW(member_function) OpenMesh::Predicates::make_member_function_wrapper(*this, &std::decay<decltype(*this)>::type::member_function)
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Base class for all smart handle types that contains status related methods.
Definition: SmartHandles.hh:81
bool selected() const
Returns true iff the handle is marked as selected.
Definition: SmartHandles.hh:293
bool feature() const
Returns true iff the handle is marked as feature.
Definition: SmartHandles.hh:285
bool locked() const
Returns true iff the handle is marked as locked.
Definition: SmartHandles.hh:317
bool deleted() const
Returns true iff the handle is marked as deleted.
Definition: SmartHandles.hh:333
bool tagged() const
Returns true iff the handle is marked as tagged.
Definition: SmartHandles.hh:301
bool tagged2() const
Returns true iff the handle is marked as tagged2.
Definition: SmartHandles.hh:309
bool hidden() const
Returns true iff the handle is marked as hidden.
Definition: SmartHandles.hh:325
Base class for all smart handle types that contains status related methods.
Definition: SmartHandles.hh:102
bool is_boundary() const
Returns true iff the handle is boundary.
Definition: SmartHandles.hh:341
Smart version of VertexHandle contains a pointer to the corresponding mesh and allows easier access t...
Definition: SmartHandles.hh:110
uint valence() const
Returns valence of the vertex.
Definition: SmartHandles.hh:364
Definition: Predicates.hh:66
Definition: Predicates.hh:71
Definition: Predicates.hh:91
Definition: Predicates.hh:107
Definition: Predicates.hh:124
Definition: Predicates.hh:197
Definition: Predicates.hh:203
Definition: Predicates.hh:209
Definition: Predicates.hh:215
Definition: Predicates.hh:221
Definition: Predicates.hh:227
Definition: Predicates.hh:233
Definition: Predicates.hh:239
Definition: Predicates.hh:246
Wrapper object to hold an object and a member function pointer, and provides operator() to call that ...
Definition: Predicates.hh:258