diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2016-04-06 00:26:28 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2016-04-06 00:26:28 +0200 |
commit | 5659a1baba94d10f76e72c8bbb9fa7576ab4f19b (patch) | |
tree | 1f096951e2233dc897c5c083eac3a700fa27ecca /src/physics.h | |
parent | c7acaee6651a84ef9102b29350c37803c8f435a9 (diff) |
Proper console, run-time sim editing.
Diffstat (limited to 'src/physics.h')
-rw-r--r-- | src/physics.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/physics.h b/src/physics.h index 04744ee..60db8bf 100644 --- a/src/physics.h +++ b/src/physics.h @@ -2,7 +2,7 @@ #define _PHYSICS_H #include "common.h" -#include "itc.h" +#include "itc.h" #define LIGHT_SPEED (299792458.0f) #define MU_ZERO (4.0f * M_PI * 1e-7f) @@ -47,11 +47,14 @@ enum { PHY_CMD_PAUSE, PHY_CMD_RESUME, PHY_CMD_STEP, - PHY_CMD_RESET, - PHY_CMD_DEBUG + PHY_CMD_ZERO, + PHY_CMD_DEBUG, + PHY_CMD_RESET }; typedef struct { + bool valid; + phy_field_info field_info; phy_field_em fields[3]; phy_field_aux_point *aux; @@ -68,8 +71,12 @@ typedef struct { int64_t step_real_time; } phy_sim; -void phy_sim_destroy(phy_sim *sim); +#include "console.h" + int phy_sim_create(phy_sim *sim); +void phy_sim_destroy(phy_sim *sim); +int phy_sim_create_fields(phy_sim *sim); +void phy_sim_destroy_fields(phy_sim *sim); void phy_sim_compute_const_fields(phy_sim *sim); void phy_sim_step(phy_sim *sim); |