vrheights

view src/teapot_data.h @ 16:7f6d68d95c22

updated to new version of goatvr
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Oct 2015 06:34:31 +0200
parents
children
line source
1 #ifndef TEAPOT_DATA_H_
2 #define TEAPOT_DATA_H_
4 #include "bezmath.h"
6 #define NUM_TEAPOT_INDICES (sizeof teapot_index / sizeof *teapot_index)
7 #define NUM_TEAPOT_VERTS (sizeof teapot_verts / sizeof *teapot_verts)
9 #define NUM_TEAPOT_PATCHES (NUM_TEAPOT_INDICES / 16)
11 static float teapot_part_flip[] = {
12 1, 1, 1, 1, /* rim flip */
13 1, 1, 1, 1, /* body1 flip */
14 1, 1, 1, 1, /* body2 flip */
15 1, 1, 1, 1, /* lid patch 1 flip */
16 1, 1, 1, 1, /* lid patch 2 flip */
17 1, -1, /* handle 1 flip */
18 1, -1, /* handle 2 flip */
19 1, -1, /* spout 1 flip */
20 1, -1, /* spout 2 flip */
21 1, 1, 1, 1 /* bottom flip */
22 };
24 static float teapot_part_rot[] = {
25 0, 90, 180, 270, /* rim rotations */
26 0, 90, 180, 270, /* body patch 1 rotations */
27 0, 90, 180, 270, /* body patch 2 rotations */
28 0, 90, 180, 270, /* lid patch 1 rotations */
29 0, 90, 180, 270, /* lid patch 2 rotations */
30 0, 0, /* handle 1 rotations */
31 0, 0, /* handle 2 rotations */
32 0, 0, /* spout 1 rotations */
33 0, 0, /* spout 2 rotations */
34 0, 90, 180, 270 /* bottom rotations */
35 };
38 static int teapot_index[] = {
39 /* rim */
40 102, 103, 104, 105, 4, 5, 6, 7, 8,
41 9, 10, 11, 12, 13, 14, 15,
43 102, 103, 104, 105, 4, 5, 6, 7, 8,
44 9, 10, 11, 12, 13, 14, 15,
46 102, 103, 104, 105, 4, 5, 6, 7, 8,
47 9, 10, 11, 12, 13, 14, 15,
49 102, 103, 104, 105, 4, 5, 6, 7, 8,
50 9, 10, 11, 12, 13, 14, 15,
52 /* body1 */
53 12, 13, 14, 15, 16, 17, 18, 19,
54 20, 21, 22, 23, 24, 25, 26, 27,
56 12, 13, 14, 15, 16, 17, 18, 19,
57 20, 21, 22, 23, 24, 25, 26, 27,
59 12, 13, 14, 15, 16, 17, 18, 19,
60 20, 21, 22, 23, 24, 25, 26, 27,
62 12, 13, 14, 15, 16, 17, 18, 19,
63 20, 21, 22, 23, 24, 25, 26, 27,
65 /* body 2 */
66 24, 25, 26, 27, 29, 30, 31, 32,
67 33, 34, 35, 36, 37, 38, 39, 40,
69 24, 25, 26, 27, 29, 30, 31, 32,
70 33, 34, 35, 36, 37, 38, 39, 40,
72 24, 25, 26, 27, 29, 30, 31, 32,
73 33, 34, 35, 36, 37, 38, 39, 40,
75 24, 25, 26, 27, 29, 30, 31, 32,
76 33, 34, 35, 36, 37, 38, 39, 40,
78 /* lid 1 */
79 96, 96, 96, 96, 97, 98, 99, 100,
80 101, 101, 101, 101, 0, 1, 2, 3,
82 96, 96, 96, 96, 97, 98, 99, 100,
83 101, 101, 101, 101, 0, 1, 2, 3,
85 96, 96, 96, 96, 97, 98, 99, 100,
86 101, 101, 101, 101, 0, 1, 2, 3,
88 96, 96, 96, 96, 97, 98, 99, 100,
89 101, 101, 101, 101, 0, 1, 2, 3,
91 /* lid 2 */
92 0, 1, 2, 3, 106, 107, 108, 109,
93 110, 111, 112, 113, 114, 115, 116, 117,
95 0, 1, 2, 3, 106, 107, 108, 109,
96 110, 111, 112, 113, 114, 115, 116, 117,
98 0, 1, 2, 3, 106, 107, 108, 109,
99 110, 111, 112, 113, 114, 115, 116, 117,
101 0, 1, 2, 3, 106, 107, 108, 109,
102 110, 111, 112, 113, 114, 115, 116, 117,
104 /* handle 1 */
105 41, 42, 43, 44, 45, 46, 47, 48,
106 49, 50, 51, 52, 53, 54, 55, 56,
108 41, 42, 43, 44, 45, 46, 47, 48,
109 49, 50, 51, 52, 53, 54, 55, 56,
111 /* handle 2 */
112 53, 54, 55, 56, 57, 58, 59, 60,
113 61, 62, 63, 64, 28, 65, 66, 67,
115 53, 54, 55, 56, 57, 58, 59, 60,
116 61, 62, 63, 64, 28, 65, 66, 67,
118 /* spout 1 */
119 68, 69, 70, 71, 72, 73, 74, 75,
120 76, 77, 78, 79, 80, 81, 82, 83,
122 68, 69, 70, 71, 72, 73, 74, 75,
123 76, 77, 78, 79, 80, 81, 82, 83,
125 /* spout 2 */
126 80, 81, 82, 83, 84, 85, 86, 87,
127 88, 89, 90, 91, 92, 93, 94, 95,
129 80, 81, 82, 83, 84, 85, 86, 87,
130 88, 89, 90, 91, 92, 93, 94, 95,
132 /* bottom */
133 118, 118, 118, 118, 124, 122, 119, 121,
134 123, 126, 125, 120, 40, 39, 38, 37,
136 118, 118, 118, 118, 124, 122, 119, 121,
137 123, 126, 125, 120, 40, 39, 38, 37,
139 118, 118, 118, 118, 124, 122, 119, 121,
140 123, 126, 125, 120, 40, 39, 38, 37,
142 118, 118, 118, 118, 124, 122, 119, 121,
143 123, 126, 125, 120, 40, 39, 38, 37
144 };
147 static struct vec3 teapot_verts[] = {
148 { 0.2000, 0.0000, 2.70000 }, { 0.2000, -0.1120, 2.70000 },
149 { 0.1120, -0.2000, 2.70000 }, { 0.0000, -0.2000, 2.70000 },
150 { 1.3375, 0.0000, 2.53125 }, { 1.3375, -0.7490, 2.53125 },
151 { 0.7490, -1.3375, 2.53125 }, { 0.0000, -1.3375, 2.53125 },
152 { 1.4375, 0.0000, 2.53125 }, { 1.4375, -0.8050, 2.53125 },
153 { 0.8050, -1.4375, 2.53125 }, { 0.0000, -1.4375, 2.53125 },
154 { 1.5000, 0.0000, 2.40000 }, { 1.5000, -0.8400, 2.40000 },
155 { 0.8400, -1.5000, 2.40000 }, { 0.0000, -1.5000, 2.40000 },
156 { 1.7500, 0.0000, 1.87500 }, { 1.7500, -0.9800, 1.87500 },
157 { 0.9800, -1.7500, 1.87500 }, { 0.0000, -1.7500, 1.87500 },
158 { 2.0000, 0.0000, 1.35000 }, { 2.0000, -1.1200, 1.35000 },
159 { 1.1200, -2.0000, 1.35000 }, { 0.0000, -2.0000, 1.35000 },
160 { 2.0000, 0.0000, 0.90000 }, { 2.0000, -1.1200, 0.90000 },
161 { 1.1200, -2.0000, 0.90000 }, { 0.0000, -2.0000, 0.90000 },
162 { -2.0000, 0.0000, 0.90000 }, { 2.0000, 0.0000, 0.45000 },
163 { 2.0000, -1.1200, 0.45000 }, { 1.1200, -2.0000, 0.45000 },
164 { 0.0000, -2.0000, 0.45000 }, { 1.5000, 0.0000, 0.22500 },
165 { 1.5000, -0.8400, 0.22500 }, { 0.8400, -1.5000, 0.22500 },
166 { 0.0000, -1.5000, 0.22500 }, { 1.5000, 0.0000, 0.15000 },
167 { 1.5000, -0.8400, 0.15000 }, { 0.8400, -1.5000, 0.15000 },
168 { 0.0000, -1.5000, 0.15000 }, { -1.6000, 0.0000, 2.02500 },
169 { -1.6000, -0.3000, 2.02500 }, { -1.5000, -0.3000, 2.25000 },
170 { -1.5000, 0.0000, 2.25000 }, { -2.3000, 0.0000, 2.02500 },
171 { -2.3000, -0.3000, 2.02500 }, { -2.5000, -0.3000, 2.25000 },
172 { -2.5000, 0.0000, 2.25000 }, { -2.7000, 0.0000, 2.02500 },
173 { -2.7000, -0.3000, 2.02500 }, { -3.0000, -0.3000, 2.25000 },
174 { -3.0000, 0.0000, 2.25000 }, { -2.7000, 0.0000, 1.80000 },
175 { -2.7000, -0.3000, 1.80000 }, { -3.0000, -0.3000, 1.80000 },
176 { -3.0000, 0.0000, 1.80000 }, { -2.7000, 0.0000, 1.57500 },
177 { -2.7000, -0.3000, 1.57500 }, { -3.0000, -0.3000, 1.35000 },
178 { -3.0000, 0.0000, 1.35000 }, { -2.5000, 0.0000, 1.12500 },
179 { -2.5000, -0.3000, 1.12500 }, { -2.6500, -0.3000, 0.93750 },
180 { -2.6500, 0.0000, 0.93750 }, { -2.0000, -0.3000, 0.90000 },
181 { -1.9000, -0.3000, 0.60000 }, { -1.9000, 0.0000, 0.60000 },
182 { 1.7000, 0.0000, 1.42500 }, { 1.7000, -0.6600, 1.42500 },
183 { 1.7000, -0.6600, 0.60000 }, { 1.7000, 0.0000, 0.60000 },
184 { 2.6000, 0.0000, 1.42500 }, { 2.6000, -0.6600, 1.42500 },
185 { 3.1000, -0.6600, 0.82500 }, { 3.1000, 0.0000, 0.82500 },
186 { 2.3000, 0.0000, 2.10000 }, { 2.3000, -0.2500, 2.10000 },
187 { 2.4000, -0.2500, 2.02500 }, { 2.4000, 0.0000, 2.02500 },
188 { 2.7000, 0.0000, 2.40000 }, { 2.7000, -0.2500, 2.40000 },
189 { 3.3000, -0.2500, 2.40000 }, { 3.3000, 0.0000, 2.40000 },
190 { 2.8000, 0.0000, 2.47500 }, { 2.8000, -0.2500, 2.47500 },
191 { 3.5250, -0.2500, 2.49375 }, { 3.5250, 0.0000, 2.49375 },
192 { 2.9000, 0.0000, 2.47500 }, { 2.9000, -0.1500, 2.47500 },
193 { 3.4500, -0.1500, 2.51250 }, { 3.4500, 0.0000, 2.51250 },
194 { 2.8000, 0.0000, 2.40000 }, { 2.8000, -0.1500, 2.40000 },
195 { 3.2000, -0.1500, 2.40000 }, { 3.2000, 0.0000, 2.40000 },
196 { 0.0000, 0.0000, 3.15000 }, { 0.8000, 0.0000, 3.15000 },
197 { 0.8000, -0.4500, 3.15000 }, { 0.4500, -0.8000, 3.15000 },
198 { 0.0000, -0.8000, 3.15000 }, { 0.0000, 0.0000, 2.85000 },
199 { 1.4000, 0.0000, 2.40000 }, { 1.4000, -0.7840, 2.40000 },
200 { 0.7840, -1.4000, 2.40000 }, { 0.0000, -1.4000, 2.40000 },
201 { 0.4000, 0.0000, 2.55000 }, { 0.4000, -0.2240, 2.55000 },
202 { 0.2240, -0.4000, 2.55000 }, { 0.0000, -0.4000, 2.55000 },
203 { 1.3000, 0.0000, 2.55000 }, { 1.3000, -0.7280, 2.55000 },
204 { 0.7280, -1.3000, 2.55000 }, { 0.0000, -1.3000, 2.55000 },
205 { 1.3000, 0.0000, 2.40000 }, { 1.3000, -0.7280, 2.40000 },
206 { 0.7280, -1.3000, 2.40000 }, { 0.0000, -1.3000, 2.40000 },
207 { 0.0000, 0.0000, 0.00000 }, { 1.4250, -0.7980, 0.00000 },
208 { 1.5000, 0.0000, 0.07500 }, { 1.4250, 0.0000, 0.00000 },
209 { 0.7980, -1.4250, 0.00000 }, { 0.0000, -1.5000, 0.07500 },
210 { 0.0000, -1.4250, 0.00000 }, { 1.5000, -0.8400, 0.07500 },
211 { 0.8400, -1.5000, 0.07500 }
212 };
214 #endif /* TEAPOT_DATA_H_ */