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-06-05 10:32:45 -05:00
|
|
|
#include "HandmadeMath.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
|
|
|
|
2023-05-25 21:55:55 -05:00
|
|
|
void draw_line(cpVect *points, int n, struct rgba color, float seg_len, int closed, float seg_speed);
|
2023-05-16 01:31:13 -05:00
|
|
|
void draw_arrow(struct cpVect start, struct cpVect end, struct rgba, int capsize);
|
2023-05-24 20:45:50 -05:00
|
|
|
void draw_edge(struct cpVect *points, int n, struct rgba color, int thickness, int closed, int flags, struct rgba line_color, float line_seg);
|
2023-05-16 13:31:19 -05:00
|
|
|
|
2023-05-24 20:45:50 -05:00
|
|
|
/* pixels - how many pixels thick, segsize - dashed line seg len */
|
2023-05-27 10:13:20 -05:00
|
|
|
void draw_circle(cpVect c, float radius, float pixels, struct rgba color, float seg);
|
|
|
|
void draw_box(cpVect c, cpVect wh, struct rgba color);
|
2023-05-25 21:55:55 -05:00
|
|
|
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-06-05 10:32:45 -05:00
|
|
|
void debug_flush(HMM_Mat4 *view);
|
|
|
|
void debug_newframe();
|
2023-08-31 02:05:06 -05:00
|
|
|
void debug_nextpass();
|
2021-11-30 21:29:18 -06:00
|
|
|
|
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
|