dd_meshColour.h 807 B

1234567891011121314151617181920212223242526272829
  1. #ifndef DD_MESHCOLOUR_H
  2. #define DD_MESHCOLOUR_H
  3. #include "dd_mesh.h"
  4. struct dd_meshColour {
  5. struct dd_mesh parent;
  6. int dirtyColours;
  7. float *c;
  8. void (*set_colour)(struct dd_mesh *m, float r, float g, float b);
  9. };
  10. // constructor
  11. void dd_meshColour_create(struct dd_meshColour *);
  12. /* Free and Draw functions */
  13. void dd_meshColour_clean(struct dd_meshColour *m);
  14. void dd_meshColour_draw(struct dd_meshColour *m);
  15. // functions to give the mesh its shape
  16. void dd_meshColour_set_primitive(struct dd_meshColour *m, enum dd_primitives shape);
  17. void dd_meshColour_load(struct dd_meshColour *m, const char *filename);
  18. void dd_meshColour_copy(struct dd_meshColour *dest, struct dd_meshColour *src);
  19. void dd_meshColour_set_colour(struct dd_meshColour *m, float r, float g, float b);
  20. #endif /* MESHCOLOUR_H */