#include <types.h>
#include <bfd.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
typedef int int32;
//float to fixed point
#define FTOX(x) ( (int32)((x) * 65536) )
struct TexturedVertexData3D rotor02vdata[] = {
{/*v:*/{-0.222222, -0.111111, 0.011111}, /*n:*/{0.138707, -0.194189, 0.971099}, /*t:*/{0.025000, 0.737500}},
{/*v:*/{-0.222222, -0.222222, -0.011111}, /*n:*/{0.138707, -0.194189, 0.971099}, /*t:*/{0.025000, 0.975000}},
{/*v:*/{-0.027778, -0.027778, 0.000000}, /*n:*/{-0.179571, -0.302622, 0.936033}, /*t:*/{0.440624, 0.559376}},
{/*v:*/{-0.222222, 0.222222, -0.011111}, /*n:*/{-0.194189, -0.138707, 0.971099}, /*t:*/{0.025000, 0.025000}},
{/*v:*/{-0.027778, 0.027778, 0.000000}, /*n:*/{-0.302622, 0.179571, 0.936033}, /*t:*/{0.440624, 0.440624}},
{/*v:*/{-0.111111, 0.222222, 0.011111}, /*n:*/{-0.194189, -0.138707, 0.971099}, /*t:*/{0.262500, 0.025000}},
{/*v:*/{0.027778, 0.027778, 0.000000}, /*n:*/{0.179571, 0.302622, 0.936033}, /*t:*/{0.559376, 0.440624}},
{/*v:*/{0.222222, 0.111111, 0.011111}, /*n:*/{-0.138707, 0.194189, 0.971099}, /*t:*/{0.975000, 0.262500}},
{/*v:*/{0.222222, 0.222222, -0.011111}, /*n:*/{-0.138707, 0.194189, 0.971099}, /*t:*/{0.975000, 0.025000}},
{/*v:*/{0.027778, -0.027778, 0.000000}, /*n:*/{0.302622, -0.179571, 0.936033}, /*t:*/{0.559376, 0.559376}},
{/*v:*/{0.111111, -0.222222, 0.011111}, /*n:*/{0.194189, 0.138707, 0.971099}, /*t:*/{0.737500, 0.975000}},
{/*v:*/{0.222222, -0.222222, -0.011111}, /*n:*/{0.194189, 0.138707, 0.971099}, /*t:*/{0.975000, 0.975000}},
{/*v:*/{0.000000, -0.000000, 0.022222}, /*n:*/{0.000000, 0.000000, 1.000000}, /*t:*/{0.500000, 0.500000}},
{/*v:*/{-0.027778, -0.027778, 0.000000}, /*n:*/{-0.179571, -0.302622, 0.936033}, /*t:*/{0.440624, 0.559376}},
{/*v:*/{0.027778, -0.027778, 0.000000}, /*n:*/{0.302622, -0.179571, 0.936033}, /*t:*/{0.559376, 0.559376}},
{/*v:*/{-0.027778, 0.027778, 0.000000}, /*n:*/{-0.302622, 0.179571, 0.936033}, /*t:*/{0.440624, 0.440624}},
{/*v:*/{-0.027778, -0.027778, 0.000000}, /*n:*/{-0.179571, -0.302622, 0.936033}, /*t:*/{0.440624, 0.559376}},
{/*v:*/{0.000000, -0.000000, 0.022222}, /*n:*/{0.000000, 0.000000, 1.000000}, /*t:*/{0.500000, 0.500000}},
{/*v:*/{-0.027778, 0.027778, 0.000000}, /*n:*/{-0.302622, 0.179571, 0.936033}, /*t:*/{0.440624, 0.440624}},
{/*v:*/{0.000000, -0.000000, 0.022222}, /*n:*/{0.000000, 0.000000, 1.000000}, /*t:*/{0.500000, 0.500000}},
{/*v:*/{0.027778, 0.027778, 0.000000}, /*n:*/{0.179571, 0.302622, 0.936033}, /*t:*/{0.559376, 0.440624}},
{/*v:*/{0.000000, -0.000000, 0.022222}, /*n:*/{0.000000, 0.000000, 1.000000}, /*t:*/{0.500000, 0.500000}},
{/*v:*/{0.027778, -0.027778, 0.000000}, /*n:*/{0.302622, -0.179571, 0.936033}, /*t:*/{0.559376, 0.559376}},
{/*v:*/{0.027778, 0.027778, 0.000000}, /*n:*/{0.179571, 0.302622, 0.936033}, /*t:*/{0.559376, 0.440624}},
};
#define rotor02numi 24
// Drawing Code:// glEnableClientState(GL_VERTEX_ARRAY);
// glEnableClientState(GL_TEXTURE_COORD_ARRAY);
// glEnableClientState(GL_NORMAL_ARRAY);
// glVertexPointer(3, GL_FLOAT, sizeof(TexturedVertexData3D), &rotor02vdata[0].vertex);
// glNormalPointer(GL_FLOAT, sizeof(TexturedVertexData3D), &rotor02vdata[0].normal);
// glTexCoordPointer(2, GL_FLOAT, sizeof(TexturedVertexData3D), &rotor02vdata[0].texCoord);
// glDrawArrays(GL_TRIANGLES, 0, kRotorblade001bUVNumberOfVertices);
// glDisableClientState(GL_VERTEX_ARRAY);
// glDisableClientState(GL_TEXTURE_COORD_ARRAY);
// glDisableClientState(GL_NORMAL_ARRAY);
void doRotor02()
{
int i;
printf("model->m_numVertices = %d;\n", rotor02numi);
printf("model->m_numIndices = %d;\n", rotor02numi);
printf("model->m_numColorData= %d;\n", 0);
printf("model->m_numTexCoords = %d;\n", rotor02numi);
for (i=0;i<rotor02numi;i++) {
printf("\t//v.x: (%d) v.y: (%d) v.z: (%d)\tn.x: (%d) n.y: (%d) n.z: (%d)\tt.a: (%d) t.b: (%d)\n",
FTOX(rotor02vdata[i].v.x),
FTOX(rotor02vdata[i].v.y),
FTOX(rotor02vdata[i].v.z),
FTOX(rotor02vdata[i].n.x),
FTOX(rotor02vdata[i].n.y),
FTOX(rotor02vdata[i].n.z),
FTOX(rotor02vdata[i].t.u),
FTOX(rotor02vdata[i].t.v));
printf("\tmodel->m_vertices[%d].x = (%d);\n\tmodel->m_vertices[%d].y = (%d);\n\tmodel->m_vertices[%d].z = (%d);\n",
i,
FTOX(rotor02vdata[i].v.x),
i,
FTOX(rotor02vdata[i].v.y),
i,
FTOX(rotor02vdata[i].v.z));
printf("\tmodel->m_normals[%d].x = (%d);\n\tmodel->m_normals[%d].y = (%d);\n\tmodel->m_normals[%d].z = (%d);\n",
i,
FTOX(rotor02vdata[i].n.x),
i,
FTOX(rotor02vdata[i].n.y),
i,
FTOX(rotor02vdata[i].n.z));
}
for (i=0;i<rotor02numi;i++) {
printf("\tmodel->m_indices[%d] = %d;\n", i, i);
}
for (i=0;i<rotor02numi;i++) {
printf("\tmodel->m_texCoords[%d].u = (%d);\n\tmodel->m_texCoords[%d].v = (%d);\n",
i,
FTOX(rotor02vdata[i].t.u),
i,
FTOX(rotor02vdata[i].t.v));
}
}