8 struct g3d_vertex *varr;
13 int init_mesh(struct g3d_mesh *mesh, int prim, int num_verts, int num_idx);
15 void free_mesh(struct g3d_mesh *mesh);
16 void destroy_mesh(struct g3d_mesh *mesh);
18 int copy_mesh(struct g3d_mesh *dest, struct g3d_mesh *src);
20 int load_mesh(struct g3d_mesh *mesh, const char *fname);
21 int save_mesh(struct g3d_mesh *mesh, const char *fname);
23 void zsort_mesh(struct g3d_mesh *mesh);
24 void draw_mesh(struct g3d_mesh *mesh);
26 void apply_mesh_xform(struct g3d_mesh *mesh, const float *xform);
27 int append_mesh(struct g3d_mesh *ma, struct g3d_mesh *mb);
28 int indexify_mesh(struct g3d_mesh *mesh);
30 void normalize_mesh_normals(struct g3d_mesh *mesh);
32 void calc_mesh_centroid(struct g3d_mesh *mesh, float *cent);
34 int gen_sphere_mesh(struct g3d_mesh *mesh, float rad, int usub, int vsub);
35 int gen_plane_mesh(struct g3d_mesh *mesh, float width, float height, int usub, int vsub);
36 int gen_cube_mesh(struct g3d_mesh *mesh, float sz, int sub);
37 int gen_torus_mesh(struct g3d_mesh *mesh, float rad, float ringrad, int usub, int vsub);