System info & network

This commit is contained in:
2023-09-26 19:40:16 +02:00
commit 504ba77654
89 changed files with 39577 additions and 0 deletions

23
code/physics/world.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef _PIUMA_PHYSICS_WORLD_H_
#define _PIUMA_PHYSICS_WORLD_H_
#include "body.h"
struct phy_world
{
phy_body *bodies;
u32 bodies_count;
v3 gravity;
};
typedef u32 phy_body_offset;
#define PHY_BODY(world, offset) (world->bodies + offset)
phy_world *phy_create_world(v3 gravity);
void phy_destroy_world(phy_world *world);
phy_body_offset phy_create_box(phy_world *world, v3 position, v3 rotation, f32 mass, v3 dimensions);
phy_body_offset phy_create_sphere(phy_world *world, v3 position, v3 rotation, f32 mass, f32 radius);
#endif