scenefile

diff src/mesh.h @ 3:b30f83409769

foo
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sat, 21 Jan 2012 04:14:24 +0200
parents 38489ad82bf4
children
line diff
     1.1 --- a/src/mesh.h	Sun Jan 15 08:32:19 2012 +0200
     1.2 +++ b/src/mesh.h	Sat Jan 21 04:14:24 2012 +0200
     1.3 @@ -22,6 +22,7 @@
     1.4  void *vattr_pointer(struct mesh_vertattr *ma);
     1.5  int vattr_count(struct mesh_vertattr *ma);
     1.6  int vattr_elem_size(struct mesh_vertattr *ma);
     1.7 +void *vattr_elem(struct mesh_vertattr *ma, int elem);
     1.8  
     1.9  /* --- mesh --- */
    1.10  
    1.11 @@ -31,12 +32,23 @@
    1.12  int mesh_set_name(struct mesh *m, const char *name);
    1.13  const char *mesh_get_name(struct mesh *m);
    1.14  
    1.15 +/* 1 - points, 2 - lines, 3 - triangles, 4 - quads */
    1.16 +int mesh_poly_type(struct mesh *m);
    1.17 +
    1.18  int mesh_add_attrib(struct mesh *m, struct mesh_vertattr *attr);
    1.19 +int mesh_num_attribs(struct mesh *m);
    1.20  int mesh_find_attrib(struct mesh *m, const char *name);
    1.21  
    1.22 -int mesh_attr_count(struct mesh *m);
    1.23 +struct mesh_vertattr *mesh_attrib(struct mesh *m, int loc);
    1.24 +void *mesh_attrib_data(struct mesh *m, int loc);
    1.25 +int *mesh_poly_data(struct mesh *m, int loc);
    1.26 +
    1.27 +int mesh_attrib_count(struct mesh *m, int loc);
    1.28  int mesh_poly_count(struct mesh *m);
    1.29  
    1.30 +void *mesh_attrib_elem(struct mesh *m, int loc, int elem);
    1.31 +int mesh_attrib_elem_size(struct mesh *m, int loc);
    1.32 +
    1.33  /* the variable arguments correspond to the N indices of the N-gon
    1.34   * for this particular vertex attribute (attr_loc, retrieved by
    1.35   * mesh_find_attrib)