polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

mdl.h (749B)


      1 
      2 #ifndef MDL_H
      3 #define MDL_H
      4 
      5 #include "geometry.h"
      6 #include "model.h"
      7 
      8 enum mdl_tag {
      9     MDL_POSITION = 1,
     10     MDL_NORMAL,
     11     MDL_COLOR,
     12     MDL_INDEX,
     13     MDL_TEX_COORD,
     14     MDL_JOINT_IDS,
     15     MDL_JOINT_WEIGHTS,
     16     MDL_MIN,
     17     MDL_MAX,
     18     N_MDL_TAGS
     19 };
     20 
     21 struct mdl_geometry {
     22     float min[3];
     23     float max[3];
     24     struct make_geometry mkgeom;
     25 };
     26 
     27 
     28 void save_mdl(const char *filename, struct model *model, struct mdl_geometry *geom);
     29 void save_mdl_fd(FILE *out, struct model *model, struct mdl_geometry *geom);
     30 
     31 void load_mdl(const char *filename, struct model *model, struct mdl_geometry *geom);
     32 void load_mdl_fd(FILE *in, struct model *model, struct mdl_geometry *geom);
     33 
     34 void init_mdl_geometry(struct mdl_geometry *);
     35 
     36 #endif /* MDL_H */