24 #ifndef VCG__FOREACH_H
25 #define VCG__FOREACH_H
27 #include <vcg/simplex/face/pos.h>
35 template <
class MeshType,
typename Callable>
36 inline void ForEachFacePos(
const MeshType &m, Callable action)
38 typedef typename face::Pos<typename MeshType::FaceType> PosType;
40 for(
auto fi=m.face.begin();fi!=m.face.end();++fi)
51 template <
class MeshType,
typename Callable>
52 inline void ForEachFacePos(MeshType &m, Callable action)
54 typedef typename face::Pos<typename MeshType::FaceType> PosType;
56 for(
auto fi=m.face.begin();fi!=m.face.end();++fi)
77 template <
class MeshType,
typename Callable>
80 if(m.fn == (
int) m.face.size())
82 for(
auto fi=m.face.begin();fi!=m.face.end();++fi) {
88 for(
auto fi=m.face.begin();fi!=m.face.end();++fi)
96 template <
class MeshType,
typename Callable>
97 inline void ForEachFace(MeshType &m, Callable action)
99 if(m.fn == (
int) m.face.size())
101 for(
auto fi=m.face.begin();fi!=m.face.end();++fi) {
107 for(
auto fi=m.face.begin();fi!=m.face.end();++fi)
125 template <
class MeshType,
typename Callable>
128 if(m.vn == (
int) m.vert.size())
130 for(
auto vi=m.vert.begin();vi!=m.vert.end();++vi) {
136 for(
auto vi=m.vert.begin();vi!=m.vert.end();++vi)
144 template <
class MeshType,
typename Callable>
147 if(m.vn == (
int) m.vert.size())
149 for(
auto vi=m.vert.begin();vi!=m.vert.end();++vi) {
155 for(
auto vi=m.vert.begin();vi!=m.vert.end();++vi)
173 template <
class MeshType,
typename Callable>
176 if(m.hn == (
int) m.hedge.size())
178 for(
auto hei=m.hedge.begin();hei!=m.hedge.end();++hei) {
184 for(
auto hei=m.hedge.begin();hei!=m.hedge.end();++hei)
192 template <
class MeshType,
typename Callable>
195 if(m.hn == (
int) m.hedge.size())
197 for(
auto hei=m.hedge.begin();hei!=m.hedge.end();++hei) {
203 for(
auto hei=m.hedge.begin();hei!=m.hedge.end();++hei)
221 template <
class MeshType,
typename Callable>
224 if(m.en == (
int) m.edge.size())
226 for(
auto ei=m.edge.begin();ei!=m.edge.end();++ei) {
232 for(
auto ei=m.edge.begin();ei!=m.edge.end();++ei)
240 template <
class MeshType,
typename Callable>
241 inline void ForEachEdge(MeshType &m, Callable action)
243 if(m.en == (
int) m.edge.size())
245 for(
auto ei=m.edge.begin();ei!=m.edge.end();++ei) {
251 for(
auto ei=m.edge.begin();ei!=m.edge.end();++ei)
269 template <
class MeshType,
typename Callable>
272 if(m.tn == (
int) m.tetra.size())
274 for(
auto ti = m.tetra.begin(); ti != m.tetra.end(); ++ti) {
280 for(
auto ti = m.tetra.begin(); ti != m.tetra.end(); ++ti)
288 template <
class MeshType,
typename Callable>
291 if(m.tn == (
int) m.tetra.size())
293 for(
auto ti = m.tetra.begin(); ti != m.tetra.end(); ++ti) {
299 for(
auto ti = m.tetra.begin(); ti != m.tetra.end(); ++ti)
void ForEachTetra(const MeshType &m, Callable action)
Definition: foreach.h:270
void ForEachEdge(const MeshType &m, Callable action)
Definition: foreach.h:222
void ForEachFace(const MeshType &m, Callable action)
Definition: foreach.h:78
void ForEachVertex(const MeshType &m, Callable action)
Definition: foreach.h:126
void ForEachHEdge(const MeshType &m, Callable action)
Definition: foreach.h:174
Definition: namespaces.dox:6