13{
14 float ax =
A.GetX(), ay =
A.GetY(), az =
A.GetZ();
15 float bx =
B.GetX(), by =
B.GetY(), bz =
B.GetZ();
16
17
18 Vertices.push_back(vertex( A, { 0, 0, -1 }, { ax, ay }));
19 Vertices.push_back(vertex({ ax, by, az }, { 0, 0, -1 }, { ax, by }));
20 Vertices.push_back(vertex({ bx, ay, az }, { 0, 0, -1 }, { bx, ay }));
21 Vertices.push_back(vertex({ bx, by, az }, { 0, 0, -1 }, { bx, by }));
22
29
30
31 Vertices.push_back(vertex({ bx, ay, az}, { 1, 0, 0 }, { ay, az }));
32 Vertices.push_back(vertex({ bx, by, az}, { 1, 0, 0 }, { by, az }));
33 Vertices.push_back(vertex({ bx, ay, bz}, { 1, 0, 0 }, { ay, bz }));
34 Vertices.push_back(vertex( B, { 1, 0, 0 }, { by, bz }));
35
42
43
44 Vertices.push_back(vertex({ bx, ay, bz }, { 0, 0, 1 }, { bx, ay }));
45 Vertices.push_back(vertex( B, { 0, 0, 1 }, { bx, by }));
46 Vertices.push_back(vertex({ ax, ay, bz }, { 0, 0, 1 }, { ax, ay }));
47 Vertices.push_back(vertex({ ax, by, bz }, { 0, 0, 1 }, { ax, by }));
48
55
56
57 Vertices.push_back(vertex({ ax, ay, bz }, { -1, 0, 0 }, { ay, bz }));
58 Vertices.push_back(vertex({ ax, by, bz }, { -1, 0, 0 }, { by, bz }));
59 Vertices.push_back(vertex( A, { -1, 0, 0 }, { ay, az }));
60 Vertices.push_back(vertex({ ax, by, az }, { -1, 0, 0 }, { by, az }));
61
68
69
70 Vertices.push_back(vertex({ ax, by, az }, { 0, 1, 0 }, { ax, az }));
71 Vertices.push_back(vertex({ ax, by, bz }, { 0, 1, 0 }, { ax, bz }));
72 Vertices.push_back(vertex({ bx, by, az }, { 0, 1, 0 }, { bx, az }));
73 Vertices.push_back(vertex( B, { 0, 1, 0 }, { bx, bz }));
74
81
82
83 Vertices.push_back(vertex( A, { 0, -1, 0 }, { ax, az }));
84 Vertices.push_back(vertex({ ax, ay, bz }, { 0, -1, 0 }, { ax, bz }));
85 Vertices.push_back(vertex({ bx, ay, az }, { 0, -1, 0 }, { bx, az }));
86 Vertices.push_back(vertex({ bx, ay, bz }, { 0, -1, 0 }, { bx, bz }));
87
94
97}
static vec3 Max(const vec3 &A, const vec3 &B)
static vec3 Min(const vec3 &A, const vec3 &B)
std::vector< vertex > Vertices
std::vector< u32 > Indices
virtual void EvaluateTangentSpace()