[Bf-blender-cvs] [ea2c41c7306] master: Cleanup: spelling in comments
Campbell Barton
noreply at git.blender.org
Mon Oct 3 02:20:32 CEST 2022
Commit: ea2c41c7306fa9d1af0d8aa3d675b45d38a2e806
Author: Campbell Barton
Date: Mon Oct 3 10:24:08 2022 +1100
Branches: master
https://developer.blender.org/rBea2c41c7306fa9d1af0d8aa3d675b45d38a2e806
Cleanup: spelling in comments
Also replace "dm" for evaluated mesh in some comments.
===================================================================
M intern/cycles/util/math_fast.h
M intern/ghost/intern/GHOST_SystemX11.h
M intern/ghost/intern/GHOST_WindowX11.cpp
M intern/ghost/intern/GHOST_WindowX11.h
M intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
M source/blender/blenkernel/intern/editmesh.cc
M source/blender/blenkernel/intern/mball_tessellate.cc
M source/blender/blenkernel/intern/mesh_iterators.cc
M source/blender/blenkernel/intern/modifier.cc
M source/blender/blenlib/intern/noise.c
M source/blender/bmesh/operators/bmo_removedoubles.c
M source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c
M source/blender/draw/engines/eevee/eevee_private.h
M source/blender/draw/engines/overlay/overlay_grid.cc
M source/blender/draw/intern/draw_manager_data.cc
M source/blender/editors/mesh/editmesh_loopcut.c
M source/blender/editors/mesh/editmesh_polybuild.c
M source/blender/editors/mesh/editmesh_select.cc
M source/blender/editors/space_view3d/view3d_gizmo_preselect_type.cc
M source/blender/makesdna/DNA_particle_types.h
M source/blender/makesrna/intern/rna_define.c
M source/blender/makesrna/intern/rna_particle.c
M source/blender/modifiers/intern/MOD_particlesystem.cc
===================================================================
diff --git a/intern/cycles/util/math_fast.h b/intern/cycles/util/math_fast.h
index 142a664a1d2..fc7eadb112b 100644
--- a/intern/cycles/util/math_fast.h
+++ b/intern/cycles/util/math_fast.h
@@ -589,7 +589,7 @@ ccl_device_inline float fast_erfcf(float x)
ccl_device_inline float fast_ierff(float x)
{
/* From: Approximating the `erfinv` function by Mike Giles. */
- /* To avoid trouble at the limit, clamp input to 1-eps. */
+ /* To avoid trouble at the limit, clamp input to 1-epsilon. */
float a = fabsf(x);
if (a > 0.99999994f) {
a = 0.99999994f;
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 33376d36a92..572be30174d 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -14,7 +14,7 @@
#include "../GHOST_Types.h"
#include "GHOST_System.h"
-// For tablets
+/* For tablets. */
#ifdef WITH_X11_XINPUT
# include <X11/extensions/XInput.h>
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 200d47e9c61..8d8ce3643f4 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -25,18 +25,18 @@
#include "GHOST_ContextEGL.h"
#include "GHOST_ContextGLX.h"
-/* for XIWarpPointer */
+/* For #XIWarpPointer. */
#ifdef WITH_X11_XINPUT
# include <X11/extensions/XInput2.h>
#endif
-// For DPI value
+/* For DPI value. */
#include <X11/Xresource.h>
#include <cstdio>
#include <cstring>
-/* gethostname */
+/* For `gethostname`. */
#include <unistd.h>
#include <algorithm>
diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h
index 01af0b5ac86..e9bee43c035 100644
--- a/intern/ghost/intern/GHOST_WindowX11.h
+++ b/intern/ghost/intern/GHOST_WindowX11.h
@@ -11,7 +11,7 @@
#include "GHOST_Window.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-// For tablets
+/* For tablets. */
#ifdef WITH_X11_XINPUT
# include <X11/extensions/XInput.h>
#endif
diff --git a/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp b/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
index 6a7eb25925a..d387b222538 100644
--- a/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
+++ b/intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
@@ -85,7 +85,7 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding {
XrGraphicsRequirementsOpenGLKHR gpu_requirements = {XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR};
const XrVersion gl_version = XR_MAKE_VERSION(gl_major_version, gl_minor_version, 0);
- /* Although it would seem reasonable that the proc address would not change if the instance was
+ /* Although it would seem reasonable that the PROC address would not change if the instance was
* the same, in testing, repeated calls to #xrGetInstanceProcAddress() with the same instance
* can still result in changes so the workaround is to simply set the function pointer every
* time (trivializing its 'static' designation). */
@@ -343,7 +343,7 @@ class GHOST_XrGraphicsBindingD3D : public GHOST_IXrGraphicsBinding {
// static XrInstance s_instance = XR_NULL_HANDLE;
XrGraphicsRequirementsD3D11KHR gpu_requirements = {XR_TYPE_GRAPHICS_REQUIREMENTS_D3D11_KHR};
- /* Although it would seem reasonable that the proc address would not change if the instance was
+ /* Although it would seem reasonable that the PROC address would not change if the instance was
* the same, in testing, repeated calls to #xrGetInstanceProcAddress() with the same instance
* can still result in changes so the workaround is to simply set the function pointer every
* time (trivializing its 'static' designation). */
diff --git a/source/blender/blenkernel/intern/editmesh.cc b/source/blender/blenkernel/intern/editmesh.cc
index deca24afc0f..34218abf200 100644
--- a/source/blender/blenkernel/intern/editmesh.cc
+++ b/source/blender/blenkernel/intern/editmesh.cc
@@ -59,7 +59,7 @@ BMEditMesh *BKE_editmesh_from_object(Object *ob)
{
BLI_assert(ob->type == OB_MESH);
/* sanity check */
-#if 0 /* disable in mutlti-object edit. */
+#if 0 /* disable in multi-object edit. */
# ifndef NDEBUG
if (((Mesh *)ob->data)->edit_mesh) {
BLI_assert(((Mesh *)ob->data)->edit_mesh->ob == ob);
@@ -85,9 +85,9 @@ static void editmesh_tessface_calc_intern(BMEditMesh *em,
BMLoop *(*looptris)[3];
- /* this means no reallocs for quad dominant models, for */
+ /* This means no reallocations for quad dominant models. */
if ((em->looptris != nullptr) &&
- /* (*em->tottri >= looptris_tot)) */
+ // (*em->tottri >= looptris_tot))
/* Check against allocated size in case we over allocated a little. */
((looptris_tot_prev_alloc >= looptris_tot) &&
(looptris_tot_prev_alloc <= looptris_tot * 2))) {
diff --git a/source/blender/blenkernel/intern/mball_tessellate.cc b/source/blender/blenkernel/intern/mball_tessellate.cc
index 8b602519374..9b32456c6c1 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.cc
+++ b/source/blender/blenkernel/intern/mball_tessellate.cc
@@ -46,44 +46,52 @@
/* Data types */
-typedef struct corner { /* corner of a cube */
- int i, j, k; /* (i, j, k) is index within lattice */
- float co[3], value; /* location and function value */
+/** Corner of a cube. */
+typedef struct corner {
+ int i, j, k; /* (i, j, k) is index within lattice */
+ float co[3], value; /* location and function value */
struct corner *next;
} CORNER;
-typedef struct cube { /* partitioning cell (cube) */
+/** Partitioning cell (cube). */
+typedef struct cube {
int i, j, k; /* lattice location of cube */
CORNER *corners[8]; /* eight corners */
} CUBE;
-typedef struct cubes { /* linked list of cubes acting as stack */
- CUBE cube; /* a single cube */
- struct cubes *next; /* remaining elements */
+/** Linked list of cubes acting as stack. */
+typedef struct cubes {
+ CUBE cube; /* a single cube */
+ struct cubes *next; /* remaining elements */
} CUBES;
-typedef struct centerlist { /* list of cube locations */
- int i, j, k; /* cube location */
- struct centerlist *next; /* remaining elements */
+/** List of cube locations. */
+typedef struct centerlist {
+ int i, j, k; /* cube location */
+ struct centerlist *next; /* remaining elements */
} CENTERLIST;
-typedef struct edgelist { /* list of edges */
+/** List of edges. */
+typedef struct edgelist {
int i1, j1, k1, i2, j2, k2; /* edge corner ids */
int vid; /* vertex id */
struct edgelist *next; /* remaining elements */
} EDGELIST;
-typedef struct intlist { /* list of integers */
- int i; /* an integer */
- struct intlist *next; /* remaining elements */
+/** List of integers. */
+typedef struct intlist {
+ int i; /* an integer */
+ struct intlist *next; /* remaining elements */
} INTLIST;
-typedef struct intlists { /* list of list of integers */
- INTLIST *list; /* a list of integers */
- struct intlists *next; /* remaining elements */
+/** List of list of integers. */
+typedef struct intlists {
+ INTLIST *list; /* a list of integers */
+ struct intlists *next; /* remaining elements */
} INTLISTS;
-typedef struct Box { /* an AABB with pointer to metalelem */
+/** An AABB with pointer to metal-elem. */
+typedef struct Box {
float min[3], max[3];
const MetaElem *ml;
} Box;
@@ -93,16 +101,17 @@ typedef struct MetaballBVHNode { /* BVH node */
struct MetaballBVHNode *child[2];
} MetaballBVHNode;
-typedef struct process { /* parameters, storage */
- float thresh, size; /* mball threshold, single cube size */
- float delta; /* small delta for calculating normals */
- uint converge_res; /* converge procedure resolution (more = slower) */
+/** Parameters, storage. */
+typedef struct process {
+ float thresh, size; /* mball threshold, single cube size */
+ float delta; /* small delta for calculating normals */
+ uint converge_res; /* converge procedure resolution (more = slower) */
- MetaElem **mainb; /* array of all metaelems */
- uint totelem, mem; /* number of metaelems */
+ MetaElem **mainb; /* array of all meta-elems. */
+ uint totelem, mem; /* number of meta-elems. */
MetaballBVHNode metaball_bvh; /* The simplest bvh */
- Box allbb; /* Bounding box of all metaelems */
+ Box allbb; /* Bounding box of all meta-elems */
MetaballBVHNode **bvh_queue; /* Queue used during bvh traversal */
uint bvh_queue_size;
@@ -1127,8 +1136,8 @@ static void find_first_points(PROCESS *process, const uint em)
}
/**
- * The main polygonization proc.
- * Allocates memory, makes cubetable,
+ * The main polygonization processing function.
+ * Allocates memory, makes cube-table,
* finds starting surface points
* and processes cubes on the stack until none left.
*/
@@ -1341,18 +1350,18 @@ static void init_meta(Depsgraph *depsgraph, PROCESS *process, Scene *scene, Obje
copy_v3_fl3(new_ml->bb->vec[6], +expx, +expy, +expz); /* 6 */
copy_v3_fl3(new_ml->bb->vec[7], -expx, +expy, +expz); /* 7 */
- /* transformation of Metalem bb */
+ /* Transformation of meta-elem bounding-box. */
for (i = 0; i < 8; i++) {
mul_m4_v3((float(*)[4])new_ml->mat, new_ml->bb->vec[i]);
}
- /* find max and min of transformed bb */
+ /* Find max and min of transformed bounding-box. */
INIT_MINMAX(tempmin, tempmax);
for (i = 0; i < 8; i++) {
DO_MINMAX(new_ml->bb->vec[i], tempmin, tempmax);
}
- /* set only point 0 and 6 - AABB of Metaelem */
+ /* Set only point 0 and 6 - AABB of meta-elem. */
copy_v3_v3(new_ml->bb->vec[0], tempmin);
copy_v3_v3(new_ml->bb->vec[6], tempmax);
@@ -1370,7 +1379,7 @@ static void init_meta(Depsgraph *depsgraph, PROCESS *process, Scene *scene, Obje
}
}
- /* compute AABB of all Metaelems */
+ /* Compute AABB of all meta-elems. */
if (process->totelem >
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list