git.haldean.org subd / eee87b8
Animation, auto center and scale Will Brown 9 years ago
9 changed file(s) with 1001 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
0 ####
1 #
2 # OBJ File Generated by Meshlab
3 #
4 ####
5 # Object fox.obj
6 #
7 # Vertices: 313
8 # Faces: 622
9 #
10 ####
11 v -0.813615 0.119585 -2.393162
12 v -0.003017 3.521000 1.148129
13 v 0.371791 3.867793 1.109706
14 v -0.536210 0.094270 -2.344473
15 v 0.533655 4.236358 -4.781759
16 v 0.496440 4.704445 -4.431360
17 v 0.722718 4.481744 -4.482769
18 v 0.331751 3.275077 1.159106
19 v 0.808726 0.984735 -2.350615
20 v -1.042736 6.538678 -4.228906
21 v 0.826532 2.396737 3.113233
22 v -0.001582 2.721360 3.452236
23 v -0.622159 1.612727 1.141892
24 v -0.008757 4.837242 -4.518513
25 v -0.714167 1.561910 1.322748
26 v -0.801298 1.936388 4.007381
27 v -0.895389 0.990631 -2.163479
28 v 0.579551 4.037322 -4.652762
29 v 1.480820 4.405644 -3.506471
30 v 0.880714 4.786751 -3.685916
31 v -0.416777 0.041520 -2.916740
32 v 0.388859 3.218385 -3.048720
33 v -0.829698 2.396737 3.113233
34 v 0.706828 0.497977 -2.634869
35 v 0.830582 0.514459 -2.628110
36 v 0.861145 0.881373 -2.001630
37 v -0.429134 0.351790 -2.872713
38 v -0.985503 1.789325 1.203996
39 v 0.684964 0.981544 -2.352091
40 v -0.912055 0.023615 -3.162083
41 v 1.000568 2.410606 -1.777425
42 v -0.969726 2.345284 -1.895453
43 v 1.185654 0.004640 0.764639
44 v -1.052472 0.317864 -2.766576
45 v 0.476589 3.788390 -4.697967
46 v 1.136363 3.430144 0.034650
47 v -0.905602 4.229256 -0.823609
48 v 1.080473 0.033728 0.383651
49 v 0.519553 2.751413 1.738461
50 v 0.602801 2.272538 -1.426246
51 v 0.608948 1.037938 -2.175550
52 v -0.537061 0.252533 -2.307435
53 v -0.326119 2.849895 0.596225
54 v -0.334918 3.278108 1.160862
55 v -0.001583 4.545173 0.653114
56 v 0.899251 0.120170 -2.286811
57 v 0.884692 4.178397 -0.053882
58 v 1.072847 0.043033 -2.919350
59 v 0.958956 0.027245 -3.108292
60 v -0.558886 2.330053 -1.975848
61 v 0.193403 3.201199 -5.121481
62 v -0.001581 1.956651 4.966587
63 v 0.591449 5.110154 -3.354985
64 v 1.471429 7.033616 -4.093298
65 v -0.867921 3.188331 1.139530
66 v -0.824033 2.312396 -2.072883
67 v -0.000553 4.969871 -2.897068
68 v 0.950053 0.451236 -2.460858
69 v -0.001582 4.731621 -0.909844
70 v -0.666315 0.498262 -2.636048
71 v 1.054410 3.827431 -4.122272
72 v 1.882748 7.050644 -3.960997
73 v 2.112640 6.535297 -3.810212
74 v -0.712844 0.494689 0.881519
75 v -0.470709 3.251866 -4.491636
76 v 1.171631 4.038848 -3.590266
77 v -1.102561 3.326552 0.778025
78 v -0.526106 2.597251 -1.337416
79 v -0.001584 3.350677 1.039964
80 v 0.864754 3.185062 1.137500
81 v 0.515671 2.549511 1.079188
82 v 0.470976 0.327541 -2.817315
83 v -0.833366 2.602205 -1.346619
84 v 0.046304 3.440601 -5.306144
85 v -0.575159 0.953349 -2.225466
86 v -0.598701 0.296176 0.444768
87 v -0.967661 0.285555 0.463264
88 v -0.984831 0.040429 0.370473
89 v 0.781421 1.199102 3.373574
90 v 0.467731 3.218818 -4.516719
91 v -0.592361 2.554559 1.088143
92 v -0.001582 0.954161 4.298504
93 v 0.474550 0.019455 -2.852390
94 v -0.905583 0.335029 -3.033125
95 v -0.580646 1.026231 -2.173616
96 v -0.568586 0.880644 -1.979917
97 v -0.130092 3.457174 -5.241075
98 v 0.963693 0.489062 0.907780
99 v -0.384163 3.298619 -4.657508
100 v 0.639571 4.584267 -0.026311
101 v -0.307046 4.288956 0.984779
102 v 1.983910 5.096987 -3.510122
103 v 0.645007 4.622683 -0.892673
104 v -0.001585 2.595115 -0.210081
105 v 0.878802 2.325884 -2.060457
106 v 0.394170 4.459678 -2.315037
107 v 0.694088 4.132630 -2.339982
108 v -0.479350 2.731460 -0.206491
109 v -2.051732 6.725865 -3.886899
110 v -0.616925 5.124673 -3.341033
111 v 0.615674 2.341761 -1.974406
112 v 0.300979 2.487555 -2.365925
113 v -1.139529 3.429106 0.036170
114 v 0.322952 2.848784 0.592793
115 v 0.476184 2.733165 -0.210562
116 v -0.397337 4.442061 -2.289797
117 v 1.047355 0.072314 1.052435
118 v -1.011840 3.339144 -3.929531
119 v -0.467186 4.689749 -4.428998
120 v -0.933829 1.604776 1.165941
121 v 0.612381 0.463525 -2.508539
122 v -0.236442 3.216495 -5.002644
123 v -0.000552 5.157241 -3.275416
124 v -0.001585 3.095666 -3.156669
125 v -0.856921 4.231381 -4.530943
126 v -1.007440 2.830464 -1.977460
127 v 0.806152 0.302759 1.168214
128 v -0.670586 4.486274 0.509023
129 v 0.922158 4.529625 -3.174308
130 v 0.798131 1.936389 4.007381
131 v 0.689516 1.103722 -2.270698
132 v -1.086109 0.311276 0.818904
133 v -0.544696 2.271515 -1.432594
134 v -0.633845 0.397040 -3.141157
135 v -0.001583 2.604408 1.577312
136 v 0.884272 2.296409 -1.466946
137 v -0.660302 0.971334 -2.349038
138 v 1.061881 0.272839 0.473590
139 v -0.481813 0.010254 0.613936
140 v 0.953501 3.675061 -2.314460
141 v -0.964710 3.618528 -2.309750
142 v -0.785410 1.092273 -2.265923
143 v -0.670837 2.303886 -2.080889
144 v 0.643003 0.002303 -3.189452
145 v 0.664811 0.378213 -3.089494
146 v 0.910437 2.376622 0.739061
147 v -0.001583 4.587832 -2.258892
148 v -0.593678 0.021704 -3.253360
149 v -0.704276 4.540209 -0.024267
150 v -0.001584 1.348592 5.310601
151 v -1.023490 0.027009 -2.967583
152 v 0.857065 1.790968 1.373658
153 v -0.505569 3.538607 -4.686213
154 v 0.575214 1.154862 4.435117
155 v 0.902435 4.287670 -0.826318
156 v -0.826837 2.254649 -1.463652
157 v -1.701103 6.851671 -3.992833
158 v 0.526457 3.201336 2.239062
159 v 0.304421 3.625319 1.226248
160 v -0.933313 4.221238 -3.106186
161 v -0.936045 4.517646 -3.155495
162 v -0.000552 4.597798 -4.667187
163 v -0.000552 5.148819 -3.755029
164 v -0.199901 4.860523 -4.453566
165 v -0.542545 4.750877 -3.029727
166 v 0.582259 1.692210 4.801161
167 v 1.007967 6.477582 -4.322357
168 v 0.938545 0.337524 -2.988801
169 v 0.506923 3.608171 -4.701595
170 v -0.529624 3.201336 2.239062
171 v -0.047797 3.204465 -5.166445
172 v 0.143616 3.461785 -5.236655
173 v -0.374958 3.870227 1.156257
174 v -0.001583 3.741953 1.122911
175 v -0.569296 0.029812 0.382624
176 v -0.522720 2.751414 1.738461
177 v -0.000371 3.236282 -5.228745
178 v 0.710643 1.769817 1.346132
179 v 0.799014 3.054505 -1.347090
180 v 0.945007 2.923900 -1.459311
181 v 0.865573 2.564384 1.071255
182 v 0.675310 0.019369 0.394714
183 v 0.984083 2.809829 -0.250351
184 v 0.566493 1.746754 1.194837
185 v 0.602398 2.417799 0.762211
186 v -0.040317 3.433756 -5.310601
187 v 0.992910 4.360182 -4.085582
188 v -1.898584 4.959286 -3.565157
189 v 0.725109 2.314377 -2.081901
190 v -0.392026 3.218385 -3.048719
191 v 0.855816 4.231381 -4.530943
192 v 0.856560 2.668336 -2.410817
193 v 0.549185 2.555067 -2.425522
194 v 0.811827 1.103062 -2.272548
195 v -0.913604 2.379302 0.749231
196 v 0.982337 1.783612 1.189546
197 v -0.829365 0.868377 -1.995874
198 v -0.887859 4.177807 -0.054552
199 v -0.190859 3.873477 -4.794785
200 v -0.568448 0.464162 -2.512937
201 v -0.791780 3.056558 -1.346425
202 v -0.731418 3.043478 -0.731376
203 v -0.987249 2.797513 -0.228849
204 v -0.872210 2.677925 -2.406764
205 v 1.010736 3.339144 -3.929531
206 v 0.667419 4.486273 0.509023
207 v -0.452365 2.759014 -1.365483
208 v -0.895146 0.931668 -2.209965
209 v -0.569659 1.752492 1.209480
210 v 0.235699 3.216496 -5.002644
211 v 0.047055 3.204465 -5.166445
212 v 1.041456 0.368963 1.071924
213 v -0.784005 0.974585 -2.345012
214 v -0.285957 3.625320 1.226248
215 v 0.911386 3.638843 -1.746833
216 v 0.602354 0.964640 -2.226671
217 v 0.377403 4.301107 0.984215
218 v -0.498181 3.789171 -4.699909
219 v -0.987326 4.047096 0.367280
220 v -0.723822 4.506540 -4.481168
221 v 0.899591 1.734395 0.992083
222 v 0.923810 1.002190 -2.171537
223 v 0.922579 0.942849 -2.217520
224 v -0.902757 1.739855 1.007049
225 v -0.929761 0.307096 1.122770
226 v -0.935149 2.931092 -1.456604
227 v -0.981439 3.478558 -1.741698
228 v -0.864034 0.497224 0.912883
229 v -1.092286 0.008575 0.760834
230 v 0.202819 3.873477 -4.794785
231 v -1.613258 4.395047 -3.625107
232 v -1.066952 4.381784 -3.987048
233 v -0.790221 0.510531 -2.625825
234 v 1.177330 0.299925 0.820614
235 v 0.600754 0.893966 -1.980461
236 v -0.702386 2.328525 0.591206
237 v 0.007362 3.111683 -4.993658
238 v 0.846932 4.003287 0.944468
239 v 0.778340 3.786520 -2.969431
240 v -0.892718 3.573158 -0.726882
241 v 0.984160 4.046629 0.367934
242 v 1.099394 3.324928 0.776347
243 v 0.464350 3.704330 -4.707833
244 v -0.000552 3.126177 -3.575299
245 v 0.714135 1.720482 0.895140
246 v 1.008298 2.818195 -1.982361
247 v -0.000552 4.407888 -4.762261
248 v -0.537647 4.236358 -4.781759
249 v -0.469523 3.697350 -4.716148
250 v 0.601698 0.094610 -2.291714
251 v -0.853328 4.010998 -4.460754
252 v -0.577374 4.037720 -4.651291
253 v -0.697255 4.132630 -2.339982
254 v -0.766663 3.505097 -3.228407
255 v 0.967772 0.280974 -2.274172
256 v 1.090052 0.337261 -2.729137
257 v -0.605565 2.420638 0.772093
258 v 0.889551 3.575452 -0.727700
259 v 0.728252 3.045556 -0.733257
260 v 0.816044 0.059021 1.090489
261 v -1.055514 3.827430 -4.122272
262 v -0.294048 3.926185 1.455084
263 v -0.643034 4.578625 -0.890630
264 v 0.837469 2.605350 -1.321979
265 v -0.717302 1.726071 0.910075
266 v -0.194145 3.201199 -5.121481
267 v -0.001585 2.367083 4.360631
268 v -0.001582 4.713916 0.059220
269 v 0.452592 2.761269 -1.364509
270 v 0.312512 3.926185 1.455085
271 v 0.813134 1.687046 2.329194
272 v -0.001586 0.908056 3.111298
273 v -0.539079 0.219037 1.017004
274 v -0.618225 0.436183 0.978878
275 v 0.765559 3.505098 -3.228408
276 v -0.011131 2.393500 -2.332480
277 v 0.367995 3.277708 -4.683198
278 v -0.705713 0.310058 1.172419
279 v -0.000552 3.516345 -4.499312
280 v 0.027369 3.955942 -4.843202
281 v -0.875836 0.250678 -2.313161
282 v -0.904091 0.439726 -2.457365
283 v -0.663087 1.092847 -2.266562
284 v -0.568034 2.550422 -2.427203
285 v -0.321940 2.472399 -2.371849
286 v 1.030203 0.300599 1.118802
287 v 0.851801 4.010998 -4.460754
288 v -0.875833 4.792972 -3.686735
289 v -0.860230 1.797660 1.388073
290 v -0.852266 1.577434 1.340753
291 v 0.849100 1.573861 1.326786
292 v 0.930663 1.599804 1.151770
293 v 0.541441 4.755309 -2.973558
294 v 0.932209 4.221238 -3.106186
295 v -0.713808 1.776361 1.360658
296 v 0.701967 0.279572 0.454811
297 v -0.697350 0.054076 1.121970
298 v -0.780526 3.787082 -2.969222
299 v 0.245808 4.845937 -4.456510
300 v 0.525572 2.600043 -1.326826
301 v -0.585426 1.692210 4.801160
302 v -0.578381 1.154862 4.435117
303 v 0.618993 1.607559 1.127658
304 v 0.639849 0.209920 1.013150
305 v 0.714914 0.427216 0.973877
306 v 0.590227 0.000000 0.620179
307 v -0.850099 3.944908 0.966769
308 v -0.007439 3.565873 -5.228632
309 v 0.699219 2.326950 0.580686
310 v 0.543958 0.268810 -2.278343
311 v -0.001585 3.368752 2.411240
312 v -0.003017 4.075348 1.555351
313 v 0.812507 0.485574 0.876282
314 v -1.172735 4.038848 -3.590266
315 v -0.868740 2.569378 1.080106
316 v -2.112640 6.156534 -3.771491
317 v -0.962347 0.375595 1.076246
318 v -0.945443 0.078622 1.055435
319 v 0.711002 1.558193 1.308908
320 v -0.001582 1.480188 2.093156
321 v -0.816301 1.687046 2.329192
322 v -0.784589 1.199102 3.373575
323 v -0.000552 3.120561 -4.101528
324 # 313 vertices, 0 vertices normals
325
326 f 138 4 1
327 f 217 37 243
328 f 271 187 198
329 f 111 206 29
330 f 204 163 2
331 f 124 27 21
332 f 293 174 235
333 f 292 140 291
334 f 8 3 69
335 f 21 42 4
336 f 56 274 133
337 f 270 237 5
338 f 152 6 7
339 f 20 63 92
340 f 187 146 17
341 f 159 267 51
342 f 71 8 104
343 f 25 9 58
344 f 29 41 121
345 f 56 194 274
346 f 10 100 154
347 f 257 11 12
348 f 158 246 48
349 f 257 12 23
350 f 197 94 98
351 f 264 13 263
352 f 14 289 152
353 f 54 62 20
354 f 15 285 280
355 f 15 280 268
356 f 291 52 16
357 f 17 146 32
358 f 311 166 310
359 f 115 238 241
360 f 108 244 304
361 f 264 76 64
362 f 6 20 177
363 f 18 5 277
364 f 20 19 177
365 f 138 21 4
366 f 165 129 78
367 f 22 229 182
368 f 272 203 223
369 f 307 218 122
370 f 265 229 22
371 f 91 45 118
372 f 237 7 5
373 f 23 12 160
374 f 24 29 25
375 f 214 28 185
376 f 203 198 132
377 f 68 191 73
378 f 47 36 248
379 f 67 55 297
380 f 12 11 148
381 f 81 44 55
382 f 42 187 271
383 f 162 220 233
384 f 124 21 138
385 f 46 245 300
386 f 190 27 124
387 f 2 3 149
388 f 26 126 225
389 f 27 42 21
390 f 184 213 9
391 f 50 123 85
392 f 110 28 214
393 f 206 41 29
394 f 84 124 30
395 f 250 117 294
396 f 47 196 231
397 f 95 31 212
398 f 6 177 7
399 f 116 217 131
400 f 193 185 103
401 f 32 216 116
402 f 33 202 107
403 f 218 307 214
404 f 164 3 2
405 f 192 230 191
406 f 256 167 269
407 f 99 147 278
408 f 7 177 181
409 f 12 148 301
410 f 256 89 143
411 f 117 309 294
412 f 34 272 84
413 f 233 220 35
414 f 47 231 36
415 f 98 94 43
416 f 37 188 253
417 f 288 243 150
418 f 100 113 153
419 f 153 289 14
420 f 119 62 53
421 f 38 224 33
422 f 16 257 23
423 f 125 149 39
424 f 41 40 101
425 f 42 86 187
426 f 43 69 44
427 f 273 85 127
428 f 48 245 46
429 f 302 207 45
430 f 4 42 1
431 f 284 229 265
432 f 11 120 261
433 f 212 126 26
434 f 134 49 46
435 f 145 47 248
436 f 249 105 169
437 f 266 259 197
438 f 49 48 46
439 f 86 146 187
440 f 112 227 65
441 f 13 15 263
442 f 50 68 123
443 f 162 159 51
444 f 16 52 257
445 f 217 230 37
446 f 89 269 65
447 f 66 265 195
448 f 53 62 54
449 f 157 53 54
450 f 163 297 55
451 f 19 92 119
452 f 69 3 164
453 f 17 56 132
454 f 137 57 106
455 f 312 16 311
456 f 20 92 19
457 f 262 261 79
458 f 110 280 28
459 f 167 51 269
460 f 307 110 214
461 f 58 213 245
462 f 253 258 59
463 f 60 124 223
464 f 61 195 159
465 f 63 62 119
466 f 94 104 43
467 f 64 76 77
468 f 200 80 227
469 f 65 227 313
470 f 177 19 66
471 f 67 297 209
472 f 100 147 99
473 f 207 260 3
474 f 3 260 149
475 f 68 73 123
476 f 30 1 141
477 f 164 163 69
478 f 171 70 71
479 f 78 219 77
480 f 72 300 111
481 f 104 69 43
482 f 183 95 179
483 f 191 197 98
484 f 125 204 2
485 f 310 166 125
486 f 45 196 90
487 f 312 82 292
488 f 197 191 68
489 f 32 73 216
490 f 176 298 74
491 f 85 86 75
492 f 214 226 255
493 f 77 76 78
494 f 120 156 79
495 f 159 80 267
496 f 310 39 261
497 f 285 81 279
498 f 82 79 144
499 f 45 90 258
500 f 153 53 289
501 f 105 175 104
502 f 83 134 240
503 f 253 59 137
504 f 17 32 56
505 f 272 223 84
506 f 277 61 159
507 f 225 126 40
508 f 85 123 86
509 f 81 305 279
510 f 263 15 268
511 f 239 241 208
512 f 167 87 176
513 f 213 26 245
514 f 76 263 129
515 f 56 116 194
516 f 202 224 88
517 f 78 76 165
518 f 2 149 125
519 f 178 306 278
520 f 89 65 143
521 f 109 278 10
522 f 208 189 239
523 f 29 9 25
524 f 166 160 204
525 f 97 205 130
526 f 93 90 47
527 f 207 228 196
528 f 221 278 222
529 f 253 137 106
530 f 93 47 145
531 f 295 293 235
532 f 297 91 118
533 f 192 98 193
534 f 92 63 119
535 f 93 145 97
536 f 94 105 104
537 f 276 281 117
538 f 184 95 212
539 f 100 153 154
540 f 96 93 97
541 f 43 247 98
542 f 151 99 306
543 f 130 205 236
544 f 304 150 151
545 f 303 128 286
546 f 100 99 151
547 f 70 3 8
548 f 102 101 259
549 f 197 259 94
550 f 103 209 188
551 f 175 71 104
552 f 299 175 105
553 f 260 207 302
554 f 106 57 155
555 f 80 195 313
556 f 46 300 240
557 f 250 33 107
558 f 108 304 251
559 f 210 152 237
560 f 222 109 210
561 f 142 171 71
562 f 49 135 158
563 f 307 280 110
564 f 198 17 132
565 f 300 225 111
566 f 53 283 119
567 f 65 269 112
568 f 113 53 153
569 f 275 114 266
570 f 115 210 238
571 f 214 185 226
572 f 244 150 304
573 f 141 271 34
574 f 30 124 138
575 f 268 280 215
576 f 194 116 131
577 f 123 73 146
578 f 224 202 33
579 f 276 117 250
580 f 132 273 127
581 f 288 131 243
582 f 118 45 139
583 f 19 119 66
584 f 255 13 264
585 f 156 120 52
586 f 29 121 184
587 f 191 230 217
588 f 219 307 122
589 f 1 271 141
590 f 86 123 146
591 f 281 168 309
592 f 223 124 84
593 f 241 251 115
594 f 125 39 310
595 f 120 11 257
596 f 126 254 40
597 f 40 254 290
598 f 223 203 127
599 f 38 286 128
600 f 78 129 219
601 f 130 236 182
602 f 57 113 100
603 f 131 217 243
604 f 103 67 209
605 f 132 56 133
606 f 134 83 135
607 f 36 232 136
608 f 137 96 57
609 f 30 138 1
610 f 141 34 84
611 f 45 258 139
612 f 156 52 140
613 f 260 148 149
614 f 30 141 84
615 f 232 70 171
616 f 281 142 168
617 f 197 68 50
618 f 122 218 77
619 f 87 143 239
620 f 192 193 230
621 f 196 228 231
622 f 82 144 140
623 f 97 145 205
624 f 252 302 91
625 f 189 270 87
626 f 133 50 273
627 f 146 73 32
628 f 245 26 300
629 f 20 62 63
630 f 277 5 181
631 f 10 147 100
632 f 149 148 39
633 f 102 259 266
634 f 234 195 265
635 f 311 16 23
636 f 58 245 246
637 f 194 288 180
638 f 193 98 226
639 f 215 280 307
640 f 150 155 151
641 f 210 109 152
642 f 41 101 121
643 f 111 29 24
644 f 205 169 170
645 f 154 153 14
646 f 155 100 151
647 f 180 288 244
648 f 90 93 258
649 f 237 152 7
650 f 186 142 281
651 f 156 140 144
652 f 222 278 109
653 f 188 118 139
654 f 54 20 157
655 f 150 243 155
656 f 287 268 215
657 f 139 258 253
658 f 218 64 77
659 f 183 22 182
660 f 158 48 49
661 f 284 97 229
662 f 233 277 159
663 f 303 235 88
664 f 160 12 301
665 f 259 105 94
666 f 88 224 128
667 f 161 227 112
668 f 298 270 162
669 f 2 163 164
670 f 60 190 124
671 f 96 283 57
672 f 76 129 165
673 f 166 23 160
674 f 74 298 162
675 f 311 23 166
676 f 167 162 51
677 f 204 252 163
678 f 142 71 168
679 f 170 169 254
680 f 232 171 136
681 f 172 38 296
682 f 36 136 173
683 f 263 287 129
684 f 74 162 167
685 f 104 8 69
686 f 148 11 39
687 f 235 174 175
688 f 176 74 167
689 f 212 26 213
690 f 177 66 61
691 f 287 215 308
692 f 151 306 178
693 f 183 179 102
694 f 109 154 152
695 f 275 180 114
696 f 73 191 216
697 f 140 52 291
698 f 160 301 302
699 f 81 55 305
700 f 83 72 135
701 f 302 45 91
702 f 31 254 126
703 f 98 247 226
704 f 117 281 309
705 f 233 159 162
706 f 43 44 81
707 f 5 7 181
708 f 183 182 95
709 f 29 184 9
710 f 101 290 259
711 f 28 279 185
712 f 283 53 57
713 f 97 130 229
714 f 186 281 282
715 f 111 135 72
716 f 309 168 174
717 f 235 211 88
718 f 198 187 17
719 f 151 178 221
720 f 230 188 37
721 f 57 100 155
722 f 189 238 270
723 f 172 296 286
724 f 181 177 61
725 f 127 75 190
726 f 191 98 192
727 f 193 226 185
728 f 296 294 286
729 f 134 135 49
730 f 108 313 234
731 f 239 189 87
732 f 194 180 274
733 f 31 126 212
734 f 194 131 288
735 f 313 195 234
736 f 216 191 217
737 f 251 222 115
738 f 57 53 113
739 f 90 196 47
740 f 26 225 300
741 f 275 197 50
742 f 272 198 203
743 f 289 157 6
744 f 254 169 290
745 f 81 199 247
746 f 294 309 293
747 f 201 200 227
748 f 202 281 276
749 f 256 143 87
750 f 203 132 127
751 f 204 160 252
752 f 205 170 236
753 f 179 95 184
754 f 39 11 261
755 f 111 225 206
756 f 207 196 45
757 f 241 242 208
758 f 209 118 188
759 f 253 106 243
760 f 70 8 71
761 f 219 122 77
762 f 115 222 210
763 f 127 85 75
764 f 211 202 88
765 f 184 212 213
766 f 218 214 255
767 f 308 215 307
768 f 116 216 217
769 f 296 250 294
770 f 231 232 36
771 f 218 255 64
772 f 219 129 287
773 f 220 18 35
774 f 81 285 199
775 f 56 32 116
776 f 60 127 190
777 f 188 139 253
778 f 304 221 222
779 f 152 154 14
780 f 223 127 60
781 f 119 284 66
782 f 289 53 157
783 f 205 248 169
784 f 66 284 265
785 f 87 298 176
786 f 43 81 247
787 f 128 224 38
788 f 166 204 125
789 f 121 179 184
790 f 211 282 202
791 f 206 225 41
792 f 247 255 226
793 f 227 80 313
794 f 238 210 237
795 f 228 207 3
796 f 229 130 182
797 f 230 103 188
798 f 231 228 232
799 f 157 20 6
800 f 143 108 251
801 f 35 277 233
802 f 199 15 13
803 f 102 22 183
804 f 244 234 180
805 f 295 235 303
806 f 236 31 95
807 f 238 237 270
808 f 143 241 239
809 f 133 275 50
810 f 240 300 83
811 f 119 283 284
812 f 241 238 242
813 f 248 36 173
814 f 274 275 133
815 f 228 70 232
816 f 209 297 118
817 f 243 106 155
818 f 108 234 244
819 f 246 245 48
820 f 247 199 255
821 f 169 248 249
822 f 107 276 250
823 f 251 304 222
824 f 59 93 137
825 f 111 24 135
826 f 255 264 64
827 f 259 169 105
828 f 161 201 227
829 f 175 174 71
830 f 283 96 97
831 f 160 302 252
832 f 243 37 253
833 f 170 254 31
834 f 163 252 91
835 f 132 133 273
836 f 255 199 13
837 f 121 101 179
838 f 256 87 167
839 f 52 120 257
840 f 137 93 96
841 f 258 93 59
842 f 88 128 303
843 f 290 169 259
844 f 159 195 80
845 f 302 148 260
846 f 310 261 262
847 f 114 102 266
848 f 134 46 240
849 f 1 42 271
850 f 211 186 282
851 f 25 158 135
852 f 225 40 41
853 f 264 263 76
854 f 9 213 58
855 f 58 246 158
856 f 220 5 18
857 f 136 142 186
858 f 292 291 312
859 f 234 265 22
860 f 190 86 42
861 f 278 147 10
862 f 275 266 197
863 f 262 82 312
864 f 267 80 269
865 f 269 200 201
866 f 51 267 269
867 f 269 80 200
868 f 171 142 136
869 f 285 279 280
870 f 190 42 27
871 f 263 268 287
872 f 35 18 277
873 f 269 201 161
874 f 25 58 158
875 f 162 270 220
876 f 270 5 220
877 f 34 271 272
878 f 271 198 272
879 f 193 103 230
880 f 299 235 175
881 f 174 168 71
882 f 273 50 85
883 f 75 86 190
884 f 234 22 114
885 f 24 25 135
886 f 274 180 275
887 f 112 269 161
888 f 202 276 107
889 f 256 269 89
890 f 109 10 154
891 f 181 61 277
892 f 236 170 31
893 f 221 178 278
894 f 136 186 211
895 f 61 66 195
896 f 299 173 136
897 f 280 279 28
898 f 282 281 202
899 f 283 97 284
900 f 199 285 15
901 f 172 286 38
902 f 219 287 308
903 f 244 288 150
904 f 180 234 114
905 f 185 279 305
906 f 102 179 101
907 f 152 289 6
908 f 40 290 101
909 f 242 238 189
910 f 143 251 241
911 f 312 291 16
912 f 208 242 189
913 f 182 236 95
914 f 65 108 143
915 f 292 82 140
916 f 294 293 295
917 f 296 33 250
918 f 163 91 297
919 f 261 120 79
920 f 87 270 298
921 f 262 79 82
922 f 79 156 144
923 f 235 299 211
924 f 114 22 102
925 f 249 173 105
926 f 83 300 72
927 f 301 148 302
928 f 295 303 286
929 f 38 33 296
930 f 304 151 221
931 f 305 55 67
932 f 306 99 278
933 f 105 173 299
934 f 286 294 295
935 f 308 307 219
936 f 293 309 174
937 f 70 228 3
938 f 44 163 55
939 f 311 310 262
940 f 145 248 205
941 f 311 262 312
942 f 69 163 44
943 f 185 67 103
944 f 248 173 249
945 f 299 136 211
946 f 185 305 67
947 f 65 313 108
948 # 622 faces, 0 coords texture
949
950 # End of File
00 BINARY=subd
1 CFLAGS=-c -Wall -g -I../include/ --std=c++0x -I/usr/include/GL -I/usr/include -O2
1 CFLAGS=-c -Wall -I../include/ --std=c++0x -I/usr/include/GL -I/usr/include -O2
22 SOURCES=$(wildcard *.cpp)
33 OBJECTS=$(SOURCES:.cpp=.o)
44 UNAME=$(shell uname)
55
66 ifeq ($(UNAME), Darwin)
77 CC=clang++
8 CFLAGS+=-arch x86_64
89 LDFLAGS=-lm -framework OpenGL -framework GLUT
910 else
1011 CC=g++
104104 for (auto fit = mesh.faces.begin(); fit != mesh.faces.end(); fit++) {
105105 drawEdges(*fit, opts);
106106 }
107
108 glutWireCube(1.);
107109 }
108110
109111 void drawMesh(mesh &mesh, drawopts opts) {
156158 opts.drawHull = false;
157159
158160 opts.useCelShader = false;
161 opts.animate = true;
159162
160163 opts.normalColor[0] = 1.;
161164 opts.normalColor[1] = .5;
1010 bool drawVerteces;
1111 bool drawHull;
1212 bool useCelShader;
13 bool animate;
1314 GLfloat edgeColor[4];
1415 GLfloat meshColor[4];
1516 GLfloat normalColor[4];
22 #else
33 #include <gl.h>
44 #include <glu.h>
5 #include <glut.h>
5 #include <GL/glut.h>
66 #endif
55 #include "mesh.h"
66 #include "objparse.h"
77 #include "drawmesh.h"
8 #include "subd.h"
89 #include "trackball.h"
9 #include "subd.h"
1010
1111 #define kRotationStep 10.0f
1212 #define kTranslationStep .3f
142142
143143 void setupRC()
144144 {
145 glClearColor(.2, .2, .2, 1.);
145 glClearColor(.7, .7, .7, 1.);
146146 glEnable(GL_DEPTH_TEST);
147147 glShadeModel(GL_SMOOTH);
148148
153153 initShaders();
154154
155155 // Place Camera
156 camRotX = 350.0f;
157 camRotY = 680.0f;
158 camPosX = 0.0f;
159 camPosY = 0.0f;
160 camPosZ = -10.5f;
156 camRotX = 0.;
157 camRotY = 0.;
158 camPosX = 0.;
159 camPosY = 0.;
160 camPosZ = -2.f;
161161
162162 isSmooth = true;
163163
196196 drawString(debug_info.str());
197197
198198 glFlush();
199
200 if (drawOptions.animate) {
201 camRotX += .2;
202 camRotY += .3;
203 glutPostRedisplay();
204 }
199205 }
200206
201207
226232 }
227233 } else if (key == 'c') {
228234 drawOptions.useCelShader = !drawOptions.useCelShader;
235 } else if (key == 'z') {
236 drawOptions.animate = !drawOptions.animate;
229237
230238 } else if (key == 'g') {
231239 drawOptions.drawEdges = !drawOptions.drawEdges;
209209 }
210210 }
211211 }
212
213 void mesh::scaleToUnitCube() {
214 float minx = INFINITY, miny = INFINITY, minz = INFINITY,
215 maxx = -INFINITY, maxy = -INFINITY, maxz = -INFINITY;
216
217 for (auto vit = verteces.begin(); vit != verteces.end(); vit++) {
218 Vector3f loc = (*vit)->loc;
219 if (loc[0] < minx) minx = loc[0];
220 if (loc[0] > maxx) maxx = loc[0];
221 if (loc[1] < miny) miny = loc[1];
222 if (loc[1] > maxy) maxy = loc[1];
223 if (loc[2] < minz) minz = loc[2];
224 if (loc[2] > maxz) maxz = loc[2];
225 }
226
227 Vector3f translate(
228 minx - (minx - maxx) / 2,
229 miny - (miny - maxy) / 2,
230 minz - (minz - maxz) / 2);
231 float scale = 1. / max(maxx - minx, max(maxy - miny, maxz - minz));
232
233 for (auto vit = verteces.begin(); vit != verteces.end(); vit++) {
234 (*vit)->loc -= translate;
235 (*vit)->loc *= scale;
236 }
237 }
7373 mesh(const mesh &other);
7474 void calculateNormals(normal_mode mode);
7575 void guessSubdMethod();
76 void scaleToUnitCube();
7677
7778 vector<vertex*> verteces;
7879 vector<edge*> edges;
135135 } else {
136136 mesh.guessSubdMethod();
137137 }
138 mesh.scaleToUnitCube();
138139
139140 cout << "Loaded mesh: " << endl
140141 << " " << verteces.size() << " verteces." << endl