-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphysics.ads
31 lines (20 loc) · 1.11 KB
/
physics.ads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
with Worlds; use Worlds;
with Entities; use Entities;
with Vectors2D; use Vectors2D;
with Materials; use Materials;
package Physics is
-- Update the world of dt
procedure StepNormal(This : in out World);
-- Update the world of dt with low ram usage
procedure StepLowRAM(This : in out World);
-- This compute the fluid friction between That and the env That is in (in This)
-- It should depend of the shape and speed of That
-- It returns a positive force that will oppose the movement in the end
function FluidFriction(This : in out World; That : not null EntityClassAcc) return Vec2D;
function Archimedes(This : in out World; That : not null EntityClassAcc) return Float;
function Tension(This : in out World; Ent : not null EntityClassAcc) return Vec2D;
procedure ResetForces(Ent : not null EntityClassAcc);
procedure IntegrateForces(This : in out World; Ent : not null EntityClassAcc);
procedure IntegrateVelocity(This : in out World; Ent : not null EntityClassAcc);
function GetDensestMaterial(This : in out World; That : not null EntityClassAcc) return Material;
end Physics;