Cleanup: spelling (neighbor)
authorCampbell Barton <ideasman42@gmail.com>
Tue, 6 Aug 2019 07:09:07 +0000 (17:09 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 6 Aug 2019 11:59:13 +0000 (21:59 +1000)
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/CCGSubSurf_intern.h
source/blender/blenkernel/intern/CCGSubSurf_legacy.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/particle_system.c

index 49855de05914586fea618e65bdde62df0d1eadb0..d91296e0c011af4aab033c67db0ff12dc3259727 100644 (file)
@@ -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 */
index 41a34b65381c076b93c5c387fba7ab74ced3d321..51486db1bdc30068744f950d81e0777d6e42143a 100644 (file)
@@ -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 * */
 
index d8b30c9d4ef89b1913e087a662abb8feb233d41d..01735b34e5eff3c1c5f260d8915a7d54c56d8f4e 100644 (file)
@@ -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++) {
index 03530fc76b657091ca8350bcb9b1497a894d5025..1fb253751592317d5d0a9c3f5f3ace8d3537b783 100644 (file)
@@ -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 */
index 5685e5cd05e48b6208921d5914460062e8534bd8..615870d099f9cb7e9e987c8cb163ac24df1691e4 100644 (file)
@@ -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 */