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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-30 03:52:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-30 03:55:31 +0300
commita771fdb5dc4b868cda4a778bfc4f2670111815bf (patch)
tree75654d27e70c0dead190d071d55956e8174bfaa7 /intern
parent2fca31a5d6558ea1543cf0163eb4b74368040ee7 (diff)
Cleanup: clang-format, spelling
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/subd/subd_split.cpp2
-rw-r--r--intern/cycles/subd/subd_split.h2
-rw-r--r--intern/cycles/subd/subd_subpatch.h21
3 files changed, 17 insertions, 8 deletions
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<Edge> 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<int, int> 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;