Corrected missing return value in SplitSelectedVertexOnEdgeMesh (thanks to David Cattermole)

This commit is contained in:
Paolo Cignoni 2016-03-08 18:49:49 +00:00
parent 662d0ce811
commit 247177a584
1 changed files with 10 additions and 1 deletions

View File

@ -457,6 +457,7 @@ public:
{
tri::RequireCompactness(m);
tri::UpdateFlags<MeshType>::VertexClearV(m);
int count_split = 0;
for(size_t i=0;i<m.edge.size();++i)
{
for(int j=0;j<2;++j)
@ -465,11 +466,19 @@ public:
if(vp->IsS())
{
if(!vp->IsV())
{
m.edge[i].V(j) = &*(tri::Allocator<MeshType>::AddVertex(m,vp->P()));
else vp->SetV();
++count_split;
}
else
{
vp->SetV();
}
}
}
}
return count_split;
}