From 5659a1baba94d10f76e72c8bbb9fa7576ab4f19b Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Wed, 6 Apr 2016 00:26:28 +0200 Subject: Proper console, run-time sim editing. --- src/physics.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/physics.h') 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); -- cgit