adapted some functions to polygonal meshes
This commit is contained in:
parent
49251952c1
commit
f2b92b6484
|
@ -520,8 +520,8 @@ public:
|
||||||
UpdateFlags<MeshType>::VertexClearV(m);
|
UpdateFlags<MeshType>::VertexClearV(m);
|
||||||
for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
||||||
{
|
{
|
||||||
for(int i=0;i<3;i++)
|
for (int i=0; i<fi->VN(); i++)
|
||||||
if((*fi).V(i)->IsS() && !(*fi).V(i)->IsV())
|
if ((*fi).V(i)->IsS() && !(*fi).V(i)->IsV())
|
||||||
{
|
{
|
||||||
(*fi).V(i)->SetV();
|
(*fi).V(i)->SetV();
|
||||||
face::Pos<FaceType> startPos(&*fi,i);
|
face::Pos<FaceType> startPos(&*fi,i);
|
||||||
|
@ -922,9 +922,10 @@ public:
|
||||||
FaceIterator fi;
|
FaceIterator fi;
|
||||||
for (fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
for (fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
||||||
{
|
{
|
||||||
TD[(*fi).V(0)]++;
|
for (int k=0; k<fi->VN(); k++)
|
||||||
TD[(*fi).V(1)]++;
|
{
|
||||||
TD[(*fi).V(2)]++;
|
TD[(*fi).V(k)]++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tri::UpdateFlags<MeshType>::VertexClearV(m);
|
tri::UpdateFlags<MeshType>::VertexClearV(m);
|
||||||
|
@ -932,8 +933,9 @@ public:
|
||||||
// mark out of the game the vertexes that are incident on non manifold edges.
|
// mark out of the game the vertexes that are incident on non manifold edges.
|
||||||
for (fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
for (fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
||||||
{
|
{
|
||||||
for(int i=0;i<3;++i)
|
for(int i=0; i<fi->VN(); ++i)
|
||||||
if (!IsManifold(*fi,i)) {
|
if (!IsManifold(*fi,i))
|
||||||
|
{
|
||||||
(*fi).V0(i)->SetV();
|
(*fi).V0(i)->SetV();
|
||||||
(*fi).V1(i)->SetV();
|
(*fi).V1(i)->SetV();
|
||||||
}
|
}
|
||||||
|
@ -942,7 +944,8 @@ public:
|
||||||
// from it and using FF is the same of the previously counted.
|
// from it and using FF is the same of the previously counted.
|
||||||
for (fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
for (fi = m.face.begin(); fi != m.face.end(); ++fi) if (!fi->IsD())
|
||||||
{
|
{
|
||||||
for(int i=0;i<3;i++) if(!(*fi).V(i)->IsV()){
|
for(int i=0; i<fi->VN(); i++) if (!(*fi).V(i)->IsV())
|
||||||
|
{
|
||||||
(*fi).V(i)->SetV();
|
(*fi).V(i)->SetV();
|
||||||
face::Pos<FaceType> pos(&(*fi),i);
|
face::Pos<FaceType> pos(&(*fi),i);
|
||||||
|
|
||||||
|
@ -950,7 +953,8 @@ public:
|
||||||
|
|
||||||
if (starSizeFF != TD[(*fi).V(i)])
|
if (starSizeFF != TD[(*fi).V(i)])
|
||||||
{
|
{
|
||||||
if(selectVert) (*fi).V(i)->SetS();
|
if (selectVert)
|
||||||
|
(*fi).V(i)->SetS();
|
||||||
nonManifoldCnt++;
|
nonManifoldCnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue