diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-04-04 06:55:56 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-04-04 06:55:56 +0400 |
commit | 5c85bb9cd21975f01f1447070bea7138ced4d7dc (patch) | |
tree | 9e9cb7e16b7654536663baa2045b7a3172b6e583 /source/blender/blenkernel/intern/CCGSubSurf.c | |
parent | fad97122aa908b7e95f35b829a61438efce18c91 (diff) |
- kinda crazy, but replaced old ME_SIMPLE_SUBDIV method with just
using regular ccgsubsurf but with crease set to full.
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf.c')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index 0d0283b8cb6..2f6c95414e2 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -277,6 +277,7 @@ struct _CCGSubSurf { int subdivLevels; int numGrids; int allowEdgeCreation; + float defaultCreaseValue; void *q, *r; @@ -589,6 +590,7 @@ CCGSubSurf *ccgSubSurf_new(CCGMeshIFC *ifc, CCGMeshHDL meshData, int subdivLevel ss->subdivLevels = subdivLevels; ss->numGrids = 0; ss->allowEdgeCreation = 0; + ss->defaultCreaseValue = 0; ss->useAgeCounts = 0; ss->vertUserAgeOffset = ss->edgeUserAgeOffset = ss->faceUserAgeOffset = 0; @@ -639,8 +641,9 @@ void ccgSubSurf_free(CCGSubSurf *ss) { } } -CCGError ccgSubSurf_setAllowEdgeCreation(CCGSubSurf *ss, int allowEdgeCreation) { +CCGError ccgSubSurf_setAllowEdgeCreation(CCGSubSurf *ss, int allowEdgeCreation, float defaultCreaseValue) { ss->allowEdgeCreation = !!allowEdgeCreation; + ss->defaultCreaseValue = defaultCreaseValue; return eCCGError_None; } @@ -963,7 +966,7 @@ CCGError ccgSubSurf_syncFace(CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGV ss->tempEdges[k] = _vert_findEdgeTo(ss->tempVerts[k], ss->tempVerts[(k+1)%numVerts]); if (ss->allowEdgeCreation && !ss->tempEdges[k]) { - CCGEdge *e = ss->tempEdges[k] = _edge_new((CCGEdgeHDL) -1, ss->tempVerts[k], ss->tempVerts[(k+1)%numVerts], 0.0, ss->subdivLevels, ss->meshIFC.vertDataSize, ss); + CCGEdge *e = ss->tempEdges[k] = _edge_new((CCGEdgeHDL) -1, ss->tempVerts[k], ss->tempVerts[(k+1)%numVerts], ss->defaultCreaseValue, ss->subdivLevels, ss->meshIFC.vertDataSize, ss); _ehash_insert(ss->eMap, (EHEntry*) e); e->v0->flags |= Vert_eEffected; e->v1->flags |= Vert_eEffected; |