Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-30 05:14:22 +0300
committerCampbell Barton <campbell@blender.org>2022-06-30 05:14:22 +0300
commitb6c28002acb802dcad8a23c0721209103f00f686 (patch)
tree07426be8ea1a11ded6837ef652e7d757f5179c22 /source/blender/gpencil_modifiers
parent209f2b85d745dc7e31b8272db1f30778d7fe2aa8 (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h12
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c8
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c28
3 files changed, 26 insertions, 22 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 5e9b2556fe0..d7005a4bc61 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -108,7 +108,7 @@ typedef struct LineartEdgeSegment {
typedef struct LineartShadowEdge {
struct LineartShadowEdge *next, *prev;
- /* Two end points in framebuffer coordinates viewed from the light source. */
+ /* Two end points in frame-buffer coordinates viewed from the light source. */
double fbc1[4], fbc2[4];
double g1[3], g2[3];
bool orig1, orig2;
@@ -129,11 +129,11 @@ typedef struct LineartShadowSegment {
/* eLineartShadowSegmentFlag */
int flag;
/* The point after which a property of the segment is changed. e.g. shadow mask/target_ref etc.
- * Coordinates in NDC during shadow caluclation but transformed to global linear before cutting
+ * Coordinates in NDC during shadow calculation but transformed to global linear before cutting
* onto edges during the loading stage of the "actual" rendering. */
double ratio;
/* Left and right pos, because when casting shadows at some point there will be
- * non-continuous cuts, see #lineart_shadow_edge_cut for detailed explaination. */
+ * non-continuous cuts, see #lineart_shadow_edge_cut for detailed explanation. */
double fbc1[4], fbc2[4];
/* Global position. */
double g1[4], g2[4];
@@ -276,7 +276,7 @@ typedef struct LineartData {
* calculation is finished. */
LineartStaticMemPool *shadow_data_pool;
- /* Storing shadow edge eln, array, and cuts for shadow information, so it's avaliable when line
+ /* Storing shadow edge eln, array, and cuts for shadow information, so it's available when line
* art runs the second time for occlusion. Either a reference to LineartCache::shadow_data_pool
* (shadow stage) or a reference to LineartData::render_data_pool (final stage). */
LineartStaticMemPool *edge_data_pool;
@@ -746,8 +746,8 @@ BLI_INLINE int lineart_line_isec_2d_ignore_line2pos(const double a1[2],
double *r_a_ratio)
{
/* The define here is used to check how vector or slope method handles boundary cases. The result
- * of lim(div->0) and lim(k->0) could both produce some unwanted flickers in line art, the
- * influence of which is still not fully understood, so keep the switch there for futher
+ * of `lim(div->0)` and `lim(k->0)` could both produce some unwanted flickers in line art, the
+ * influence of which is still not fully understood, so keep the switch there for further
* investigations. */
#define USE_VECTOR_LINE_INTERSECTION_IGN
#ifdef USE_VECTOR_LINE_INTERSECTION_IGN
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index c17827b7228..236e2df1537 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3658,7 +3658,7 @@ static LineartData *lineart_create_render_buffer(Scene *scene,
ld->chain_data_pool = &lc->chain_data_pool;
- /* See LineartData::edge_data_pool for explaination. */
+ /* See #LineartData::edge_data_pool for explanation. */
ld->edge_data_pool = &ld->render_data_pool;
BLI_spin_init(&ld->lock_task);
@@ -4494,7 +4494,7 @@ static void lineart_create_edges_from_isec_data(LineartIsecData *d)
return;
}
- /* We don't care about removing duplicated vert in this method, chaning can handle that,
+ /* We don't care about removing duplicated vert in this method, chaining can handle that,
* and it saves us from using locks and look up tables. */
LineartVert *v = lineart_mem_acquire(ld->edge_data_pool, sizeof(LineartVert) * total_lines * 2);
LineartEdge *e = lineart_mem_acquire(ld->edge_data_pool, sizeof(LineartEdge) * total_lines);
@@ -4565,7 +4565,7 @@ static void lineart_create_edges_from_isec_data(LineartIsecData *d)
}
else { /* equal priority */
if (ob1 == ob2) {
- /* object_ref should be ambigious if intersection lines comes from different objects. */
+ /* object_ref should be ambiguous if intersection lines comes from different objects. */
e->object_ref = ob1;
}
}
@@ -5165,7 +5165,7 @@ static void lineart_gpencil_generate(LineartCache *cache,
}
if (shaodow_selection) {
if (ec->shadow_mask_bits != LRT_SHADOW_MASK_UNDEFINED) {
- /* TODO(Yiming): Give a behaviour option for how to display undefined shadow info. */
+ /* TODO(@Yiming): Give a behavior option for how to display undefined shadow info. */
if ((shaodow_selection == LRT_SHADOW_FILTER_LIT &&
(!(ec->shadow_mask_bits & LRT_SHADOW_MASK_LIT))) ||
(shaodow_selection == LRT_SHADOW_FILTER_SHADED &&
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
index ec1d9a14233..ad0137fe0f0 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
@@ -193,10 +193,12 @@ static void lineart_shadow_segment_slice_get(double *fb_co_1,
interp_v3_v3v3_db(r_gloc, gloc_1, gloc_2, ga);
}
-/* This function tries to get the closest projected segments along two end points.
- * The x,y of s1, s2 are aligned in framebuffer coordinates, only z,w are different.
+/**
+ * This function tries to get the closest projected segments along two end points.
+ * The x,y of s1, s2 are aligned in frame-buffer coordinates, only z,w are different.
* We will get the closest z/w as well as the corresponding global coordinates.
*
+ * \code{.unparsed}
* (far side)
* l-------r [s1] ^
* _-r [s2] | In this situation it will essentially return the coordinates of s2.
@@ -209,9 +211,11 @@ static void lineart_shadow_segment_slice_get(double *fb_co_1,
* l-----_c`-----r [s1] | and `r_new` will be assigned coordinates of `c`.
* _-` |
* l-` |
+ * \endcode
*
* Returns true when a new cut (`c`) is needed in the middle, otherwise returns false, and
- * `*r_new_xxx` are not touched. */
+ * `*r_new_xxx` are not touched.
+ */
static bool lineart_do_closest_segment(bool is_persp,
double *s1_fb_co_1,
double *s1_fb_co_2,
@@ -309,7 +313,7 @@ static void lineart_shadow_create_shadow_edge_array(LineartData *ld,
LRT_ITER_ALL_LINES_BEGIN
{
/* Only contour and loose edges can actually cast shadows. We allow light contour here because
- * we want to see if it also doubles as a view contouror, in that case we also need to project
+ * we want to see if it also doubles as a view contour, in that case we also need to project
* them. */
if (!(e->flags & accept_types)) {
continue;
@@ -383,7 +387,7 @@ static void lineart_shadow_create_shadow_edge_array(LineartData *ld,
interp_v3_v3v3_db(sedge[i].g2, e->v1->gloc, e->v2->gloc, ga2);
/* Assign an absurdly big W for initial distance so when triangles show up to catch the
- * shadow, their w must certainlly be smaller than this value so the shadow catches
+ * shadow, their w must certainly be smaller than this value so the shadow catches
* successfully. */
sedge[i].fbc1[3] = 1e30;
sedge[i].fbc2[3] = 1e30;
@@ -712,7 +716,7 @@ static bool lineart_shadow_cast_onto_triangle(LineartData *ld,
/* Bound box check. Because we have already done occlusion in the shadow camera, so any visual
* intersection found in this function must mean that the triangle is behind the given line so it
- * will always project a shadow, hence no need to do depth boundbox check. */
+ * will always project a shadow, hence no need to do depth bound-box check. */
if ((MAX3(FBC0[0], FBC1[0], FBC2[0]) < MIN2(LFBC[0], RFBC[0])) ||
(MIN3(FBC0[0], FBC1[0], FBC2[0]) > MAX2(LFBC[0], RFBC[0])) ||
(MAX3(FBC0[1], FBC1[1], FBC2[1]) < MIN2(LFBC[1], RFBC[1])) ||
@@ -1055,7 +1059,7 @@ static void lineart_shadow_register_enclosed_shapes(LineartData *ld, LineartData
e = shadow_ld->pending_edges.array[i];
/* Only care about shade-on-light and light-on-light situations, hence we only need
- * non-occludded segments in shadow buffer. */
+ * non-occluded segments in shadow buffer. */
if (e->min_occ > 0) {
continue;
}
@@ -1103,7 +1107,7 @@ static void lineart_shadow_register_enclosed_shapes(LineartData *ld, LineartData
}
}
-/* This call would internally duplicate #original_ld, override necessary configureations for shadow
+/* This call would internally duplicate #original_ld, override necessary configurations for shadow
* computations. It will return:
*
* 1) Generated shadow edges in format of `LineartElementLinkNode` which can be directly loaded
@@ -1151,7 +1155,7 @@ bool lineart_main_try_generate_shadow(Depsgraph *depsgraph,
ld->conf.do_shadow_cast = true;
ld->shadow_data_pool = shadow_data_pool;
- /* See LineartData::edge_data_pool for explaination. */
+ /* See LineartData::edge_data_pool for explanation. */
if (ld->conf.shadow_selection) {
ld->edge_data_pool = shadow_data_pool;
}
@@ -1180,7 +1184,7 @@ bool lineart_main_try_generate_shadow(Depsgraph *depsgraph,
}
ld->qtree.recursive_level = is_persp ? LRT_TILE_RECURSIVE_PERSPECTIVE : LRT_TILE_RECURSIVE_ORTHO;
- /* Contour and loose edge from light viewing direction will be casted as shadow, so only
+ /* Contour and loose edge from light viewing direction will be cast as shadow, so only
* force them on. If we need lit/shaded information for other line types, they are then
* enabled as-is so that cutting positions can also be calculated through shadow projection.
*/
@@ -1250,7 +1254,7 @@ bool lineart_main_try_generate_shadow(Depsgraph *depsgraph,
}
if (ld->conf.shadow_enclose_shapes) {
- /* Need loaded data for reprojecting the 3rd time to get shape boundary against lit/shaded
+ /* Need loaded data for re-projecting the 3rd time to get shape boundary against lit/shaded
* region. */
(*r_shadow_ld_if_reproject) = ld;
}
@@ -1342,7 +1346,7 @@ void lineart_main_transform_and_add_shadow(LineartData *ld,
}
/* Does the 3rd stage reprojection, will not re-load objects because #shadow_ld is not deleted.
- * Only reprojects view camera edges and check visibility in light camera, then we can determine
+ * Only re-projects view camera edges and check visibility in light camera, then we can determine
* whether an edge landed on a lit or shaded area. */
void lineart_main_make_enclosed_shapes(LineartData *ld, LineartData *shadow_ld)
{