30 lines
523 B
C
30 lines
523 B
C
#ifndef MESH_H
|
|
#define MESH_H
|
|
|
|
#include "vector.h"
|
|
#include "triangle.h"
|
|
|
|
#define N_CUBE_VERTICES 8
|
|
#define N_CUBE_FACES (6 * 2) // 6 cube faces, 2 triangles per face
|
|
|
|
#define MAX_LEN 256
|
|
|
|
extern vec3_t cube_vertices[N_CUBE_VERTICES];
|
|
extern face_t cube_faces[N_CUBE_FACES];
|
|
|
|
typedef struct mesh_t mesh_t;
|
|
struct mesh_t {
|
|
vec3_t* vertices;
|
|
face_t* faces;
|
|
vec3_t rotation;
|
|
};
|
|
|
|
extern mesh_t mesh;
|
|
|
|
void parse_face(const char* buffer, face_t* face);
|
|
|
|
void load_cube_mesh_data(void);
|
|
void load_file(void);
|
|
|
|
#endif
|