const vec3 mesh_Cylinder_position[] = { {0.0, 1.0, -1.0}, {0.0, 1.0, 1.0}, {0.19509032368659973, 0.9807852506637573, -1.0}, {0.19509032368659973, 0.9807852506637573, 1.0}, {0.3826834559440613, 0.9238795042037964, -1.0}, {0.3826834559440613, 0.9238795042037964, 1.0}, {0.5555702447891235, 0.8314695954322815, -1.0}, {0.5555702447891235, 0.8314695954322815, 1.0}, {0.7071067690849304, 0.7071067690849304, -1.0}, {0.7071067690849304, 0.7071067690849304, 1.0}, {0.8314695954322815, 0.5555702447891235, -1.0}, {0.8314695954322815, 0.5555702447891235, 1.0}, {0.9238795042037964, 0.3826834559440613, -1.0}, {0.9238795042037964, 0.3826834559440613, 1.0}, {0.9807852506637573, 0.19509032368659973, -1.0}, {0.9807852506637573, 0.19509032368659973, 1.0}, {1.0, 0.0, -1.0}, {1.0, 0.0, 1.0}, {0.9807852506637573, -0.19509032368659973, -1.0}, {0.9807852506637573, -0.19509032368659973, 1.0}, {0.9238795042037964, -0.3826834559440613, -1.0}, {0.9238795042037964, -0.3826834559440613, 1.0}, {0.8314695954322815, -0.5555702447891235, -1.0}, {0.8314695954322815, -0.5555702447891235, 1.0}, {0.7071067690849304, -0.7071067690849304, -1.0}, {0.7071067690849304, -0.7071067690849304, 1.0}, {0.5555702447891235, -0.8314695954322815, -1.0}, {0.5555702447891235, -0.8314695954322815, 1.0}, {0.3826834559440613, -0.9238795042037964, -1.0}, {0.3826834559440613, -0.9238795042037964, 1.0}, {0.19509032368659973, -0.9807852506637573, -1.0}, {0.19509032368659973, -0.9807852506637573, 1.0}, {0.0, -1.0, -1.0}, {0.0, -1.0, 1.0}, {-0.19509032368659973, -0.9807852506637573, -1.0}, {-0.19509032368659973, -0.9807852506637573, 1.0}, {-0.3826834559440613, -0.9238795042037964, -1.0}, {-0.3826834559440613, -0.9238795042037964, 1.0}, {-0.5555702447891235, -0.8314695954322815, -1.0}, {-0.5555702447891235, -0.8314695954322815, 1.0}, {-0.7071067690849304, -0.7071067690849304, -1.0}, {-0.7071067690849304, -0.7071067690849304, 1.0}, {-0.8314695954322815, -0.5555702447891235, -1.0}, {-0.8314695954322815, -0.5555702447891235, 1.0}, {-0.9238795042037964, -0.3826834559440613, -1.0}, {-0.9238795042037964, -0.3826834559440613, 1.0}, {-0.9807852506637573, -0.19509032368659973, -1.0}, {-0.9807852506637573, -0.19509032368659973, 1.0}, {-1.0, 0.0, -1.0}, {-1.0, 0.0, 1.0}, {-0.9807852506637573, 0.19509032368659973, -1.0}, {-0.9807852506637573, 0.19509032368659973, 1.0}, {-0.9238795042037964, 0.3826834559440613, -1.0}, {-0.9238795042037964, 0.3826834559440613, 1.0}, {-0.8314695954322815, 0.5555702447891235, -1.0}, {-0.8314695954322815, 0.5555702447891235, 1.0}, {-0.7071067690849304, 0.7071067690849304, -1.0}, {-0.7071067690849304, 0.7071067690849304, 1.0}, {-0.5555702447891235, 0.8314695954322815, -1.0}, {-0.5555702447891235, 0.8314695954322815, 1.0}, {-0.3826834559440613, 0.9238795042037964, -1.0}, {-0.3826834559440613, 0.9238795042037964, 1.0}, {-0.19509032368659973, 0.9807852506637573, -1.0}, {-0.19509032368659973, 0.9807852506637573, 1.0}, {0.8070226311683655, 0.0, 0.9663905501365662}, {0.8070226311683655, 0.0, -0.9663905501365662}, {0.8070226311683655, -12.08585262298584, 0.9663905501365662}, {0.8070226311683655, -12.08585262298584, -0.9663905501365662}, {-0.8070226311683655, 0.0, 0.9663905501365662}, {-0.8070226311683655, 0.0, -0.9663905501365662}, {-0.8070226311683655, -12.08585262298584, 0.9663905501365662}, {-0.8070226311683655, -12.08585262298584, -0.9663905501365662}, }; struct polygon { int a, b, c, d; }; const polygon mesh_Cylinder_polygons[] = { {0, 1, 3, 2}, {2, 3, 5, 4}, {4, 5, 7, 6}, {6, 7, 9, 8}, {8, 9, 11, 10}, {10, 11, 13, 12}, {12, 13, 15, 14}, {14, 15, 17, 16}, {16, 17, 19, 18}, {18, 19, 21, 20}, {20, 21, 23, 22}, {22, 23, 25, 24}, {24, 25, 27, 26}, {26, 27, 29, 28}, {28, 29, 31, 30}, {30, 31, 33, 32}, {32, 33, 35, 34}, {34, 35, 37, 36}, {36, 37, 39, 38}, {38, 39, 41, 40}, {40, 41, 43, 42}, {42, 43, 45, 44}, {44, 45, 47, 46}, {46, 47, 49, 48}, {48, 49, 51, 50}, {50, 51, 53, 52}, {52, 53, 55, 54}, {54, 55, 57, 56}, {56, 57, 59, 58}, {58, 59, 61, 60}, //{3, 1, 63, 61, 59, 57, 55, 53, 51, 49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5}, {60, 61, 63, 62}, {62, 63, 1, 0}, //{0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62}, {64, 65, 67, 66}, {66, 67, 71, 70}, {70, 71, 69, 68}, {68, 69, 65, 64}, {66, 70, 68, 64}, {71, 67, 65, 69}, }; struct mesh { vec3 * position; int position_length; polygon * polygons; int polygons_length; // vec2 * uv_layers[]; // support for multiple UV maps // int uv_layers_length; }; const mesh mesh_Cylinder = { position = mesh_Cylinder_position, position_length = (sizeof (mesh_Cylinder_position)) / (sizeof (mesh_Cylinder_position[0])), polygons = mesh_Cylinder_polygons, polygons_length = (sizeof (mesh_Cylinder_polygons)) / (sizeof (mesh_Cylinder_polygons[0])), }; struct object { struct mesh * mesh; vec4 rotation; vec3 location; }; struct object objects[] = { { // object Cylinder .mesh = &mesh_Cylinder, .rotation = {0.6241188049316406, 0.6737393736839294, -0.051736120134592056, -0.7371557950973511}; .location = {0.0, 0.0, 0.0}; }, { // object Cylinder.001 .mesh = &mesh_Cylinder .rotation = {0.6241188049316406, 0.6737393736839294, -0.051736120134592056, -0.7371557950973511} .location = {-1.21906316280365, -4.1197733879089355, 1.3510278463363647} } };