198 lines
4.3 KiB
C

#pragma once
#include "../model.h"
const vertex_position icosphere_position[] = {
{0.000000f, -1.000000f, 0.000000f},
{0.723600f, -0.447215f, 0.525720f},
{-0.276385f, -0.447215f, 0.850640f},
{-0.894425f, -0.447215f, 0.000000f},
{-0.276385f, -0.447215f, -0.850640f},
{0.723600f, -0.447215f, -0.525720f},
{0.276385f, 0.447215f, 0.850640f},
{-0.723600f, 0.447215f, 0.525720f},
{-0.723600f, 0.447215f, -0.525720f},
{0.276385f, 0.447215f, -0.850640f},
{0.894425f, 0.447215f, 0.000000f},
{0.000000f, 1.000000f, 0.000000f},
};
const vertex_texture icosphere_texture[] = {
{0.181819f, 0.000000f},
{0.272728f, 0.157461f},
{0.090910f, 0.157461f},
{0.363637f, 0.000000f},
{0.454546f, 0.157461f},
{0.909091f, 0.000000f},
{1.000000f, 0.157461f},
{0.818182f, 0.157461f},
{0.727273f, 0.000000f},
{0.636364f, 0.157461f},
{0.545455f, 0.000000f},
{0.363637f, 0.314921f},
{0.181819f, 0.314921f},
{0.909091f, 0.314921f},
{0.727273f, 0.314921f},
{0.545455f, 0.314921f},
{0.000000f, 0.314921f},
{0.272728f, 0.472382f},
{0.090910f, 0.472382f},
{0.818182f, 0.472382f},
{0.636364f, 0.472382f},
{0.454546f, 0.472382f},
};
const vertex_normal icosphere_normal[] = {
{0.1876f, -0.7947f, 0.5774f},
{0.6071f, -0.7947f, -0.0000f},
{-0.4911f, -0.7947f, 0.3568f},
{-0.4911f, -0.7947f, -0.3568f},
{0.1876f, -0.7947f, -0.5774f},
{0.9822f, -0.1876f, -0.0000f},
{0.3035f, -0.1876f, 0.9342f},
{-0.7946f, -0.1876f, 0.5774f},
{-0.7946f, -0.1876f, -0.5774f},
{0.3035f, -0.1876f, -0.9342f},
{0.7946f, 0.1876f, 0.5774f},
{-0.3035f, 0.1876f, 0.9342f},
{-0.9822f, 0.1876f, -0.0000f},
{-0.3035f, 0.1876f, -0.9342f},
{0.7946f, 0.1876f, -0.5774f},
{0.4911f, 0.7947f, 0.3568f},
{-0.1876f, 0.7947f, 0.5774f},
{-0.6071f, 0.7947f, -0.0000f},
{-0.1876f, 0.7947f, -0.5774f},
{0.4911f, 0.7947f, -0.3568f},
};
const union triangle icosphere_Icosphere_triangle[] = {
{ .v = {
{0, 0, 0},
{1, 1, 0},
{2, 2, 0},
}},
{ .v = {
{1, 1, 1},
{0, 3, 1},
{5, 4, 1},
}},
{ .v = {
{0, 5, 2},
{2, 6, 2},
{3, 7, 2},
}},
{ .v = {
{0, 8, 3},
{3, 7, 3},
{4, 9, 3},
}},
{ .v = {
{0, 10, 4},
{4, 9, 4},
{5, 4, 4},
}},
{ .v = {
{1, 1, 5},
{5, 4, 5},
{10, 11, 5},
}},
{ .v = {
{2, 2, 6},
{1, 1, 6},
{6, 12, 6},
}},
{ .v = {
{3, 7, 7},
{2, 6, 7},
{7, 13, 7},
}},
{ .v = {
{4, 9, 8},
{3, 7, 8},
{8, 14, 8},
}},
{ .v = {
{5, 4, 9},
{4, 9, 9},
{9, 15, 9},
}},
{ .v = {
{1, 1, 10},
{10, 11, 10},
{6, 12, 10},
}},
{ .v = {
{2, 2, 11},
{6, 12, 11},
{7, 16, 11},
}},
{ .v = {
{3, 7, 12},
{7, 13, 12},
{8, 14, 12},
}},
{ .v = {
{4, 9, 13},
{8, 14, 13},
{9, 15, 13},
}},
{ .v = {
{5, 4, 14},
{9, 15, 14},
{10, 11, 14},
}},
{ .v = {
{6, 12, 15},
{10, 11, 15},
{11, 17, 15},
}},
{ .v = {
{7, 16, 16},
{6, 12, 16},
{11, 18, 16},
}},
{ .v = {
{8, 14, 17},
{7, 13, 17},
{11, 19, 17},
}},
{ .v = {
{9, 15, 18},
{8, 14, 18},
{11, 20, 18},
}},
{ .v = {
{10, 11, 19},
{9, 15, 19},
{11, 21, 19},
}},
};
const union quadrilateral icosphere_Icosphere_quadrilateral[] = {
};
const union line icosphere_Icosphere_line[] = {
};
const struct object icosphere_Icosphere = {
.triangle = &icosphere_Icosphere_triangle[0],
.quadrilateral = &icosphere_Icosphere_quadrilateral[0],
.line = &icosphere_Icosphere_line[0],
.triangle_count = 20,
.quadrilateral_count = 0,
.line_count = 0,
.material = 0,
};
const struct object * icosphere_object[] = {
&icosphere_Icosphere,
};
const struct model icosphere_model = {
.position = icosphere_position,
.texture = icosphere_texture,
.normal = icosphere_normal,
.object = icosphere_object,
.object_count = 1
};