X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=universe.h;h=2758ad6610e42155d16644c93eb1696ded7ffdbb;hb=1e3df5a4bc6dfdf8fcc89270fbaf2cc43b82fef2;hp=c80bf2cf240782929ab9c78732202862597788a0;hpb=2cd32038873961c8ff3861efb218fad75fbcbf69;p=flatland.git diff --git a/universe.h b/universe.h index c80bf2c..2758ad6 100644 --- a/universe.h +++ b/universe.h @@ -50,11 +50,15 @@ 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_gravity(scalar_t dt, scalar_t fx, scalar_t fy); void apply_collision_forces(scalar_t dt); bool update(scalar_t dt, scalar_t padding);