added JumpingPos sample
This commit is contained in:
parent
647985b802
commit
6f7899846d
|
@ -22,7 +22,7 @@ void OneRingNeighborhood( MyFace * f)
|
||||||
{
|
{
|
||||||
MyVertex * v = f->V(0);
|
MyVertex * v = f->V(0);
|
||||||
MyFace* start = f;
|
MyFace* start = f;
|
||||||
vcg::face::Pos<MyFace> p(f,0,0);// constructor that takes face, edge and vertex
|
vcg::face::Pos<MyFace> p(f,0,v);// constructor that takes face, edge and vertex
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
p.FlipF();
|
p.FlipF();
|
||||||
|
@ -30,10 +30,24 @@ void OneRingNeighborhood( MyFace * f)
|
||||||
}while(p.f!=start);
|
}while(p.f!=start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <vcg/simplex/face/jumping_pos.h> // include the definition of jumping pos
|
||||||
|
|
||||||
|
void OneRingNeighborhoodJP( MyFace * f)
|
||||||
|
{
|
||||||
|
MyVertex * v = f->V(0);
|
||||||
|
MyFace* start = f;
|
||||||
|
vcg::face::JumpingPos<MyFace> p(f,0,v);// constructor that takes face, edge and vertex
|
||||||
|
do
|
||||||
|
{
|
||||||
|
p.NextFE();
|
||||||
|
}while(p.f!=start);
|
||||||
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
MyMesh m;
|
MyMesh m;
|
||||||
vcg::tri::Tetrahedron(m);
|
vcg::tri::Tetrahedron(m);
|
||||||
OneRingNeighborhood(&(*m.face.begin()));
|
OneRingNeighborhood(&(*m.face.begin()));
|
||||||
|
OneRingNeighborhoodJP(&(*m.face.begin()));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue