-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomModels.cpp
132 lines (127 loc) · 7.85 KB
/
customModels.cpp
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#include "camera.hpp"
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>
// 3488
FoxModel readTris() {
FoxModel ret;
int tris = 540;
ret.tris = (FoxTri **)malloc(sizeof(FoxTri *) * tris / 3);
ret.hue = 180;
float vertices[540] = {
0.66373920, 1.25902736, 0.46255448, -0.55946362, 1.00918961,
0.00147780, -0.50448257, 0.91504419, 0.00034139, -0.33763471,
0.76836061, -0.19985594, 0.13778849, 0.78690124, -0.30485114,
0.05468445, 0.74998105, 0.11592600, -0.64395285, 0.70797300,
-0.50245088, -0.46767867, 1.03053391, -0.14834177, -0.79353225,
1.00991786, -0.23885426, -0.33763471, 0.76836061, -0.19985594,
-0.39835796, 0.70398331, 0.11456297, -0.50448257, 0.91504419,
0.00034139, 0.40172166, 0.03133270, -0.26400837, 0.10440682,
0.35362276, -0.52264571, -0.17652416, 0.02808020, -0.41564915,
-0.39293492, -0.06144992, 0.21328202, -0.18494086, 0.08056667,
0.28929818, 0.15307054, -0.02519232, 0.15596922, 0.19330138,
-0.05399659, -0.07072310, 0.15307054, -0.02519232, 0.15596922,
0.43775856, 0.18170503, 0.04786393, -0.30819741, 0.46717474,
-0.41338876, -0.33763471, 0.76836061, -0.19985594, -0.81327015,
0.59839749, -0.25017288, -0.81327015, 0.59839749, -0.25017288,
-0.33763471, 0.76836061, -0.19985594, -0.64395285, 0.70797300,
-0.50245088, -0.17652416, 0.02808020, -0.41564915, -0.30819741,
0.46717474, -0.41338876, -0.31625396, -0.02020350, -0.35252959,
0.13778849, 0.78690124, -0.30485114, -0.33763471, 0.76836061,
-0.19985594, -0.30819741, 0.46717474, -0.41338876, -0.17652416,
0.02808020, -0.41564915, 0.10440682, 0.35362276, -0.52264571,
-0.30819741, 0.46717474, -0.41338876, 0.10440682, 0.35362276,
-0.52264571, 0.13778849, 0.78690124, -0.30485114, -0.30819741,
0.46717474, -0.41338876, -0.81327015, 0.59839749, -0.25017288,
-0.79353225, 1.00991786, -0.23885426, -0.70778400, 0.91734815,
0.04705160, -0.33763471, 0.76836061, -0.19985594, -0.46767867,
1.03053391, -0.14834177, -0.64395285, 0.70797300, -0.50245088,
0.41073096, 0.27846822, -0.26367244, 0.13778849, 0.78690124,
-0.30485114, 0.10440682, 0.35362276, -0.52264571, -0.50448257,
0.91504419, 0.00034139, -0.09193511, 1.18826044, 0.23858500,
-0.46767867, 1.03053391, -0.14834177, -0.50448257, 0.91504419,
0.00034139, -0.46767867, 1.03053391, -0.14834177, -0.33763471,
0.76836061, -0.19985594, 0.40172166, 0.03133270, -0.26400837,
0.41073096, 0.27846822, -0.26367244, 0.10440682, 0.35362276,
-0.52264571, -0.31625396, -0.02020350, -0.35252959, -0.55365747,
0.17663094, -0.28208396, -0.44821092, 0.13061127, -0.16786247,
0.15307054, -0.02519232, 0.15596922, 0.36043027, 0.58108306,
0.09575948, 0.43775856, 0.18170503, 0.04786393, -0.45474294,
0.14387491, 0.03965824, -0.65581244, -0.03624269, -0.10545369,
-0.44821092, 0.13061127, -0.16786247, 0.05468445, 0.74998105,
0.11592600, 0.13778849, 0.78690124, -0.30485114, 0.36043027,
0.58108306, 0.09575948, 0.36043027, 0.58108306, 0.09575948,
0.13778849, 0.78690124, -0.30485114, 0.41073096, 0.27846822,
-0.26367244, 0.43775856, 0.18170503, 0.04786393, 0.36043027,
0.58108306, 0.09575948, 0.41073096, 0.27846822, -0.26367244,
0.40172166, 0.03133270, -0.26400837, 0.43775856, 0.18170503,
0.04786393, 0.41073096, 0.27846822, -0.26367244, -0.55365747,
0.17663094, -0.28208396, -0.81327015, 0.59839749, -0.25017288,
-0.69174647, 0.37847582, 0.15699150, -0.70778400, 0.91734815,
0.04705160, -0.79353225, 1.00991786, -0.23885426, -0.55946362,
1.00918961, 0.00147780, -0.55946362, 1.00918961, 0.00147780,
-0.79353225, 1.00991786, -0.23885426, -0.46767867, 1.03053391,
-0.14834177, -0.55946362, 1.00918961, 0.00147780, -0.09193511,
1.18826044, 0.23858500, -0.50448257, 0.91504419, 0.00034139,
-0.50448257, 0.91504419, 0.00034139, -0.57033938, 1.08459342,
0.54296231, -0.66373920, 1.25902736, 0.46255448, -0.55365747,
0.17663094, -0.28208396, -0.31625396, -0.02020350, -0.35252959,
-0.30819741, 0.46717474, -0.41338876, -0.81327015, 0.59839749,
-0.25017288, -0.55365747, 0.17663094, -0.28208396, -0.30819741,
0.46717474, -0.41338876, -0.70778400, 0.91734815, 0.04705160,
-0.55946362, 1.00918961, 0.00147780, -0.66373920, 1.25902736,
0.46255448, -0.81327015, 0.59839749, -0.25017288, -0.64395285,
0.70797300, -0.50245088, -0.79353225, 1.00991786, -0.23885426,
-0.31990117, 0.44520631, 0.21579023, -0.10188436, 0.44608006,
0.36163712, -0.18494086, 0.08056667, 0.28929818, -0.45474294,
0.14387491, 0.03965824, -0.39293492, -0.06144992, 0.21328202,
-0.65581244, -0.03624269, -0.10545369, -0.39835796, 0.70398331,
0.11456297, -0.33763471, 0.76836061, -0.19985594, 0.05468445,
0.74998105, 0.11592600, -0.57033938, 1.08459342, 0.54296231,
-0.70778400, 0.91734815, 0.04705160, -0.66373920, 1.25902736,
0.46255448, -0.65581244, -0.03624269, -0.10545369, -0.31625396,
-0.02020350, -0.35252959, -0.44821092, 0.13061127, -0.16786247,
-0.18494086, 0.08056667, 0.28929818, -0.45474294, 0.14387491,
0.03965824, -0.31990117, 0.44520631, 0.21579023, -0.45474294,
0.14387491, 0.03965824, -0.18494086, 0.08056667, 0.28929818,
-0.39293492, -0.06144992, 0.21328202, -0.55946362, 1.00918961,
0.00147780, -0.46767867, 1.03053391, -0.14834177, -0.09193511,
1.18826044, 0.23858500, -0.81327015, 0.59839749, -0.25017288,
-0.70778400, 0.91734815, 0.04705160, -0.69174647, 0.37847582,
0.15699150, -0.31990117, 0.44520631, 0.21579023, 0.36043027,
0.58108306, 0.09575948, -0.10188436, 0.44608006, 0.36163712,
-0.69174647, 0.37847582, 0.15699150, -0.70778400, 0.91734815,
0.04705160, -0.39835796, 0.70398331, 0.11456297, -0.45474294,
0.14387491, 0.03965824, -0.69174647, 0.37847582, 0.15699150,
-0.31990117, 0.44520631, 0.21579023, 0.15307054, -0.02519232,
0.15596922, -0.10188436, 0.44608006, 0.36163712, 0.36043027,
0.58108306, 0.09575948, 0.15307054, -0.02519232, 0.15596922,
-0.18494086, 0.08056667, 0.28929818, -0.10188436, 0.44608006,
0.36163712, 0.36043027, 0.58108306, 0.09575948, -0.31990117,
0.44520631, 0.21579023, 0.05468445, 0.74998105, 0.11592600,
-0.31990117, 0.44520631, 0.21579023, -0.69174647, 0.37847582,
0.15699150, -0.39835796, 0.70398331, 0.11456297, -0.39835796,
0.70398331, 0.11456297, -0.70778400, 0.91734815, 0.04705160,
-0.50448257, 0.91504419, 0.00034139, -0.50448257, 0.91504419,
0.00034139, -0.70778400, 0.91734815, 0.04705160, -0.57033938,
1.08459342, 0.54296231, 0.00715198, -0.03561589, -0.33452776,
0.40172166, 0.03133270, -0.26400837, -0.17652416, 0.02808020,
-0.41564915, 0.43775856, 0.18170503, 0.04786393, 0.40172166,
0.03133270, -0.26400837, 0.19330138, -0.05399659, -0.07072310,
-0.69174647, 0.37847582, 0.15699150, -0.45474294, 0.14387491,
0.03965824, -0.55365747, 0.17663094, -0.28208396, -0.39835796,
0.70398331, 0.11456297, 0.05468445, 0.74998105, 0.11592600,
-0.31990117, 0.44520631, 0.21579023, -0.47589797, -0.07766744,
-0.20239729, -0.65581244, -0.03624269, -0.10545369, -0.39293492,
-0.06144992, 0.21328202, -0.47589797, -0.07766744, -0.20239729,
-0.31625396, -0.02020350, -0.35252959, -0.65581244, -0.03624269,
-0.10545369, -0.55365747, 0.17663094, -0.28208396, -0.45474294,
0.14387491, 0.03965824, -0.44821092, 0.13061127, -0.16786247,
};
const int scale = 5;
ret.tris = vertToTri(vertices, tris, {0, 0, 0}, {scale, scale, scale});
ret.size = tris / 9;
return ret;
}