X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fmesh.h;fp=src%2Fmesh.h;h=704c492bdc37026d0aec6a1228d13da9698d6196;hp=92cc240d57aa63becedf075b9ab9205622236ad3;hb=a1ede8e271fee1b4d029752603096db2be780e67;hpb=8cee0ffb00cce3d81487f1161286ac299db7d044 diff --git a/src/mesh.h b/src/mesh.h index 92cc240..704c492 100644 --- a/src/mesh.h +++ b/src/mesh.h @@ -1,6 +1,8 @@ #ifndef MESH_H_ #define MESH_H_ +#include "inttypes.h" + struct g3d_mesh { int prim; struct g3d_vertex *varr; @@ -13,7 +15,12 @@ int load_mesh(struct g3d_mesh *mesh, const char *fname); void zsort_mesh(struct g3d_mesh *mesh); void draw_mesh(struct g3d_mesh *mesh); -int gen_cube(struct g3d_mesh *mesh, float sz, int sub); -int gen_torus(struct g3d_mesh *mesh, float rad, float ringrad, int usub, int vsub); +void apply_mesh_xform(struct g3d_mesh *mesh, const float *xform); +int append_mesh(struct g3d_mesh *ma, struct g3d_mesh *mb); +int indexify_mesh(struct g3d_mesh *mesh); + +int gen_plane_mesh(struct g3d_mesh *mesh, float width, float height, int usub, int vsub); +int gen_cube_mesh(struct g3d_mesh *mesh, float sz, int sub); +int gen_torus_mesh(struct g3d_mesh *mesh, float rad, float ringrad, int usub, int vsub); #endif /* MESH_H_ */