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

Go to the documentation of this file.
00001 #ifndef __HEMI__SMD_H__
00002 #define __HEMI__SMD_H__
00003 
00004 #include "hemi.h"
00005 
00006 typedef struct hemi_smd_link hemi_smd_link_t;
00007 typedef struct hemi_smd_vert hemi_smd_vert_t;
00008 typedef struct hemi_smd_tri hemi_smd_tri_t;
00009 typedef struct hemi_smd_bone hemi_smd_bone_t;
00010 
00011 struct hemi_smd_link
00012 {
00013         float weight;
00014         int bone;
00015 };
00016 
00017 struct hemi_smd_vert
00018 {
00019         int parent_id;
00020         vec3 pos;
00021         vec3 normal;
00022         vec2 texcoord;
00023 
00024         hemi_smd_link_t* links;
00025         int num_links;
00026 
00027         int index;
00028 };
00029 
00030 struct hemi_smd_tri
00031 {
00032         char* texture;
00033         hemi_smd_vert_t v[3];
00034 };
00035 
00036 struct hemi_smd_bone
00037 {
00038         int id;
00039         int parent_id;
00040         char* name;
00041 
00042         vec3* pos;
00043         vec3* rot;
00044 };
00045 
00046 typedef struct hemi_smd
00047 {
00048         hemi_smd_bone_t* bones;
00049         hemi_uint num_bones;
00050 
00051         hemi_smd_tri_t* tris;
00052         hemi_uint num_tris;
00053 
00054         hemi_uint num_frames;
00055 
00056 } hemi_smd_t;
00057 
00058 HEXTERN int hemi_load_smd(const char*, hemi_smd_t*);
00059 
00060 #endif

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