差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
cgfs:filled_triangles [2024/06/13 01:21] – freemikan | cgfs:filled_triangles [2025/05/18 15:40] (現在) – freemikan | ||
---|---|---|---|
行 1: | 行 1: | ||
- | < | + | ====== DrawPixelだけで三角形を描く (2) 塗り潰す ====== |
+ | |||
+ | {{: | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | <file cpp> | ||
#include < | #include < | ||
行 115: | 行 121: | ||
std:: | std:: | ||
- | auto x_left = x012; | + | auto &x_left = x012; |
- | auto x_right = x02; | + | auto &x_right = x02; |
auto m = x012.size() / 2; | auto m = x012.size() / 2; | ||
if (x02[m] < x012[m]) { | if (x02[m] < x012[m]) { | ||
- | x_left | + | |
- | | + | |
} | } | ||
行 154: | 行 159: | ||
} | } | ||
} | } | ||
- | </codeprism> | + | </file> |