Cleanup: spelling correction: "adjacent" & spelling in comments

This commit is contained in:
Campbell Barton
2023-12-19 09:46:59 +11:00
parent e51126500e
commit 482ba7806d
13 changed files with 17 additions and 16 deletions

View File

@@ -45,7 +45,7 @@ ccl_device_inline float4 madd4(const float4 a, const float4 b, const float4 c)
/*
* FAST & APPROXIMATE MATH
*
* The functions named "fast_*" provide a set of replacements to libm that
* The functions named "fast_*" provide a set of replacements to `libm` that
* are much faster at the expense of some accuracy and robust handling of
* extreme values. One design goal for these approximation was to avoid
* branches as much as possible and operate on single precision values only

View File

@@ -155,8 +155,8 @@ typedef struct IDTypeInfo {
IDTypeInitDataFunction init_data;
/**
* Copy the given data-block's data from source to destination. May be NULL if mere memcopy of
* the ID struct itself is enough.
* Copy the given data-block's data from source to destination.
* May be NULL if mere memory-copy of the ID struct itself is enough.
*/
IDTypeCopyDataFunction copy_data;

View File

@@ -270,7 +270,7 @@ inline int face_find_corner_from_vert(const IndexRange face,
* Return the vertex indices on either side of the given vertex, ordered based on the winding
* direction of the face. The vertex must be in the face.
*/
inline int2 face_find_adjecent_verts(const IndexRange face,
inline int2 face_find_adjacent_verts(const IndexRange face,
const Span<int> corner_verts,
const int vert)
{

View File

@@ -229,9 +229,9 @@ class MeshFairingContext : public FairingContext {
using namespace blender;
const int vert = corner_verts_[loop];
const blender::IndexRange face = faces[loop_to_face_map_[loop]];
const int2 adjecent_verts = bke::mesh::face_find_adjecent_verts(face, corner_verts_, vert);
copy_v3_v3(r_adj_next, co_[adjecent_verts[0]]);
copy_v3_v3(r_adj_prev, co_[adjecent_verts[1]]);
const int2 adjacent_verts = bke::mesh::face_find_adjacent_verts(face, corner_verts_, vert);
copy_v3_v3(r_adj_next, co_[adjacent_verts[0]]);
copy_v3_v3(r_adj_prev, co_[adjacent_verts[1]]);
}
int other_vertex_index_from_loop(const int loop, const int v) override

View File

@@ -180,7 +180,7 @@ void normals_calc_verts(const Span<float3> vert_positions,
float3 vert_normal(0);
for (const int face : vert_faces) {
const int2 adjacent_verts = face_find_adjecent_verts(faces[face], corner_verts, vert);
const int2 adjacent_verts = face_find_adjacent_verts(faces[face], corner_verts, vert);
const float3 dir_prev = math::normalize(positions[adjacent_verts[0]] - positions[vert]);
const float3 dir_next = math::normalize(positions[adjacent_verts[1]] - positions[vert]);
const float factor = math::safe_acos_approx(math::dot(dir_prev, dir_next));

View File

@@ -19,7 +19,7 @@ void DoubleEdgeMaskNode::convert_to_operations(NodeConverter &converter,
const bNode *bnode = this->get_bnode();
operation = new DoubleEdgeMaskOperation();
operation->set_adjecent_only(bnode->custom1);
operation->set_adjacent_only(bnode->custom1);
operation->set_keep_inside(bnode->custom2);
converter.add_operation(operation);

View File

@@ -48,7 +48,7 @@ class DoubleEdgeMaskOperation : public NodeOperation {
ReadBufferOperation *read_operation,
rcti *output) override;
void set_adjecent_only(bool adjacent_only)
void set_adjacent_only(bool adjacent_only)
{
adjacent_only_ = adjacent_only;
}

View File

@@ -78,8 +78,8 @@ MaterialModule::MaterialModule(Instance &inst) : inst_(inst)
diffuse_mat->use_nodes = true;
diffuse_mat->surface_render_method = MA_SURFACE_METHOD_FORWARD;
/* Use 0.18 as it is close to middle grey. Middle grey is typically defined as 18% reflectance
* of visible light and commonly used for vfx balls. */
/* Use 0.18 as it is close to middle gray. Middle gray is typically defined as 18% reflectance
* of visible light and commonly used for VFX balls. */
bNode *bsdf = nodeAddStaticNode(nullptr, ntree, SH_NODE_BSDF_DIFFUSE);
bNodeSocket *base_color = nodeFindSocket(bsdf, SOCK_IN, "Color");
copy_v3_fl(((bNodeSocketValueRGBA *)base_color->default_value)->value, 0.18f);

View File

@@ -734,7 +734,7 @@ static void sculpt_vertex_neighbors_get_faces(SculptSession *ss,
continue;
}
const blender::IndexRange face = ss->faces[face_i];
const blender::int2 f_adj_v = blender::bke::mesh::face_find_adjecent_verts(
const blender::int2 f_adj_v = blender::bke::mesh::face_find_adjacent_verts(
face, ss->corner_verts, vertex.i);
for (int j = 0; j < 2; j++) {
if (f_adj_v[j] != vertex.i) {

View File

@@ -100,7 +100,7 @@ void SubdivModifierDisabler::disable_modifiers()
}
/* This might disable more modifiers than necessary, as it doesn't take restrictions like
* "export selected objects only" into account. However, with the subdivs disabled,
* "export selected objects only" into account. However, with the subdivisions disabled,
* moving to a different frame is also going to be faster, so in the end this is probably
* a good thing to do. */
disable_modifier(mod);

View File

@@ -456,7 +456,7 @@ class CryptoMatteOperation : public NodeOperation {
return output_matte;
}
/* Computes the output image result by premultiplying the matte to the image. */
/* Computes the output image result by pre-multiplying the matte to the image. */
void compute_image(Result &matte)
{
GPUShader *shader = context().get_shader("compositor_cryptomatte_image");

View File

@@ -44,7 +44,7 @@ static void shortest_paths(const Mesh &mesh,
queue.emplace(0.0f, start_vert_i);
});
/* Though it uses more memory, calculating the adjecent vertex
/* Though it uses more memory, calculating the adjacent vertex
* across each edge beforehand is noticeably faster. */
Array<int> other_vertex(vert_to_edge.data.size());
threading::parallel_for(vert_to_edge.index_range(), 2048, [&](const IndexRange range) {

View File

@@ -392,6 +392,7 @@ dict_custom = {
"triangulator",
"trilinear",
"tunable",
"uber",
"unadjusted",
"unalignable",
"unallocated",