diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-06 10:09:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-06 14:59:13 +0300 |
commit | 8b2810a32f094f4d95663d630700c6f147703ad6 (patch) | |
tree | 3cbb7d96817ad6ec1702aab95c7d6a74e6510fdb | |
parent | 199c37d7e44776f382920632b334e9d21b06f6aa (diff) |
Cleanup: spelling (neighbor)
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_intern.h | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_legacy.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 48 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 10 |
5 files changed, 46 insertions, 46 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index 49855de0591..d91296e0c01 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -960,13 +960,13 @@ void ccgSubSurf__allFaces(CCGSubSurf *ss, CCGFace ***faces, int *numFaces, int * } } -void ccgSubSurf__effectedFaceNeighbours(CCGSubSurf *ss, - CCGFace **faces, - int numFaces, - CCGVert ***verts, - int *numVerts, - CCGEdge ***edges, - int *numEdges) +void ccgSubSurf__effectedFaceNeighbors(CCGSubSurf *ss, + CCGFace **faces, + int numFaces, + CCGVert ***verts, + int *numVerts, + CCGEdge ***edges, + int *numEdges) { CCGVert **arrayV; CCGEdge **arrayE; @@ -1134,7 +1134,7 @@ CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, in cornerIdx = gridSize - 1; ccgSubSurf__allFaces(ss, &effectedF, &numEffectedF, &freeF); - ccgSubSurf__effectedFaceNeighbours( + ccgSubSurf__effectedFaceNeighbors( ss, effectedF, numEffectedF, &effectedV, &numEffectedV, &effectedE, &numEffectedE); /* zero */ diff --git a/source/blender/blenkernel/intern/CCGSubSurf_intern.h b/source/blender/blenkernel/intern/CCGSubSurf_intern.h index 41a34b65381..51486db1bdc 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_intern.h +++ b/source/blender/blenkernel/intern/CCGSubSurf_intern.h @@ -306,13 +306,13 @@ struct CCGSubSurf { /* * CCGSubSurf.c * */ void ccgSubSurf__allFaces(CCGSubSurf *ss, CCGFace ***faces, int *numFaces, int *freeFaces); -void ccgSubSurf__effectedFaceNeighbours(CCGSubSurf *ss, - CCGFace **faces, - int numFaces, - CCGVert ***verts, - int *numVerts, - CCGEdge ***edges, - int *numEdges); +void ccgSubSurf__effectedFaceNeighbors(CCGSubSurf *ss, + CCGFace **faces, + int numFaces, + CCGVert ***verts, + int *numVerts, + CCGEdge ***edges, + int *numEdges); /* * CCGSubSurf_legacy.c * */ diff --git a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c index d8b30c9d4ef..01735b34e5e 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_legacy.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_legacy.c @@ -1323,7 +1323,7 @@ CCGError ccgSubSurf_updateNormals(CCGSubSurf *ss, CCGFace **effectedF, int numEf int i, numEffectedV, numEffectedE, freeF; ccgSubSurf__allFaces(ss, &effectedF, &numEffectedF, &freeF); - ccgSubSurf__effectedFaceNeighbours( + ccgSubSurf__effectedFaceNeighbors( ss, effectedF, numEffectedF, &effectedV, &numEffectedV, &effectedE, &numEffectedE); if (ss->calcVertNormals) { @@ -1361,7 +1361,7 @@ CCGError ccgSubSurf_updateLevels(CCGSubSurf *ss, int lvl, CCGFace **effectedF, i int curLvl, subdivLevels = ss->subdivLevels; ccgSubSurf__allFaces(ss, &effectedF, &numEffectedF, &freeF); - ccgSubSurf__effectedFaceNeighbours( + ccgSubSurf__effectedFaceNeighbors( ss, effectedF, numEffectedF, &effectedV, &numEffectedV, &effectedE, &numEffectedE); for (curLvl = lvl; curLvl < subdivLevels; curLvl++) { diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 03530fc76b6..1fb25375159 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -117,7 +117,7 @@ static int neighStraightY[8] = {0, 1, 0, -1, 1, 1, -1, -1}; /* brush mesh raycast status */ #define HIT_VOLUME 1 #define HIT_PROXIMITY 2 -/* dynamicPaint_findNeighbourPixel() return codes */ +/* dynamicPaint_findNeighborPixel() return codes */ #define NOT_FOUND -1 #define ON_MESH_EDGE -2 #define OUT_OF_TEXTURE -3 @@ -233,7 +233,7 @@ typedef struct PaintUVPoint { unsigned int v1, v2, v3; /** If this pixel isn't uv mapped to any face, but it's neighboring pixel is. */ - unsigned int neighbour_pixel; + unsigned int neighbor_pixel; } PaintUVPoint; typedef struct ImgSeqFormatData { @@ -2263,7 +2263,7 @@ static void dynamic_paint_create_uv_surface_direct_cb( /* Init per pixel settings */ tPoint->tri_index = -1; - tPoint->neighbour_pixel = -1; + tPoint->neighbor_pixel = -1; tPoint->pixel_index = index; /* Actual pixel center, used when collision is found */ @@ -2377,7 +2377,7 @@ static void dynamic_paint_create_uv_surface_neighbor_cb( const int ind = (tx + u) + w * (ty + v); /* if neighbor has index */ - if (tempPoints[ind].neighbour_pixel == -1 && tempPoints[ind].tri_index != -1) { + if (tempPoints[ind].neighbor_pixel == -1 && tempPoints[ind].tri_index != -1) { float uv[2]; const int i = tempPoints[ind].tri_index; const float *uv1 = mloopuv[mlooptri[i].tri[0]].uv; @@ -2387,13 +2387,13 @@ static void dynamic_paint_create_uv_surface_neighbor_cb( /* tri index */ /* There is a low possibility of actually having a neighbor point which tri is * already set from another neighbor in a separate thread here. - * Checking for both tri_index and neighbour_pixel above reduces that probability + * Checking for both tri_index and neighbor_pixel above reduces that probability * but it remains possible. - * That atomic op (and its memory fence) ensures tPoint->neighbour_pixel is set - * to non--1 *before* its tri_index is set (i.e. that it cannot be used a neighbour). + * That atomic op (and its memory fence) ensures tPoint->neighbor_pixel is set + * to non--1 *before* its tri_index is set (i.e. that it cannot be used a neighbor). */ - tPoint->neighbour_pixel = ind - 1; - atomic_add_and_fetch_uint32(&tPoint->neighbour_pixel, 1); + tPoint->neighbor_pixel = ind - 1; + atomic_add_and_fetch_uint32(&tPoint->neighbor_pixel, 1); tPoint->tri_index = i; /* Now calculate pixel data for this pixel as it was on polygon surface */ @@ -2467,13 +2467,13 @@ static void dynamic_paint_find_island_border(const DynamicPaintCreateUVSurfaceDa * px, py : origin pixel x and y * n_index : lookup direction index (use neighX, neighY to get final index) */ -static int dynamic_paint_find_neighbour_pixel(const DynamicPaintCreateUVSurfaceData *data, - const MeshElemMap *vert_to_looptri_map, - const int w, - const int h, - const int px, - const int py, - const int n_index) +static int dynamic_paint_find_neighbor_pixel(const DynamicPaintCreateUVSurfaceData *data, + const MeshElemMap *vert_to_looptri_map, + const int w, + const int h, + const int px, + const int py, + const int n_index) { /* Note: Current method only uses polygon edges to detect neighboring pixels. * -> It doesn't always lead to the optimum pixel but is accurate enough @@ -2494,7 +2494,7 @@ static int dynamic_paint_find_neighbour_pixel(const DynamicPaintCreateUVSurfaceD /* Check if shifted point is on same face -> it's a correct neighbor * (and if it isn't marked as an "edge pixel") */ - if ((tPoint->tri_index == cPoint->tri_index) && (tPoint->neighbour_pixel == -1)) { + if ((tPoint->tri_index == cPoint->tri_index) && (tPoint->neighbor_pixel == -1)) { return (x + w * y); } @@ -2504,7 +2504,7 @@ static int dynamic_paint_find_neighbour_pixel(const DynamicPaintCreateUVSurfaceD * !! Replace with "is uv faces linked" check !! * This should work fine as long as uv island margin is > 1 pixel. */ - if ((tPoint->tri_index != -1) && (tPoint->neighbour_pixel == -1)) { + if ((tPoint->tri_index != -1) && (tPoint->neighbor_pixel == -1)) { return (x + w * y); } @@ -2691,8 +2691,8 @@ static void dynamic_paint_find_island_border(const DynamicPaintCreateUVSurfaceDa } /* If final point is an "edge pixel", use it's "real" neighbor instead */ - if (tempPoints[final_index].neighbour_pixel != -1) { - final_index = tempPoints[final_index].neighbour_pixel; + if (tempPoints[final_index].neighbor_pixel != -1) { + final_index = tempPoints[final_index].neighbor_pixel; /* If we ended up to our origin point */ if (final_index == (px + w * py)) { @@ -3016,7 +3016,7 @@ int dynamicPaint_createUVSurface(Scene *scene, ed->n_index[final_index[index]] = n_pos; ed->n_num[final_index[index]] = 0; - if (tempPoints[index].neighbour_pixel != -1) { + if (tempPoints[index].neighbor_pixel != -1) { ed->flags[final_index[index]] |= ADJ_BORDER_PIXEL; total_border++; } @@ -3024,7 +3024,7 @@ int dynamicPaint_createUVSurface(Scene *scene, for (int i = 0; i < 8; i++) { /* Try to find a neighboring pixel in defined direction. * If not found, -1 is returned */ - const int n_target = dynamic_paint_find_neighbour_pixel( + const int n_target = dynamic_paint_find_neighbor_pixel( &data, vert_to_looptri_map, w, h, tx, ty, i); if (n_target >= 0 && n_target != index) { @@ -3084,7 +3084,7 @@ int dynamicPaint_createUVSurface(Scene *scene, const int fidx = final_index[index]; if (tempPoints[index].tri_index != -1) { - int nidx = tempPoints[index].neighbour_pixel; + int nidx = tempPoints[index].neighbor_pixel; fprintf(dump_file, "%d\t%d,%d\t%u\t%d,%d\t%d\t", fidx, @@ -3186,7 +3186,7 @@ int dynamicPaint_createUVSurface(Scene *scene, pPoint->alpha = 1.0f; /* Every pixel that is assigned as "edge pixel" gets blue color */ - if (uvPoint->neighbour_pixel != -1) { + if (uvPoint->neighbor_pixel != -1) { pPoint->color[2] = 1.0f; } /* and every pixel that finally got an polygon gets red color */ diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5685e5cd05e..615870d099f 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1958,10 +1958,10 @@ static void sphclassical_density_accum_cb(void *userdata, pfr->data[1] += q / npa->sphdensity; } -static void sphclassical_neighbour_accum_cb(void *userdata, - int index, - const float co[3], - float UNUSED(squared_dist)) +static void sphclassical_neighbor_accum_cb(void *userdata, + int index, + const float co[3], + float UNUSED(squared_dist)) { SPHRangeData *pfr = (SPHRangeData *)userdata; ParticleData *npa = pfr->npsys->particles + index; @@ -2031,7 +2031,7 @@ static void sphclassical_force_cb(void *sphdata_v, pfr.pa = pa; sph_evaluate_func( - NULL, psys, state->co, &pfr, interaction_radius, sphclassical_neighbour_accum_cb); + NULL, psys, state->co, &pfr, interaction_radius, sphclassical_neighbor_accum_cb); pressure = stiffness * (pow7f(pa->sphdensity / rest_density) - 1.0f); /* multiply by mass so that we return a force, not accel */ |