2023-04-02 21:53:21 +02:00
|
|
|
#ifndef COLLISIONS_H_INCLUDED
|
|
|
|
#define COLLISIONS_H_INCLUDED
|
|
|
|
|
|
|
|
#include "polygons.h"
|
|
|
|
#include "vec2d.h"
|
|
|
|
|
|
|
|
struct collision {
|
2023-04-25 12:09:07 +02:00
|
|
|
bool collides = false;
|
2023-05-19 15:24:11 +02:00
|
|
|
vec2d n;
|
2023-04-02 21:53:21 +02:00
|
|
|
vec2d impact_point;
|
2023-05-19 15:24:11 +02:00
|
|
|
vec2d overlap; // minimum push vector
|
2023-04-02 21:53:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern collision collides(polygon& p, polygon& q);
|
|
|
|
|
|
|
|
#endif
|