2021-11-30 21:29:18 -06:00
|
|
|
#ifndef DEBUGDRAW_H
|
|
|
|
#define DEBUGDRAW_H
|
|
|
|
|
2023-03-19 20:33:05 -05:00
|
|
|
#include <chipmunk/chipmunk.h>
|
2023-05-16 01:31:13 -05:00
|
|
|
struct rgba;
|
2023-01-25 21:32:58 -06:00
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
void debugdraw_init();
|
2023-05-16 13:31:19 -05:00
|
|
|
void draw_cppoint(struct cpVect point, float r, struct rgba color);
|
2023-05-16 01:31:13 -05:00
|
|
|
void draw_points(struct cpVect *points, int n, float size, struct rgba color);
|
2023-05-16 13:31:19 -05:00
|
|
|
|
|
|
|
void draw_line(cpVect *points, int n, struct rgba color, float seg_len);
|
2023-05-16 01:31:13 -05:00
|
|
|
void draw_arrow(struct cpVect start, struct cpVect end, struct rgba, int capsize);
|
2023-05-16 13:31:19 -05:00
|
|
|
void draw_edge(struct cpVect *points, int n, struct rgba color, int thickness, int closed, int flags);
|
|
|
|
|
2023-05-16 01:31:13 -05:00
|
|
|
void draw_circle(int x, int y, float radius, int pixels, struct rgba color, int fill);
|
2023-05-16 13:31:19 -05:00
|
|
|
|
2023-05-16 01:31:13 -05:00
|
|
|
void draw_rect(int x, int y, int w, int h, struct rgba color);
|
|
|
|
void draw_box(struct cpVect c, struct cpVect wh, struct rgba color);
|
|
|
|
void draw_poly(cpVect *points, int n, struct rgba color);
|
2021-11-30 21:29:18 -06:00
|
|
|
|
2023-05-16 13:31:19 -05:00
|
|
|
void draw_grid(int width, int span, struct rgba color);
|
2023-05-07 19:47:49 -05:00
|
|
|
|
2023-05-16 13:31:19 -05:00
|
|
|
void debug_flush();
|
2023-01-25 21:32:58 -06:00
|
|
|
|
2021-11-30 21:29:18 -06:00
|
|
|
void debugdraw_flush(); /* This is called once per frame to draw all queued elements */
|
|
|
|
|
2023-03-19 20:33:05 -05:00
|
|
|
cpVect inflatepoint(cpVect a, cpVect b, cpVect c, float d);
|
|
|
|
void inflatepoints(cpVect *r, cpVect *p, float d, int n);
|
2021-11-30 21:29:18 -06:00
|
|
|
|
|
|
|
#endif
|