Clean up the variants geometry
This commit is contained in:
parent
cbc3f5b57a
commit
9cbfed136c
1 changed files with 88 additions and 62 deletions
|
@ -212,83 +212,109 @@ struct Variants {
|
|||
// 1: lower left corner, 1 triangle
|
||||
0.0, 1.0,
|
||||
0.5, 1.0,
|
||||
0.0, 0.5,
|
||||
0.0, 0.5,
|
||||
// 2: lower right corner, 1 triangle
|
||||
1.0, 1.0,
|
||||
0.5, 1.0,
|
||||
1.0, 0.5,
|
||||
// 3: bottom half, 2 triangles
|
||||
0.0, 0.5,
|
||||
0.0, 0.0,
|
||||
1.0, 0.5,
|
||||
1.0, 0.0,
|
||||
0.0, 1.0,
|
||||
1.0, 1.0,
|
||||
0.0, 0.5,
|
||||
0.0, 0.5,
|
||||
1.0, 1.0,
|
||||
1.0, 0.5,
|
||||
// 4: top right corner, 1 triangle
|
||||
1.0, 1.0,
|
||||
0.5, 1.0,
|
||||
1.0, 0.5,
|
||||
// 5: top right and bottom left, 4 triangles
|
||||
0.0, 0.5,
|
||||
0.5, 1.0,
|
||||
0.0, 0.0,
|
||||
1.0, 1.0,
|
||||
1.0, 0.0,
|
||||
1.0, 0.5,
|
||||
0.5, 0.0,
|
||||
1.0, 0.5,
|
||||
// 5: top right and bottom left, 2 triangles
|
||||
1.0, 0.0,
|
||||
0.5, 0.0,
|
||||
1.0, 0.5,
|
||||
0.0, 1.0,
|
||||
0.0, 0.5,
|
||||
0.5, 1.0,
|
||||
// 6: right half, 2 triangles
|
||||
1.0, 0.0,
|
||||
1.0, 1.0,
|
||||
0.0, 0.0,
|
||||
0.0, 1.0,
|
||||
0.5, 0.0,
|
||||
0.5, 1.0,
|
||||
0.5, 0.0,
|
||||
0.0, 1.0,
|
||||
0.5, 1.0,
|
||||
// 7: bottom right corner 7/8ths, 3 triangles
|
||||
0.0, 0.5,
|
||||
0.5, 1.0,
|
||||
0.0, 0.0,
|
||||
1.0, 1.0,
|
||||
0.0, 0.5,
|
||||
0.5, 0.0,
|
||||
0.0, 1.0,
|
||||
0.0, 1.0,
|
||||
0.5, 0.0,
|
||||
1.0, 0.0,
|
||||
1.0, 0.0,
|
||||
0.0, 1.0,
|
||||
1.0, 1.0,
|
||||
// 8: top left corner, 1 triangle
|
||||
0.0, 1.0,
|
||||
0.5, 1.0,
|
||||
0.0, 0.5,
|
||||
0.0, 0.0,
|
||||
0.0, 0.5,
|
||||
0.5, 0.0,
|
||||
// 9: left half, 2 triangles
|
||||
0.0, 1.0,
|
||||
0.5, 1.0,
|
||||
0.5, 0.0,
|
||||
0.5, 1.0,
|
||||
1.0, 0.0,
|
||||
1.0, 0.0,
|
||||
0.5, 1.0,
|
||||
1.0, 1.0,
|
||||
// 10: top left and bottom right, 2 triangles
|
||||
0.0, 0.0,
|
||||
0.0, 0.5,
|
||||
0.5, 0.0,
|
||||
1.0, 1.0,
|
||||
0.5, 1.0,
|
||||
1.0, 0.5,
|
||||
// 11: bottom left corner 7/8th, 3 triangles
|
||||
0.5, 0.0,
|
||||
1.0, 0.5,
|
||||
0.0, 0.0,
|
||||
0.0, 0.0,
|
||||
0.5, 0.0,
|
||||
// 10: top left and bottom right, 4 triangles
|
||||
0.0, 0.5,
|
||||
0.5, 0.0,
|
||||
0.0, 1.0,
|
||||
1.0, 0.0,
|
||||
0.5, 1.0,
|
||||
1.0, 0.5,
|
||||
// 11: bottom left corner 7/8th, 3 triangles
|
||||
1.0, 0.5,
|
||||
0.5, 1.0,
|
||||
1.0, 0.0,
|
||||
0.0, 1.0,
|
||||
1.0, 1.0,
|
||||
1.0, 1.0,
|
||||
0.0, 1.0,
|
||||
0.0, 0.0,
|
||||
// 12: top half, 2 triangles
|
||||
0.0, 1.0,
|
||||
1.0, 1.0,
|
||||
0.0, 0.5,
|
||||
1.0, 0.5,
|
||||
// 13: top left corner 7/8ths, 3 triangles
|
||||
0.5, 0.0,
|
||||
1.0, 0.5,
|
||||
0.0, 0.0,
|
||||
1.0, 1.0,
|
||||
0.0, 1.0,
|
||||
// 14: top right corner 7/8th, 3 triangles
|
||||
0.0, 0.5,
|
||||
0.5, 0.0,
|
||||
0.0, 1.0,
|
||||
0.0, 0.5,
|
||||
1.0, 0.0,
|
||||
1.0, 0.0,
|
||||
0.0, 0.5,
|
||||
1.0, 0.5,
|
||||
// 13: top left corner 7/8ths, 3 triangles
|
||||
0.5, 1.0,
|
||||
1.0, 0.5,
|
||||
1.0, 0.0,
|
||||
1.0, 0.0,
|
||||
0.5, 1.0,
|
||||
0.0, 1.0,
|
||||
0.0, 1.0,
|
||||
1.0, 0.0,
|
||||
0.0, 0.0,
|
||||
// 14: top right corner 7/8th, 3 triangles
|
||||
0.0, 0.5,
|
||||
0.5, 1.0,
|
||||
1.0, 1.0,
|
||||
1.0, 1.0,
|
||||
0.0, 0.5,
|
||||
0.0, 0.0,
|
||||
0.0, 0.0,
|
||||
1.0, 1.0,
|
||||
1.0, 0.0,
|
||||
1.0, 1.0,
|
||||
// 15: full, 2 triangles
|
||||
0.0, 0.0,
|
||||
0.0, 1.0,
|
||||
1.0, 1.0,
|
||||
0.0, 0.0,
|
||||
1.0, 1.0,
|
||||
1.0, 0.0,
|
||||
0.0, 1.0,
|
||||
1.0, 1.0,
|
||||
]
|
||||
]
|
||||
|
||||
static func numberOfTriangles(for variation: UInt) -> UInt {
|
||||
switch variation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue