Updated the functions that cuts along crease edges to use the new faceedge selections

This commit is contained in:
Paolo Cignoni 2018-05-05 00:37:33 +02:00
parent 884faa97c1
commit 18e424b7c0
1 changed files with 5 additions and 5 deletions

View File

@ -35,8 +35,8 @@ namespace tri {
template<class MESH_TYPE> template<class MESH_TYPE>
void CreaseCut(MESH_TYPE &m, float angleRad) void CreaseCut(MESH_TYPE &m, float angleRad)
{ {
tri::UpdateFlags<MESH_TYPE>::FaceFauxSignedCrease(m, -angleRad, angleRad); tri::UpdateFlags<MESH_TYPE>::FaceEdgeSelSignedCrease(m, -angleRad, angleRad);
CutMeshAlongNonFauxEdges(m); CutMeshAlongSelectedFaceEdges(m);
} }
/** /**
@ -48,7 +48,7 @@ void CreaseCut(MESH_TYPE &m, float angleRad)
* *
*/ */
template<class MESH_TYPE> template<class MESH_TYPE>
void CutMeshAlongNonFauxEdges(MESH_TYPE &m) void CutMeshAlongSelectedFaceEdges(MESH_TYPE &m)
{ {
typedef typename MESH_TYPE::FaceIterator FaceIterator; typedef typename MESH_TYPE::FaceIterator FaceIterator;
typedef typename MESH_TYPE::FaceType FaceType; typedef typename MESH_TYPE::FaceType FaceType;
@ -86,7 +86,7 @@ void CutMeshAlongNonFauxEdges(MESH_TYPE &m)
{ {
do { do {
curPos.FlipF();curPos.FlipE(); curPos.FlipF();curPos.FlipE();
if(!curPos.IsFaux()) if(curPos.IsEdgeS())
break; break;
} while(curPos!=startPos); } while(curPos!=startPos);
startPos=curPos; startPos=curPos;
@ -100,7 +100,7 @@ void CutMeshAlongNonFauxEdges(MESH_TYPE &m)
size_t faceInd = Index(m,curPos.F()); size_t faceInd = Index(m,curPos.F());
indVec[faceInd*3+ curPos.VInd()] = curVertexCounter; indVec[faceInd*3+ curPos.VInd()] = curVertexCounter;
curPos.FlipE(); curPos.FlipE();
if(!curPos.IsFaux()) if(curPos.IsEdgeS())
{ //qDebug(" Crease FOUND"); { //qDebug(" Crease FOUND");
++locCreaseCounter; ++locCreaseCounter;
curVertexCounter=newVertexCounter; curVertexCounter=newVertexCounter;