r500/model/cube.h

110 lines
1.9 KiB
C

#pragma once
const vec3 cube_position[] = {
{1.000000f, 1.000000f, -1.000000f},
{1.000000f, -1.000000f, -1.000000f},
{1.000000f, 1.000000f, 1.000000f},
{1.000000f, -1.000000f, 1.000000f},
{-1.000000f, 1.000000f, -1.000000f},
{-1.000000f, -1.000000f, -1.000000f},
{-1.000000f, 1.000000f, 1.000000f},
{-1.000000f, -1.000000f, 1.000000f},
};
const vec2 cube_texture[] = {
{1.000000f, 0.000000f},
{0.000000f, 1.000000f},
{0.000000f, 0.000000f},
{1.000000f, 1.000000f},
};
const vec3 cube_normal[] = {
{-0.0000f, 1.0000f, -0.0000f},
{-0.0000f, -0.0000f, 1.0000f},
{-1.0000f, -0.0000f, -0.0000f},
{-0.0000f, -1.0000f, -0.0000f},
{1.0000f, -0.0000f, -0.0000f},
{-0.0000f, -0.0000f, -1.0000f},
};
const triangle_t cube_Cube_triangle[] = {
{
{4, 0, 0},
{2, 1, 0},
{0, 2, 0},
},
{
{2, 0, 1},
{7, 1, 1},
{3, 2, 1},
},
{
{6, 0, 2},
{5, 1, 2},
{7, 2, 2},
},
{
{1, 0, 3},
{7, 1, 3},
{5, 2, 3},
},
{
{0, 0, 4},
{3, 1, 4},
{1, 2, 4},
},
{
{4, 0, 5},
{1, 1, 5},
{5, 2, 5},
},
{
{4, 0, 0},
{6, 3, 0},
{2, 1, 0},
},
{
{2, 0, 1},
{6, 3, 1},
{7, 1, 1},
},
{
{6, 0, 2},
{4, 3, 2},
{5, 1, 2},
},
{
{1, 0, 3},
{3, 3, 3},
{7, 1, 3},
},
{
{0, 0, 4},
{2, 3, 4},
{3, 1, 4},
},
{
{4, 0, 5},
{0, 3, 5},
{1, 1, 5},
},
};
const object cube_Cube = {
.triangle = &cube_Cube_triangle[0],
.triangle_count = 12,
};
const object * cube_object[] = {
&cube_Cube,
};
const model cube_model = {
.position = cube_position,
.texture = cube_texture,
.normal = cube_normal,
.object = cube_object,
.object_count = 1
};