Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2007-11-23 02:34:02 +0300
committerMartin Poirier <theeth@yahoo.com>2007-11-23 02:34:02 +0300
commit92c70c5bbbc5f669aedd73f5dc0ea6260c24b91d (patch)
tree0f3f93ce03b0dfef82ca80f544266da4fd72d6aa /source/blender/src/reeb.c
parent1119ec94edcf7cca608ccd25e531af703e58669d (diff)
Code cleanup and recursive symmetry detection.
Diffstat (limited to 'source/blender/src/reeb.c')
-rw-r--r--source/blender/src/reeb.c80
1 files changed, 3 insertions, 77 deletions
diff --git a/source/blender/src/reeb.c b/source/blender/src/reeb.c
index f661e849f83..c35f3ad766b 100644
--- a/source/blender/src/reeb.c
+++ b/source/blender/src/reeb.c
@@ -1404,7 +1404,10 @@ ReebGraph * generateReebGraph(EditMesh *em, int subdivisions)
int index;
int totvert;
int totfaces;
+
+#ifdef DEBUG_REEB
int countfaces = 0;
+#endif
rg = MEM_callocN(sizeof(ReebGraph), "reeb graph");
@@ -1900,80 +1903,3 @@ EmbedBucket * nextBucket(ReebArcIterator *iter)
return result;
}
-
-/****************************************** MAIN EDIT METHOD **************************************************/
-
-void generateSkeleton(void)
-{
- EditMesh *em = G.editMesh;
- ReebGraph *rg = NULL;
- int i;
-
- if (em == NULL)
- return;
-
- setcursor_space(SPACE_VIEW3D, CURSOR_WAIT);
-
- weightFromDistance(em);
- weightToHarmonic(em);
-
- renormalizeWeight(em, 1.0f);
-
-#ifdef DEBUG_REEB
- weightToVCol(em);
-#endif
-
- rg = generateReebGraph(em, G.scene->toolsettings->skgen_resolution);
-
- verifyBuckets(rg);
-
- /* Remove arcs without embedding */
- filterNullReebGraph(rg);
-
- verifyBuckets(rg);
-
- if (G.scene->toolsettings->skgen_options & SKGEN_FILTER_EXTERNAL)
- {
- filterExternalReebGraph(rg, G.scene->toolsettings->skgen_threshold_external * G.scene->toolsettings->skgen_resolution);
- }
-
- verifyBuckets(rg);
-
- if (G.scene->toolsettings->skgen_options & SKGEN_FILTER_INTERNAL)
- {
- filterInternalReebGraph(rg, G.scene->toolsettings->skgen_threshold_internal * G.scene->toolsettings->skgen_resolution);
- }
-
- verifyBuckets(rg);
-
- if (G.scene->toolsettings->skgen_options & SKGEN_REPOSITION)
- {
- repositionNodes(rg);
- }
-
- verifyBuckets(rg);
-
- /* Filtering might have created degree 2 nodes, so remove them */
- removeNormalNodes(rg);
-
- verifyBuckets(rg);
-
- for(i = 0; i < G.scene->toolsettings->skgen_postpro_passes; i++)
- {
- postprocessGraph(rg, G.scene->toolsettings->skgen_postpro);
- }
-
- buildAdjacencyList(rg);
-
- sortNodes(rg);
-
- sortArcs(rg);
-
-#ifdef DEBUG_REEB
- exportGraph(rg, -1);
-#endif
-
- generateSkeletonFromReebGraph(rg);
-
- freeGraph(rg);
-}