feat(physics): added physics.h header for some physics-system-wide definitions
This commit is contained in:
parent
6a2a612594
commit
84a940d046
30
core/src/physics.h
Normal file
30
core/src/physics.h
Normal file
|
@ -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
|
Loading…
Reference in a new issue