System info & network
This commit is contained in:
23
code/physics/world.h
Normal file
23
code/physics/world.h
Normal 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
|
||||
Reference in New Issue
Block a user