[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30410] branches/soc-2010-rohith291991/ intern/comiso/intern/CMesh.cpp: changes to dijkstra from singularities.
Rohith B V
rohith291991 at gmail.com
Fri Jul 16 14:47:23 CEST 2010
Revision: 30410
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30410
Author: rohith291991
Date: 2010-07-16 14:47:23 +0200 (Fri, 16 Jul 2010)
Log Message:
-----------
changes to dijkstra from singularities.
Modified Paths:
--------------
branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp
Modified: branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp
===================================================================
--- branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp 2010-07-16 12:15:28 UTC (rev 30409)
+++ branches/soc-2010-rohith291991/intern/comiso/intern/CMesh.cpp 2010-07-16 12:47:23 UTC (rev 30410)
@@ -567,6 +567,12 @@
int numsing=0;
for(int i=0;i<mesh->numVerts;i++)
+ {
+ mesh->verts[i].pvert=-1;
+
+ }
+
+ for(int i=0;i<mesh->numVerts;i++)
if(mesh->verts[i].flag & CV_SINGULARITY)
{
mesh->verts[i].flag|= CV_MARKED;
@@ -622,9 +628,34 @@
newVerts.push_back(nIndex);
else
+ {
meet=nIndex;
+
+ //Mark all paths from singularities to cut graph
+ while (1)
+ {
+
+ if( meet ==-1 || mesh->verts[meet].flag & CV_SINGULARITY )
+ {
+ break;
+ }
+ for(int k=0;k<mesh->verts[meet].numNeighbors;k++)
+ {
+ int e=mesh->verts[meet].edges[k];
+ int n=mesh->verts[meet].neighbors[k];
+ if(mesh->verts[meet].pvert==n)
+ {
+ mesh->edges[e].flag &= !CE_SEAM;
+ meet=mesh->verts[meet].pvert;
+ break;
+ }
+ }
+ }
+ }
+
+
}
}
@@ -639,30 +670,7 @@
}
}
- //Mark all paths from singularities to cut graph
- terminate=1;
-
- while (terminate)
- {
-
- if( mesh->verts[meet].flag & CV_SINGULARITY )
- {
- break;
- }
- for(int k=0;k<mesh->verts[meet].numNeighbors;k++)
- {
- int e=mesh->verts[meet].edges[k];
- if(mesh->verts[meet].pvert==e)
- {
- mesh->edges[e].flag &= !CE_SEAM;
-
- meet=mesh->verts[meet].pvert;
- break;
- }
-
- }
- }
-
+
//Setup for next dijkstra
for (int i=0;i<totvert;i++)
{
More information about the Bf-blender-cvs
mailing list