annotate src/mesh.h @ 1:38489ad82bf4
foo
author |
John Tsiombikas <nuclear@mutantstargoat.com> |
date |
Sat, 14 Jan 2012 08:10:50 +0200 |
parents |
8c6d64af9505 |
children |
b30f83409769 |
rev |
line source |
nuclear@0
|
1 #ifndef MESH_H_
|
nuclear@0
|
2 #define MESH_H_
|
nuclear@0
|
3
|
nuclear@1
|
4 struct mesh_vertattr;
|
nuclear@1
|
5 struct mesh_polyidx;
|
nuclear@1
|
6 struct mesh;
|
nuclear@0
|
7
|
nuclear@0
|
8 #ifdef __cplusplus
|
nuclear@0
|
9 extern "C" {
|
nuclear@0
|
10 #endif
|
nuclear@0
|
11
|
nuclear@1
|
12 /* --- vertex attributes --- */
|
nuclear@0
|
13
|
nuclear@1
|
14 int vattr_init(struct mesh_vertattr *ma, int elem_sz);
|
nuclear@1
|
15 void vattr_destroy(struct mesh_vertattr *ma);
|
nuclear@0
|
16
|
nuclear@1
|
17 int vattr_set_name(struct mesh_vertattr *ma, const char *name);
|
nuclear@1
|
18 const char *vattr_get_name(struct mesh_vertattr *ma);
|
nuclear@1
|
19
|
nuclear@1
|
20 int vattr_add_elem(struct mesh_vertattr *ma, void *elem);
|
nuclear@1
|
21
|
nuclear@1
|
22 void *vattr_pointer(struct mesh_vertattr *ma);
|
nuclear@1
|
23 int vattr_count(struct mesh_vertattr *ma);
|
nuclear@1
|
24 int vattr_elem_size(struct mesh_vertattr *ma);
|
nuclear@1
|
25
|
nuclear@1
|
26 /* --- mesh --- */
|
nuclear@1
|
27
|
nuclear@1
|
28 int mesh_init(struct mesh *m, int nverts);
|
nuclear@0
|
29 void mesh_destroy(struct mesh *m);
|
nuclear@0
|
30
|
nuclear@0
|
31 int mesh_set_name(struct mesh *m, const char *name);
|
nuclear@1
|
32 const char *mesh_get_name(struct mesh *m);
|
nuclear@1
|
33
|
nuclear@1
|
34 int mesh_add_attrib(struct mesh *m, struct mesh_vertattr *attr);
|
nuclear@0
|
35 int mesh_find_attrib(struct mesh *m, const char *name);
|
nuclear@0
|
36
|
nuclear@1
|
37 int mesh_attr_count(struct mesh *m);
|
nuclear@1
|
38 int mesh_poly_count(struct mesh *m);
|
nuclear@1
|
39
|
nuclear@1
|
40 /* the variable arguments correspond to the N indices of the N-gon
|
nuclear@1
|
41 * for this particular vertex attribute (attr_loc, retrieved by
|
nuclear@1
|
42 * mesh_find_attrib)
|
nuclear@1
|
43 */
|
nuclear@1
|
44 int mesh_add_polyref(struct mesh *m, int attr_loc, ...);
|
nuclear@1
|
45
|
nuclear@0
|
46 #ifdef __cplusplus
|
nuclear@0
|
47 }
|
nuclear@0
|
48 #endif
|
nuclear@0
|
49
|
nuclear@0
|
50 #endif /* MESH_H_ */
|