2021-12-11 21:32:48 +01:00
|
|
|
#ifndef GRAVITY_H_INCLUDED
|
|
|
|
#define GRAVITY_H_INCLUDED
|
|
|
|
|
2021-12-12 00:36:07 +01:00
|
|
|
#include "balls.h"
|
2023-05-17 13:30:05 +02:00
|
|
|
#include "polygons.h"
|
2021-12-12 00:36:07 +01:00
|
|
|
|
2023-05-17 13:29:38 +02:00
|
|
|
extern void gravity_constant_field(double x, double y);
|
|
|
|
extern void gravity_newton_field(double r, double g);
|
2021-12-12 00:36:07 +01:00
|
|
|
|
2023-05-17 13:29:38 +02:00
|
|
|
extern vec2d gravity_vector(const ball* b);
|
2023-05-17 13:30:05 +02:00
|
|
|
extern vec2d gravity_vector(const polygon* b);
|
2021-12-11 21:32:48 +01:00
|
|
|
|
2023-05-17 13:29:38 +02:00
|
|
|
extern void gravity_draw_visible_field(cairo_t* cr);
|
2022-12-28 18:50:12 +01:00
|
|
|
|
2023-05-17 13:29:38 +02:00
|
|
|
extern void gravity_draw(cairo_t* cr);
|
|
|
|
extern void gravity_change(double dx, double dy);
|
2021-12-11 21:32:48 +01:00
|
|
|
|
2023-05-17 13:29:38 +02:00
|
|
|
extern void gravity_collisions(ball* begin, ball* end);
|
2021-12-12 00:36:07 +01:00
|
|
|
|
2021-12-11 21:32:48 +01:00
|
|
|
#endif
|