diff options
Diffstat (limited to 'src/physics.h')
-rw-r--r-- | src/physics.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/physics.h b/src/physics.h index 60db8bf..80f3fdf 100644 --- a/src/physics.h +++ b/src/physics.h @@ -38,8 +38,6 @@ typedef struct { size_t z; float Px, Py; - - float lambda, time; } phy_source_xyplane; enum { @@ -49,7 +47,22 @@ enum { PHY_CMD_STEP, PHY_CMD_ZERO, PHY_CMD_DEBUG, - PHY_CMD_RESET + PHY_CMD_RESET, + PHY_CMD_CSG_PUSH, + PHY_CMD_CSG_CLEAR +}; + +typedef enum { + CSG_SPHERE +} phy_csg_shape; + +typedef struct phy_csg_step_s phy_csg_step; +struct phy_csg_step_s { + phy_csg_shape shape; + vec3_t x; + vec3_t d; + float value; + phy_csg_step *next; }; typedef struct { @@ -63,6 +76,9 @@ typedef struct { phy_source_xyplane source_xyplane; + phy_csg_step *csg_stack; + float eps_min, eps_max; + // UI stuff bool running; itc_chan ctl; @@ -79,6 +95,7 @@ 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); +void phy_sim_csg_clear(phy_sim *sim); int phy_thread(phy_sim *sim); |