X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=flatland.git;a=blobdiff_plain;f=universe.h;h=3537750ae5ae500568a3436ece3ec27e3b077b03;hp=c80bf2cf240782929ab9c78732202862597788a0;hb=1f91ec6f67da83525115f49dcc7d535ff2e71ef0;hpb=e0f96aaef35ffaf34b912c7fa1473cb67b7a3dae diff --git a/universe.h b/universe.h index c80bf2c..3537750 100644 --- a/universe.h +++ b/universe.h @@ -50,11 +50,14 @@ public: void initialize_polygon(Polygon *p); void clear(); void add_polygon(Polygon *p); + + bool collide_with_borders(Polygon *p, scalar_t padding); bool collide(Polygon *p); // Compute collisions between projections of the polygons on a few // axis to speed up the computation void compute_pseudo_collisions(int nb_axis, int *nb_colliding_axis); + void apply_collision_forces(scalar_t dt); bool update(scalar_t dt, scalar_t padding);