From a771fdb5dc4b868cda4a778bfc4f2670111815bf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Aug 2019 10:52:39 +1000 Subject: Cleanup: clang-format, spelling --- intern/cycles/subd/subd_split.cpp | 2 +- intern/cycles/subd/subd_split.h | 2 +- intern/cycles/subd/subd_subpatch.h | 21 +++++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) (limited to 'intern/cycles/subd') diff --git a/intern/cycles/subd/subd_split.cpp b/intern/cycles/subd/subd_split.cpp index 593bb92b0ff..1a8c182510c 100644 --- a/intern/cycles/subd/subd_split.cpp +++ b/intern/cycles/subd/subd_split.cpp @@ -91,7 +91,7 @@ int DiagSplit::T(Patch *patch, float2 Pstart, float2 Pend, bool recursive_resolv int tmin = (int)ceilf(Lsum / params.dicing_rate); int tmax = (int)ceilf((params.test_steps - 1) * Lmax / - params.dicing_rate); // XXX paper says N instead of N-1, seems wrong? + params.dicing_rate); // XXX paper says N instead of N-1, seems wrong? int res = max(tmax, 1); if (tmax - tmin > params.split_threshold) { diff --git a/intern/cycles/subd/subd_split.h b/intern/cycles/subd/subd_split.h index 0fc22872c62..773f4ddf120 100644 --- a/intern/cycles/subd/subd_split.h +++ b/intern/cycles/subd/subd_split.h @@ -44,7 +44,7 @@ class DiagSplit { deque edges; float3 to_world(Patch *patch, float2 uv); - int T(Patch *patch, float2 Pstart, float2 Pend, bool recursive_resolve=false); + int T(Patch *patch, float2 Pstart, float2 Pend, bool recursive_resolve = false); void limit_edge_factor(int &T, Patch *patch, float2 Pstart, float2 Pend); void resolve_edge_factors(Subpatch &sub); diff --git a/intern/cycles/subd/subd_subpatch.h b/intern/cycles/subd/subd_subpatch.h index 4f0c4afee81..1a32b763cb8 100644 --- a/intern/cycles/subd/subd_subpatch.h +++ b/intern/cycles/subd/subd_subpatch.h @@ -128,21 +128,30 @@ class Subpatch { }; struct Edge { - int T; /* Number of segments the edge will be diced into, see DiagSplit paper. */ + /* Number of segments the edge will be diced into, see DiagSplit paper. */ + int T; + + /* top is edge adjacent to start, bottom is adjacent to end. */ + Edge *top, *bottom; - Edge *top, *bottom; /* top is edge adjacent to start, bottom is adjacent to end. */ int top_offset, bottom_offset; bool top_indices_decrease, bottom_indices_decrease; int start_vert_index; int end_vert_index; - int second_vert_index; /* Index of the second vert from this edges corner along the edge towards the next corner */ - bool is_stitch_edge; /* Verties on edge are to be stitched. */ - /* Key to match this edge with others to be stitched with. The ints in the pair are ordered stitching indices */ + /* Index of the second vert from this edges corner along the edge towards the next corner. */ + int second_vert_index; + + /* Vertices on edge are to be stitched. */ + bool is_stitch_edge; + + /* Key to match this edge with others to be stitched with. + * The ints in the pair are ordered stitching indices */ pair stitch_edge_key; - int stitch_edge_T; /* Full T along edge (may be larger than T for edges split from ngon edges) */ + /* Full T along edge (may be larger than T for edges split from ngon edges) */ + int stitch_edge_T; int stitch_offset; int stitch_top_offset; int stitch_start_vert_index; -- cgit v1.2.3