diff options
| author | Hein-Pieter van Braam | 2017-09-07 21:48:50 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2017-09-08 14:57:48 +0200 |
| commit | 67a706fc1b9721f3f06eef8be7312f175e2041ce (patch) | |
| tree | bd0fb17813ac40b1b1e21a1e3a7236b30b7d69bb /scene/2d/line_builder.cpp | |
| parent | d1cb73b47a17de830d9474026ffa7b3587cfbc68 (diff) | |
| download | godot-67a706fc1b9721f3f06eef8be7312f175e2041ce.tar.gz godot-67a706fc1b9721f3f06eef8be7312f175e2041ce.tar.zst godot-67a706fc1b9721f3f06eef8be7312f175e2041ce.zip | |
Diffstat (limited to 'scene/2d/line_builder.cpp')
| -rw-r--r-- | scene/2d/line_builder.cpp | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index 1235013af..53db30e3c 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -173,13 +173,15 @@ void LineBuilder::build() { strip_begin(pos_up0, pos_down0, color0, uvx0); - // pos_up0 ------------- pos_up1 -------------------- - // | | - // pos0 - - - - - - - - - pos1 - - - - - - - - - pos2 - // | | - // pos_down0 ------------ pos_down1 ------------------ - // - // i-1 i i+1 + /* + * pos_up0 ------------- pos_up1 -------------------- + * | | + * pos0 - - - - - - - - - pos1 - - - - - - - - - pos2 + * | | + * pos_down0 ------------ pos_down1 ------------------ + * + * i-1 i i+1 + */ // http://labs.hyperandroid.com/tag/opengl-lines // (not the same implementation but visuals help a lot) @@ -206,17 +208,19 @@ void LineBuilder::build() { inner_normal1 = -u1 * hw; } - // --------------------------- - // / - // 0 / 1 - // / / - // --------------------x------ / - // / / (here shown with orientation == DOWN) - // / / - // / / - // / / - // 2 / - // / + /* + * --------------------------- + * / + * 0 / 1 + * / / + * --------------------x------ / + * / / (here shown with orientation == DOWN) + * / / + * / / + * / / + * 2 / + * / + */ // Find inner intersection at the joint Vector2 corner_pos_in, corner_pos_out; @@ -315,13 +319,14 @@ void LineBuilder::build() { // Add joint geometry if (current_joint_mode != LINE_JOINT_SHARP) { - // ________________ cbegin - // / \ - // / \ - // ____________/_ _ _\ cend - // | | - // | | - // | | + /* ________________ cbegin + * / \ + * / \ + * ____________/_ _ _\ cend + * | | + * | | + * | | + */ Vector2 cbegin, cend; if (orientation == UP) { |
