This repository has been archived on 2022-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
LEFTONE/core/locommon/physics.h
falsycat 84c3a02b9a [RELEASE] u22-v03
This version is submitted to U22 breau.
2020-09-14 00:00:00 +00:00

29 lines
541 B
C

#pragma once
#include <stdbool.h>
#include "util/math/vector.h"
#include "./position.h"
typedef struct {
/* input */
vec2_t size;
/* input/output */
locommon_position_t pos;
vec2_t velocity;
} locommon_physics_entity_t;
bool
locommon_physics_entity_valid(
const locommon_physics_entity_t* e
);
bool /* whether they were collided */
locommon_physics_solve_collision_with_fixed_one(
locommon_physics_entity_t* e1,
const locommon_physics_entity_t* e2,
float dt
);