2#include "common/maths/Vec.h"
7 Quad3d::Quad3d(
float size, Maths::Vec3 col)
10 const float const_Size = m_Size;
13 Maths::Vec3 pos[8] = {
14 Maths::Vec3(-const_Size, const_Size, -const_Size),
15 Maths::Vec3(const_Size, const_Size, -const_Size),
16 Maths::Vec3(-const_Size, -const_Size, -const_Size),
17 Maths::Vec3(const_Size, -const_Size, -const_Size),
18 Maths::Vec3(-const_Size, const_Size, const_Size),
19 Maths::Vec3(const_Size, const_Size, const_Size),
20 Maths::Vec3(-const_Size, -const_Size, const_Size),
21 Maths::Vec3(const_Size, -const_Size, const_Size),
24 Maths::Vec2 tex[8] = {
25 Maths::Vec2(0.0, 0.0),
26 Maths::Vec2(1.0, 0.0),
27 Maths::Vec2(1.0, 1.0),
28 Maths::Vec2(0.0, 1.0),
29 Maths::Vec2(0.0, 0.0),
30 Maths::Vec2(1.0, 0.0),
31 Maths::Vec2(1.0, 1.0),
32 Maths::Vec2(0.0, 1.0),
35 Maths::Vec3 color[8] = {
46 Maths::Vec3 normal[8] = {
47 Maths::Vec3(1.0, 1.0, 1.0),
48 Maths::Vec3(1.0, 1.0, 1.0),
49 Maths::Vec3(1.0, 1.0, 1.0),
50 Maths::Vec3(1.0, 1.0, 1.0),
51 Maths::Vec3(1.0, 1.0, 1.0),
52 Maths::Vec3(1.0, 1.0, 1.0),
53 Maths::Vec3(1.0, 1.0, 1.0),
54 Maths::Vec3(1.0, 1.0, 1.0),
57 unsigned int ind[12 * 3] = {
72 m_Pos.resize(8, Vertex());
73 m_Ind.resize(12 * 3,
int());
75 for (
int i = 0; i < 8; i++)
77 m_Pos[i].position = pos[i];
78 m_Pos[i].texcoord = tex[i];
79 m_Pos[i].tangent = color[i];
80 m_Pos[i].normal = normal[i];