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-04-02 21:53:21 +02:00
|
|
|
vec2d n; // minimum push vector
|
|
|
|
vec2d impact_point;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern collision collides(polygon& p, polygon& q);
|
|
|
|
|
|
|
|
#endif
|