-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtorus.h
98 lines (93 loc) · 2.67 KB
/
torus.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include "fxtypes.h"
#define torus_num_vertices 56
#define torus_num_indices 324
const fx3_t torus_center = { 0, 192, 0 };
const fx3_t torus_size = { 768, 384, 256 };
const uint8_t torus_indices[] = {
0, 1, 2, 2, 4, 0, 2, 1, 8, 8, 10, 2, 8, 13, 14, 14,
10, 8, 14, 13, 20, 20, 22, 14, 20, 25, 26, 26, 22, 20, 26, 25,
32, 32, 12, 26, 32, 37, 38, 38, 12, 32, 38, 37, 0, 0, 4, 38,
0, 42, 50, 50, 1, 0, 1, 50, 55, 55, 8, 1, 8, 55, 53, 53,
13, 8, 13, 53, 47, 47, 20, 13, 47, 49, 25, 25, 20, 47, 49, 51,
32, 32, 25, 49, 51, 39, 37, 37, 32, 51, 39, 42, 0, 0, 37, 39,
42, 34, 43, 43, 50, 42, 50, 43, 45, 45, 55, 50, 45, 36, 53, 53,
55, 45, 36, 41, 47, 47, 53, 36, 47, 41, 54, 54, 49, 47, 49, 54,
52, 52, 51, 49, 52, 29, 39, 39, 51, 52, 29, 34, 42, 42, 39, 29,
30, 48, 43, 43, 34, 30, 43, 48, 27, 27, 45, 43, 45, 27, 40, 40,
36, 45, 36, 40, 31, 31, 41, 36, 31, 24, 54, 54, 41, 31, 24, 21,
52, 52, 54, 24, 21, 46, 29, 29, 52, 21, 29, 46, 30, 30, 34, 29,
19, 35, 48, 48, 30, 19, 35, 17, 27, 27, 48, 35, 17, 18, 40, 40,
27, 17, 18, 33, 31, 31, 40, 18, 31, 33, 28, 28, 24, 31, 24, 28,
16, 16, 21, 24, 21, 16, 23, 23, 46, 21, 46, 23, 19, 19, 30, 46,
19, 3, 5, 5, 35, 19, 35, 5, 44, 44, 17, 35, 17, 44, 15, 15,
18, 17, 18, 15, 7, 7, 33, 18, 7, 6, 28, 28, 33, 7, 6, 11,
16, 16, 28, 6, 11, 9, 23, 23, 16, 11, 9, 3, 19, 19, 23, 9,
4, 2, 10, 4, 10, 14, 4, 14, 22, 4, 22, 26, 4, 26, 12, 4,
12, 38, 3, 9, 11, 3, 11, 6, 3, 6, 7, 3, 7, 15, 3, 15,
44, 3, 44, 5, };
const uint8_t torus_face_colors[] = {
79, 79, 17, 17, 79, 79, 17, 17, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 17, 17, 79, 79, 17, 17, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 17, 17, 17, 17, 17, 17, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, };
const int8_t torus_vertices[] = {
110, 0, 0,
100, -13, 90,
115, -128, 90,
-128, -128, 0,
127, -128, 0,
-116, -128, 90,
-56, -128, -91,
-43, -128, 0,
73, -43, 127,
-116, -128, -91,
85, -128, 127,
-86, -128, -128,
85, -128, -128,
47, -73, 90,
55, -128, 90,
-56, -128, 90,
-74, -43, -128,
-74, -43, 127,
-48, -73, 90,
-111, 0, 0,
36, -86, 0,
-43, 19, -128,
42, -128, 0,
-101, -13, -91,
-28, -33, -91,
47, -73, -91,
55, -128, -91,
-43, 19, 127,
-48, -73, -91,
0, 103, -91,
-64, 93, 0,
-22, -55, 0,
73, -43, -128,
-37, -86, 0,
0, 127, 0,
-101, -13, 90,
0, -18, 90,
100, -13, -91,
115, -128, -91,
57, 72, -91,
-28, -33, 90,
0, -43, 0,
63, 93, 0,
0, 103, 90,
-86, -128, 127,
0, 42, 127,
-58, 72, -91,
21, -55, 0,
-58, 72, 90,
27, -33, -91,
57, 72, 90,
42, 19, -128,
0, 42, -128,
27, -33, 90,
0, -18, -91,
42, 19, 127,
};