1#ifndef NNGN_COLLISION_COLLIDERS_H
2#define NNGN_COLLISION_COLLIDERS_H
40 static void update(std::span<AABBCollider>
s);
49 static void update(std::span<BBCollider>
s);
57 static void update(std::span<SphereCollider>
s);
65 static void update(std::span<PlaneCollider>
s);
70 static constexpr float G = 6.674e-11f;
75 static void update(std::span<GravityCollider>
s);
update
Definition img_common.lua:42
pos
Definition lua_audio.cpp:17
std::uint8_t u8
Definition def.h:12
load
Definition entity.lua:7
v[1]
Definition math.lua:22
Definition colliders.h:34
vec2 tr
Definition colliders.h:36
vec2 rel_bl
Definition colliders.h:35
vec2 center
Definition colliders.h:36
vec2 bl
Definition colliders.h:36
vec2 rel_center
Definition colliders.h:35
vec2 rel_tr
Definition colliders.h:35
float radius
Definition colliders.h:37
Definition colliders.h:44
BBCollider(vec2 p_bl, vec2 p_tr, float p_cos, float p_sin)
Definition colliders.h:47
float cos
Definition colliders.h:45
float sin
Definition colliders.h:45
Definition colliders.h:15
Type
Definition colliders.h:16
@ GRAVITY
Definition colliders.h:17
@ SPHERE
Definition colliders.h:17
@ PLANE
Definition colliders.h:17
@ NONE
Definition colliders.h:17
@ AABB
Definition colliders.h:17
@ BB
Definition colliders.h:17
@ N_TYPES
Definition colliders.h:17
Collider(vec3 p)
Definition colliders.h:29
Entity * entity
Definition colliders.h:24
float m
Definition colliders.h:26
Flag
Definition colliders.h:19
@ COLLIDING
Definition colliders.h:20
@ TRIGGER
Definition colliders.h:21
@ SOLID
Definition colliders.h:22
Flags< Flag > flags
Definition colliders.h:27
vec3 vel
Definition colliders.h:25
Collider(vec3 p, float p_m)
Definition colliders.h:30
Wrapper for a small unsigned integral representing flags.
Definition flags.h:18
Definition colliders.h:69
GravityCollider()=default
GravityCollider(vec3 p, float p_m, float max_distance)
Definition colliders.h:73
static constexpr float G
Definition colliders.h:70
float max_distance2
Definition colliders.h:71
Definition colliders.h:61
PlaneCollider(vec3 p, vec4 v)
Definition colliders.h:64
vec4 abcd
Definition colliders.h:62
Definition colliders.h:53
float r
Definition colliders.h:54
SphereCollider(vec3 p_pos, float p_r)
Definition colliders.h:56
Non-owning reference to a table on the stack.
Definition table.h:166
Owning reference to a table on the stack, popped when destroyed.
Definition table.h:172
Operations on table values.
std::chrono::seconds s
Definition timing.cpp:6