Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_laplaciansmooth.c
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | struct BLaplacianSystem { | ||||
| float (*fweights)[3]; /* Cotangent weights per face */ | float (*fweights)[3]; /* Cotangent weights per face */ | ||||
| float *ring_areas; /* Total area per ring*/ | float *ring_areas; /* Total area per ring*/ | ||||
| float *vlengths; /* Total sum of lengths(edges) per vertice*/ | float *vlengths; /* Total sum of lengths(edges) per vertice*/ | ||||
| float *vweights; /* Total sum of weights per vertice*/ | float *vweights; /* Total sum of weights per vertice*/ | ||||
| int numEdges; /* Number of edges*/ | int numEdges; /* Number of edges*/ | ||||
| int numLoops; /* Number of edges*/ | int numLoops; /* Number of edges*/ | ||||
| int numPolys; /* Number of faces*/ | int numPolys; /* Number of faces*/ | ||||
| int numVerts; /* Number of verts*/ | int numVerts; /* Number of verts*/ | ||||
| short *numNeFa; /* Number of neighboors faces around vertice*/ | short *numNeFa; /* Number of neighbors faces around vertice*/ | ||||
| short *numNeEd; /* Number of neighboors Edges around vertice*/ | short *numNeEd; /* Number of neighbors Edges around vertice*/ | ||||
| short *zerola; /* Is zero area or length*/ | short *zerola; /* Is zero area or length*/ | ||||
| /* Pointers to data*/ | /* Pointers to data*/ | ||||
| float (*vertexCos)[3]; | float (*vertexCos)[3]; | ||||
| const MPoly *mpoly; | const MPoly *mpoly; | ||||
| const MLoop *mloop; | const MLoop *mloop; | ||||
| const MEdge *medges; | const MEdge *medges; | ||||
| LinearSolver *context; | LinearSolver *context; | ||||
| ▲ Show 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | for (; | ||||
| sys->vweights[l_curr->v] += w2 + w3; | sys->vweights[l_curr->v] += w2 + w3; | ||||
| sys->vweights[l_next->v] += w1 + w3; | sys->vweights[l_next->v] += w1 + w3; | ||||
| sys->vweights[l_prev->v] += w1 + w2; | sys->vweights[l_prev->v] += w1 + w2; | ||||
| } | } | ||||
| } | } | ||||
| for (i = 0; i < sys->numEdges; i++) { | for (i = 0; i < sys->numEdges; i++) { | ||||
| idv1 = sys->medges[i].v1; | idv1 = sys->medges[i].v1; | ||||
| idv2 = sys->medges[i].v2; | idv2 = sys->medges[i].v2; | ||||
| /* if is boundary, apply scale-dependent umbrella operator only with neighboors in boundary */ | /* if is boundary, apply scale-dependent umbrella operator only with neighbors in boundary */ | ||||
| if (sys->numNeEd[idv1] != sys->numNeFa[idv1] && sys->numNeEd[idv2] != sys->numNeFa[idv2]) { | if (sys->numNeEd[idv1] != sys->numNeFa[idv1] && sys->numNeEd[idv2] != sys->numNeFa[idv2]) { | ||||
| sys->vlengths[idv1] += sys->eweights[i]; | sys->vlengths[idv1] += sys->eweights[i]; | ||||
| sys->vlengths[idv2] += sys->eweights[i]; | sys->vlengths[idv2] += sys->eweights[i]; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines | |||||