
forward declarations are simplified with decl_typeclass_impl impl_Typeclass_for now instead only define static inline impl_Typeclass_for can be used to achieve the old behaviour
35 lines
578 B
C
35 lines
578 B
C
#ifndef _fencer_physics_h
|
|
#define _fencer_physics_h
|
|
|
|
#include "vmath.h"
|
|
#include "transform.h"
|
|
#include "stdint.h"
|
|
#include "physics_entity.h"
|
|
#include "shape.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;
|
|
|
|
|
|
#define PHYSICS_LAYER_DEFAULT 0x1
|
|
|
|
#endif // !_fencer_physics_h
|