#ifndef _MODELS_H_ #define _MODELS_H_ #include #include "Quaternions.h" #include "Constants.h" #define MAX_TEXTURED_TRIANGLES 400 struct TexturedTriangle { short vertex[3]; float r,g,b; }; struct Model { short vertexNum, TriangleNum; XYZ vertex[MAX_TEXTURED_TRIANGLES * 3]; XYZ normals[MAX_TEXTURED_TRIANGLES]; TexturedTriangle Triangles[MAX_TEXTURED_TRIANGLES]; GLfloat vArray[MAX_TEXTURED_TRIANGLES * 27]; XYZ boundingspherecenter; float boundingsphereradius; int LineCheck(XYZ, XYZ, XYZ*); int LineCheck2(XYZ, XYZ, XYZ*, XYZ, float); void UpdateVertexArray(); void load(const char*); void save(const char*); void CalculateNormals(); void draw(); void draw(float r,float g,float b); }; #endif