/afs/csl.tjhsst.edu/students/2007/kkassing/work/libhemi/md3.h

Go to the documentation of this file.
00001 #ifndef __HEMI__MD3_H__
00002 #define __HEMI__MD3_H__
00003 
00004 #include "hemi.h"
00005 
00006 typedef struct hemi_md3_hdr
00007 {
00008         int id;
00009         int version;
00010         char name[64];
00011         int flags;
00012         int num_frames;
00013         int num_tags;
00014         int num_surfs;
00015         int num_skins;
00016         int offset_frames;
00017         int offset_tags;
00018         int offset_surfs;
00019         int offset_eof;
00020 } hemi_md3_hdr_t;
00021 
00022 typedef struct hemi_md3_frame
00023 {
00024         float bbox[2][3];
00025         float origin[3];
00026         float radius;
00027         char name[16];
00028 } hemi_md3_frame_t;
00029 
00030 typedef struct hemi_md3_tag
00031 {
00032         char name[64];
00033         float origin[3];
00034         float axis[3][3];
00035 } hemi_md3_tag_t;
00036 
00037 typedef struct hemi_md3_surf
00038 {
00039         int id;
00040         char name[64];
00041         int flags;
00042         int num_frames;
00043         int num_shaders;
00044         int num_verts;
00045         int num_tris;
00046         int offset_tris;
00047         int offset_shaders;
00048         int offset_coords;
00049         int offset_verts;
00050         int offset_end;
00051 } hemi_md3_surf_t;
00052 
00053 typedef struct hemi_md3_shader
00054 {
00055         char name[64];
00056         int index;
00057 } hemi_md3_shader_t;
00058 
00059 typedef struct hemi_md3_tri
00060 {
00061         int indices[3];
00062 } hemi_md3_tri_t;
00063 
00064 typedef struct hemi_md3_coord
00065 {
00066         float s;
00067         float t;
00068 } hemi_md3_coord_t;
00069 
00070 typedef struct hemi_md3_vert
00071 {
00072         short v[3];
00073         short normal;
00074 } hemi_md3_vert_t;
00075 
00076 typedef struct hemi_md3
00077 {
00078         hemi_md3_frame_t* frames;
00079         uint num_frames;
00080 
00081         hemi_md3_tag_t* tags;
00082         uint num_tags;
00083 
00084         hemi_md3_surf_t* surfs;
00085         uint num_surfs;
00086 
00087         hemi_md3_tri_t** tris;
00088         //uint* num_tris;
00089 
00090         hemi_md3_shader_t** shaders;
00091         //uint* num_shaders;
00092 
00093         hemi_md3_coord_t** coords;
00094         //uint* num_coords;
00095 
00096         hemi_md3_vert_t** verts;
00097         //uint* num_verts;
00098 } hemi_md3_t;
00099 
00100 HEXTERN int hemi_load_md3(const char*, hemi_md3_t*);
00101 HEXTERN void hemi_free_md3(hemi_md3_t*);
00102 
00103 //HEXTERN int hemi_convert_md3_static(hemi_md3_t*, hemi_vsmesh_t*);
00104 //HEXTERN int hemi_convert_md3_anim(hemi_md3_t*, hemi_vamesh_t*);
00105 
00106 #endif

Generated on Fri Jun 1 09:08:56 2007 for Antigone by  doxygen 1.4.7