goat3d
diff src/goat3d.h @ 27:4deb0b12fe14
wtf... corrupted heap?
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 29 Sep 2013 08:20:19 +0300 |
parents | 1c601bf07b86 |
children | a5c5cec3cb88 |
line diff
1.1 --- a/src/goat3d.h Sat Sep 28 20:36:55 2013 +0300 1.2 +++ b/src/goat3d.h Sun Sep 29 08:20:19 2013 +0300 1.3 @@ -90,6 +90,8 @@ 1.4 const float *goat3d_get_ambient(const struct goat3d *g); 1.5 1.6 /* materials */ 1.7 +void goat3d_add_mtl(struct goat3d *g, struct goat3d_material *mtl); 1.8 + 1.9 struct goat3d_material *goat3d_create_mtl(void); 1.10 void goat3d_destroy_mtl(struct goat3d_material *mtl); 1.11 1.12 @@ -105,9 +107,12 @@ 1.13 void goat3d_set_mtl_attrib_map(struct goat3d_material *mtl, const char *attrib, const char *mapname); 1.14 const char *goat3d_get_mtl_attrib_map(struct goat3d_material *mtl, const char *attrib); 1.15 1.16 -void goat3d_add_mtl(struct goat3d *g, struct goat3d_material *mtl); 1.17 +/* meshes */ 1.18 +void goat3d_add_mesh(struct goat3d *g, struct goat3d_mesh *mesh); 1.19 +int goat3d_get_mesh_count(struct goat3d *g); 1.20 +struct goat3d_mesh *goat3d_get_mesh(struct goat3d *g, int idx); 1.21 +struct goat3d_mesh *goat3d_get_mesh_by_name(struct goat3d *g, const char *name); 1.22 1.23 -/* meshes */ 1.24 struct goat3d_mesh *goat3d_create_mesh(void); 1.25 void goat3d_destroy_mesh(struct goat3d_mesh *mesh); 1.26 1.27 @@ -160,13 +165,32 @@ 1.28 void goat3d_color3f(float x, float y, float z); 1.29 void goat3d_color4f(float x, float y, float z, float w); 1.30 1.31 -void goat3d_add_mesh(struct goat3d *g, struct goat3d_mesh *mesh); 1.32 +/* lights */ 1.33 +void goat3d_add_light(struct goat3d *g, struct goat3d_light *lt); 1.34 +int goat3d_get_light_count(struct goat3d *g); 1.35 +struct goat3d_light *goat3d_get_light(struct goat3d *g, int idx); 1.36 +struct goat3d_light *goat3d_get_light_by_name(struct goat3d *g, const char *name); 1.37 1.38 -int goat3d_get_mesh_count(struct goat3d *g); 1.39 -struct goat3d_mesh *goat3d_get_mesh(struct goat3d *g, int idx); 1.40 +struct goat3d_light *goat3d_create_light(void); 1.41 +void goat3d_destroy_light(struct goat3d_light *lt); 1.42 + 1.43 +/* cameras */ 1.44 +void goat3d_add_camera(struct goat3d *g, struct goat3d_camera *cam); 1.45 +int goat3d_get_camera_count(struct goat3d *g); 1.46 +struct goat3d_camera *goat3d_get_camera(struct goat3d *g, int idx); 1.47 +struct goat3d_camera *goat3d_get_camera_by_name(struct goat3d *g, const char *name); 1.48 + 1.49 +struct goat3d_camera *goat3d_create_camera(void); 1.50 +void goat3d_destroy_camera(struct goat3d_camera *cam); 1.51 1.52 /* nodes */ 1.53 +void goat3d_add_node(struct goat3d *g, struct goat3d_node *node); 1.54 +int goat3d_get_node_count(struct goat3d *g); 1.55 +struct goat3d_node *goat3d_get_node(struct goat3d *g, int idx); 1.56 +struct goat3d_node *goat3d_get_node_by_name(struct goat3d *g, const char *name); 1.57 + 1.58 struct goat3d_node *goat3d_create_node(void); 1.59 +void goat3d_destroy_node(struct goat3d_node *node); 1.60 1.61 void goat3d_set_node_name(struct goat3d_node *node, const char *name); 1.62 const char *goat3d_get_node_name(const struct goat3d_node *node);