diff --git a/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp b/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp index d557ce8b..5a7dd8aa 100644 --- a/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp +++ b/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp @@ -22,7 +22,7 @@ void OneRingNeighborhood( MyFace * f) { MyVertex * v = f->V(0); MyFace* start = f; - vcg::face::Pos p(f,0,0);// constructor that takes face, edge and vertex + vcg::face::Pos p(f,0,v);// constructor that takes face, edge and vertex do { p.FlipF(); @@ -30,10 +30,24 @@ void OneRingNeighborhood( MyFace * f) }while(p.f!=start); } +#include // include the definition of jumping pos + +void OneRingNeighborhoodJP( MyFace * f) +{ + MyVertex * v = f->V(0); + MyFace* start = f; + vcg::face::JumpingPos p(f,0,v);// constructor that takes face, edge and vertex + do + { + p.NextFE(); + }while(p.f!=start); +} + int main() { MyMesh m; vcg::tri::Tetrahedron(m); OneRingNeighborhood(&(*m.face.begin())); + OneRingNeighborhoodJP(&(*m.face.begin())); return 0; } \ No newline at end of file