-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtritex.c
84 lines (74 loc) · 1.07 KB
/
tritex.c
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
#include "tritex.h"
SVECTOR modelTri_mesh[] = {
{ 0,20,0 },
{ 20,-20,20 },
{ 20,-20,-20 },
{ -20,-20,-20 },
{ -20,-20,20 }
};
SVECTOR modelTri_normal[] = {
0,-4096,0, 0,
-2714,1430,-2714, 0,
-2714,1430,2714, 0,
2714,1430,2714, 0,
2714,1430,-2714, 0
};
SVECTOR modelTri_uv[] = {
125,84, 0, 0,
84,125, 0, 0,
125,125, 0, 0,
42,84, 0, 0,
1,42, 0, 0,
1,84, 0, 0,
125,84, 0, 0,
84,84, 0, 0,
84,125, 0, 0,
1,84, 0, 0,
1,125, 0, 0,
42,125, 0, 0,
42,125, 0, 0,
84,125, 0, 0,
84,84, 0, 0,
42,1, 0, 0,
1,1, 0, 0,
1,42, 0, 0
};
CVECTOR modelTri_color[] = {
255,255,255, 0,
255,5,7, 0,
255,255,255, 0,
255,255,255, 0,
255,255,255, 0,
254,255,94, 0,
255,255,255, 0,
255,255,255, 0,
255,5,7, 0,
255,255,255, 0,
255,5,7, 0,
255,255,255, 0,
255,5,7, 0,
255,255,255, 0,
255,255,255, 0,
254,255,23, 0,
255,255,255, 0,
122,255,107, 0
};
int modelTri_index[18] = {
4,2,1,
0,4,1,
4,3,2,
1,2,0,
2,3,0,
0,3,4
};
TMESH modelTri = {
modelTri_mesh,
modelTri_normal,
modelTri_uv,
modelTri_color,
6
};
MESH Tri = {
&modelTri,
modelTri_index
};