diff --git a/core/src/physics.h b/core/src/physics.h new file mode 100644 index 0000000..0bc1569 --- /dev/null +++ b/core/src/physics.h @@ -0,0 +1,30 @@ +#ifndef _fencer_physics_h +#define _fencer_physics_h + +#include "vmath.h" +#include "transform.h" +#include "stdint.h" +#include "physics_entity.h" + +typedef uint32_t PhysicsMask; + +typedef struct Collision { + struct Collider* other; + + Vector point; + Vector normal; + + Vector velocity; + Vector penetration_vector; + + Vector edge_left; + Vector edge_right; +} Collision; + +typedef struct PhysicsQuery { + Shape* shape; + Transform* transform; + PhysicsMask mask; +} PhysicsQuery; + +#endif // !_fencer_physics_h