changed other type of collision to PhysicsEntity and added separation force
This commit is contained in:
parent
39625789e2
commit
8c78395219
|
@ -2,17 +2,19 @@
|
||||||
#define _fencer_collision_h
|
#define _fencer_collision_h
|
||||||
|
|
||||||
#include "shape.h"
|
#include "shape.h"
|
||||||
|
#include "physics_entity.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
struct Collision {
|
typedef struct Collision {
|
||||||
Shape* other;
|
PhysicsEntity other;
|
||||||
|
|
||||||
Vector point;
|
Vector point;
|
||||||
Vector normal;
|
Vector normal;
|
||||||
Vector velocity;
|
Vector velocity;
|
||||||
|
Vector separation_force;
|
||||||
size_t edge_left;
|
size_t edge_left;
|
||||||
size_t edge_right;
|
size_t edge_right;
|
||||||
};
|
} Collision;
|
||||||
|
|
||||||
|
extern Collision get_collision(PhysicsEntity a, PhysicsEntity b);
|
||||||
|
|
||||||
#endif // !_fencer_collision_h
|
#endif // !_fencer_collision_h
|
||||||
|
|
Loading…
Reference in a new issue