Untitled
Loading...
Searching...
No Matches
input.c
Go to the documentation of this file.
1#include <SDL2/SDL.h>
2#include <SDL2/SDL_events.h>
3#include <SDL2/SDL_mouse.h>
4#include <SDL2/SDL_render.h>
5#include <SDL2/SDL_scancode.h>
6#include <SDL2/SDL_timer.h>
7#include <SDL2/SDL_video.h>
8#include "core/acceleration.h"
9#include "core/engine_types.h"
10#include "ui/fonts.h"
11#include "core/shaders.h"
12#include "utilities/types.h"
13#include "load/init.h"
14#include "core/input.h"
15#include "utilities/utilities.h"
16#include "core/camera.h"
17#include "audio/audio.h"
18#include "editor/editor.h"
19
20#include "load/load.h"
21#include "ui/ui.h"
22
24{
25
26 if (!SDL_GetRelativeMouseMode() && EDITOR_SETTINGS.editor_mode && !NUKLEAR_HOVERED)
27 {
28 bool dragged = false;
30 {
31
34 {
35 UIMenu * ms = CAST_VEC(MENUS, UIMenu);
38 el->translation = tr;
39 dragged = true;
40 }
41
42 }
44 {
45
48 {
49 UIMenu * ms = CAST_VEC(MENUS, UIMenu);
52 tb->translation = tr;
53 dragged = true;
54 }
55 }
56 // if (!dragged)
57 // {
58
60 {
61
62 UIMenu * ms = CAST_VEC(MENUS, UIMenu);
63 int menu_idx = -1;
64 int tb_idx = get_text_box_from_coords((vec2){MOUSE_X, MOUSE_Y}, &menu_idx);
65 if (tb_idx != -1 && menu_idx != -1)
66 {
71 nk_window_show(NK_CTX, menu_names[MENU_TEXT], NK_SHOWN);
72
73 }
74 }
76 {
77
78 int menu_idx = -1;
79 int ui_element = get_ui_element_from_coords((vec2){MOUSE_X, MOUSE_Y}, &menu_idx);
80 if (ui_element != -1 && menu_idx != -1)
81 {
82
87 nk_window_show(NK_CTX, menu_names[MENU_UI], NK_SHOWN);
88 }
89
90 }
91 // }
92 }
93
94}
95
96
98{
99
100 if (LMB_HELD)
101 {
103 }
104}
105
106
107void process_sdl_event(SDL_Event event)
108{
109
110 if (event.type == SDL_QUIT) running = 0;
111
113 {
115 }
116 if (event.type == SDL_MOUSEBUTTONUP)
117 {
118 LMB_HELD = 0;
119 }
120
121 if (event.type == SDL_MOUSEBUTTONDOWN)
122 {
123 LMB_HELD = 1;
124 if (EDITOR_SETTINGS.editor_mode && (!NUKLEAR_HOVERED && SDL_GetRelativeMouseMode()))
125 {
126
127 vec3 dir = cam.forward;
128 vec3 inv_dir = {1.0f/dir.x, 1.0f/dir.y, 1.0f/dir.z};
129
131
132 RayHit hit = raycast_scene(CAM_POS, cam.forward, INFINITY, false);
133
134
135 Light * lights = CAST_VEC(GLOBALS.lights, Light);
136 const float light_size = 0.5f;
137 float closest_light_dist = INFINITY;
138 int closest_light = -1;
139 float closest_rprobe_dist = INFINITY;
140 int closest_rprobe = -1;
142
143 float closest_emitter_dist = INFINITY;
144 int closest_emitter = -1;
145
146 float closest_aportal_dist = INFINITY;
147 int closest_aportal = -1;
149
150 float closest_lprobe_volume_dist = INFINITY;
151 int closest_lprobe_volume = -1;
153
154 float closest_aprobe_volume_dist = INFINITY;
155 int closest_aprobe_volume = -1;
157
159 {
161 case SELMODE_MN:
162 if (hit.hit != HIT_NONE)
163 {
168 Mesh * meshes = CAST_VEC(GLOBALS.meshes, Mesh);
171 {
172
175 nk_window_show(NK_CTX, menu_names[MENU_AINST], NK_SHOWN);
176 }
177 else
178 {
179 if (mn->mesh != -1)
180 {
181
182 Mesh * m = &meshes[mn->mesh];
183
184 SubMesh * sms = CAST_VEC(m->submeshes, SubMesh);
188 nk_window_show(NK_CTX, menu_names[MENU_MN], NK_SHOWN);
189
190 }
191
192 }
193 }
194 break;
195 case SELMODE_LIGHT:
196 for (int i = 0; i < GLOBALS.lights.count; i++)
197 {
198 Light * l = &lights[i];
199 AABB aabb;
200 aabb.center = l->pos;
201 aabb.extents = (vec3){light_size, light_size, light_size};
203 vec3 intersection;
204 if (ray_intersects_aabb_with_point(aabb, CAM_POS, dir, inv_dir, &intersection))
205 {
206 float dist = vec3_length(vec3_sub(intersection, CAM_POS));
207 if (closest_light_dist > dist)
208 {
209 closest_light_dist = dist;
210 closest_light = i;
211 }
212
213 }
214
215 }
216
217 if (closest_light != -1)
218 {
219 EDITOR_SETTINGS.selected_light_id = closest_light;
222 }
223 break;
224 case SELMODE_LPV:
225 for (int i = 0; i < GLOBALS.scene_data.lighting_probe_volumes.count; i++)
226 {
227 ProbeVolume * pv = &lighting_probe_volumes[i];
228
229 vec3 intersection;
230 if (ray_intersects_obb_with_point(pv->obb, CAM_POS, dir, &intersection))
231 {
232
233 float dist = vec3_length(vec3_sub(intersection, CAM_POS));
234 if (closest_lprobe_volume_dist > dist)
235 {
236 closest_lprobe_volume_dist = dist;
237 closest_lprobe_volume = i;
238 }
239 }
240 }
241 if (closest_lprobe_volume != -1)
242 {
243
247 nk_window_show(NK_CTX, menu_names[MENU_LPROBE], NK_SHOWN);
248
249 }
250 break;
251 case SELMODE_RPROBE:
252 for (int i = 0; i < GLOBALS.scene_data.reflection_probes.count; i++)
253 {
254 ReflectionProbe * l = &rprobes[i];
256 vec3 intersection;
257 if (ray_intersects_aabb_with_point(l->aabb, CAM_POS, dir, inv_dir, &intersection))
258 {
259 float dist = vec3_length(vec3_sub(intersection, CAM_POS));
260 if (closest_rprobe_dist > dist)
261 {
262 closest_rprobe_dist = dist;
263 closest_rprobe = i;
264 }
265
266 }
267 }
268
269 if (closest_rprobe != -1)
270 {
271 EDITOR_SETTINGS.selected_r_probe = closest_rprobe;
274 nk_window_show(NK_CTX, menu_names[MENU_LIGHT], NK_SHOWN);
275 }
276
277 break;
278 case SELMODE_ENTITY:
279 break;
280 case SELMODE_TEXTBOX:
281 break;
283 break;
284 case SELMODE_APV:
285 for (int i = 0; i < GLOBALS.scene_data.audio_probe_volumes.count; i++)
286 {
287 ProbeVolume * pv = &audio_probe_volumes[i];
288
289 vec3 intersection;
290 if (ray_intersects_obb_with_point(pv->obb, CAM_POS, dir, &intersection))
291 {
292
293 float dist = vec3_length(vec3_sub(intersection, CAM_POS));
294 if (closest_aprobe_volume_dist > dist)
295 {
296 closest_aprobe_volume_dist = dist;
297 closest_aprobe_volume = i;
298 }
299 }
300 }
301 if (closest_aprobe_volume != -1)
302 {
303 EDITOR_SETTINGS.selected_audio_probe_volume_id = closest_aprobe_volume;
306 nk_window_show(NK_CTX, menu_names[MENU_AUDIO], NK_SHOWN);
307
308 }
309 break;
310 case SELMODE_APORTAL:
311 for (int i = 0; i < GLOBALS.audio_portals.count; i++)
312 {
313 AudioPortal * p = &portals[i];
314
315 AABB aabb;
316 aabb.center = p->pos;
319 vec3 intersection;
320 if (ray_intersects_aabb_with_point(aabb, CAM_POS, dir, inv_dir, &intersection))
321 {
322 float dist = vec3_length(vec3_sub(intersection, CAM_POS));
323 if (closest_aportal_dist > dist)
324 {
325 closest_aportal_dist = dist;
326 closest_aportal = i;
327 }
328 }
329 }
330 if (closest_aportal != -1)
331 {
332
336 nk_window_show(NK_CTX, menu_names[MENU_AUDIO], NK_SHOWN);
337
338 }
339 break;
340
341 case SELMODE_AEM:
342 for (int i = 0; i < MAX_AUDIO_EMITTERS; i++)
343 {
344 const float emitter_size = 0.5f;
345 if (AUDIO_EMITTERS[i].free) continue;
347
348 AABB aabb;
349 aabb.center = l->pos;
350 aabb.extents = (vec3){emitter_size, emitter_size, emitter_size };
352 vec3 intersection;
353 if (ray_intersects_aabb_with_point(aabb, CAM_POS, dir, inv_dir, &intersection))
354 {
355 float dist = vec3_length(vec3_sub(intersection, CAM_POS));
356 if (closest_emitter_dist > dist)
357 {
358 closest_emitter_dist = dist;
359 closest_emitter = i;
360 }
361 }
362 }
363 if (closest_emitter != -1)
364 {
368 nk_window_show(NK_CTX, menu_names[MENU_AUDIO], NK_SHOWN);
369
370 }
371
372 break;
373 }
374
375
376 }
377 else
378 {
380 }
381 }
382
383
384 // Look
385 if (event.type == SDL_MOUSEMOTION && SDL_GetRelativeMouseMode()) {
386
387 int dx = event.motion.xrel;
388 int dy = event.motion.yrel;
389
390 float sensitivity = 0.0012f;
391 cam.yaw -= dx * sensitivity;
392
393 cam.pitch -= dy * sensitivity;
394
395 float max_pitch = (M_PI / 2.0f);
396 float min_pitch = -(M_PI / 2.0f) + 0.01f;
397 cam.pitch =
398 SDL_clamp(cam.pitch, min_pitch, max_pitch);
400
401
402 }
403}
404
405
406float cooldown_time = 0.0f;
407float cooldown_interval = 0.1f;
408
409// Process keyboard / mouse input
410void
412 ( SDL_Window **window, SDL_Event * event_queue, int * event_queue_count, SDL_Event * sdl_queue, int * sdl_queue_count, float physics_dt)
413
414{
415
416
417
418 cooldown_time -= physics_dt;
419
420 bool accept_toggle_input = false;
421 if (cooldown_time <= 0)
422 {
423
424 accept_toggle_input = true;
425 }
426
427
428 vec3 move_dir = {0};
429
430 Uint32 buttons = SDL_GetMouseState(NULL, NULL);
431 bool lmouse_down = buttons & SDL_BUTTON(SDL_BUTTON_LEFT);
432
433
434 if (!SDL_GetRelativeMouseMode()) {
435 SDL_GetMouseState(&MOUSE_X, &MOUSE_Y);
436 }
437
438 SDL_Event event;
439 while (SDL_PollEvent(&event)) {
440
441 if (!SDL_GetRelativeMouseMode() && *event_queue_count < MAX_NUKLEAR_EVENTS) {
442 event_queue[(*event_queue_count)++] = event;
443 }
444 if (*sdl_queue_count < MAX_SDL_EVENTS) {
445 sdl_queue[(*sdl_queue_count)++] = event;
446 }
447 }
448
449 bool move_to_spawn = false;
450
451 const Uint8 *keystates = SDL_GetKeyboardState(NULL);
452
453 // Exit
454
455 if (keystates[SDL_SCANCODE_ESCAPE]) running = 0;
456 if (accept_toggle_input)
457 {
458
459 if (keystates[SDL_SCANCODE_F1])
460 {
463 }
464 if (keystates[SDL_SCANCODE_F2])
465 {
466 SHADERS_INIT();
468 }
469 if (keystates[SDL_SCANCODE_F3])
470 {
473 }
474 if (keystates[SDL_SCANCODE_F4])
475 {
478 }
479 if (keystates[SDL_SCANCODE_F5])
480 {
483 }
484 if (keystates[SDL_SCANCODE_F6])
485 {
488 }
489 if (keystates[SDL_SCANCODE_F7])
490 {
493 }
494 if (keystates[SDL_SCANCODE_F8])
495 {
498 }
499
500 }
502 {
503
504 // WASD
505 if (keystates[SDL_SCANCODE_W]) move_dir.x += 1.0f;
506 if (keystates[SDL_SCANCODE_S]) move_dir.x -= 1.0f;
507 if (keystates[SDL_SCANCODE_A]) move_dir.y += 1.0f;
508 if (keystates[SDL_SCANCODE_D]) move_dir.y -= 1.0f;
509 if (keystates[SDL_SCANCODE_Q])
510 {
512 }
513
514
515 if (accept_toggle_input)
516 {
517
518 if (keystates[SDL_SCANCODE_T])
519 {
520
521 GLOBALS.noclip = true;
523 }
524 if (keystates[SDL_SCANCODE_U])
525 {
526 GLOBALS.noclip = false;
527 vec3 current_pos = vec4_to_vec3(cam.cam_data.cam_pos);
528 reset_skeleton(&player.skeleton, current_pos);
529 player.pos = current_pos;
531
533
534
536
537 }
538 if (keystates[SDL_SCANCODE_R])
539 {
544 player.pc->vel = (vec3){0,0,0};
545 move_to_spawn = true;
547 }
548 if (keystates[SDL_SCANCODE_C])
549 {
550 player.noclip = true;
552 }
553 if (keystates[SDL_SCANCODE_V])
554 {
555 player.noclip = false;
557 }
558 if (keystates[SDL_SCANCODE_P]) {
559
560 SDL_SetWindowGrab(*window, SDL_FALSE);
561 SDL_SetRelativeMouseMode(SDL_FALSE);
563
564 }
565
566 // Lock mouse
567 if (keystates[SDL_SCANCODE_O]) {
568
569 SDL_SetWindowGrab(*window, SDL_TRUE);
570 SDL_SetRelativeMouseMode(SDL_TRUE);
572
573 }
574 if (keystates[SDL_SCANCODE_N]) {
575
578 }
579 if (keystates[SDL_SCANCODE_M]) {
580
583 }
584 }
585
586
587 // Unlock mouse
588
589
590 // Jump
591 if (keystates[SDL_SCANCODE_SPACE] && cam.on_ground) {
592
593 player.pc->vel.z += 4.0f;
594 cam.on_ground = false;
595
596 }
597 if (keystates[SDL_SCANCODE_LSHIFT])
598 {
599 player.sprinting = true;
600 }
601 else
602 {
603 player.sprinting = false;
604
605 }
606
607 }
608
609 // Apply velocity and resolve collisions
610 if (move_to_spawn) return;
612 if (!GLOBALS.noclip) {
613
615 if (!player.noclip)
616 {
618 }
619 else
620 {
622
623 }
624 update_skeleton(&player.skeleton, &cam, move_dir);
625
626
627
628 } else {
629
630 apply_velocity(&cam, move_dir, dt);
631 if (!player.noclip)
632 {
633
635 }
636 else
637 {
639 }
640
641 }
642
643}
RayHit raycast_scene(vec3 start, vec3 dir, float initial_t, bool check_normal)
Raycasts through the scene and finds closest intersection to meshes.
bool ray_intersects_obb_with_point(OBB obb, vec3 origin, vec3 dir, vec3 *intersection_point)
Checks if a ray intersects an obb and outputs an intersection point.
bool ray_intersects_aabb_with_point(AABB aabb, vec3 origin, vec3 dir, vec3 inv_dir, vec3 *intersection_point)
Checks if a ray intersects an aabb and outputs an intersection point.
Acceleration structure generation and how we traverse them.
Audio probe baking, portal creation, probe volumes, and emitter functions.
RayHit hit
void reset_skeleton(Skeleton *s, vec3 pos)
Resets a skeleton to be relative to a new position.
Definition camera.c:963
void update_skeleton(Skeleton *s, Camera *cam, vec3 vel)
Moves feet, then solves a skeleton's leg IKs and updates the springs accordingly.
Definition camera.c:1287
void resolve_collisions(Camera *cam)
Resolves collisions between camera and geometry, uses player.
Definition camera.c:1378
void apply_velocity(Camera *cam, vec3 move_dir, float dt)
Applies no-clip mode velocity to player with no gravity applied.
Definition camera.c:660
void update_body_from_legs(LegIK *left_leg, LegIK *right_leg, vec3 intended_vel, float dt)
Calculates velocity based on leg positions and integrates them into the player.
Definition camera.c:1052
Functions for camera.
Camera cam
This is currently the player cam.
Definition main.c:322
The debug editor UI for the engine.
Engine specific types and defines.
#define MAX_SDL_EVENTS
Max amount of events to poll in one render step.
Spring neck
Neck Spring (target based on pelvis).
vec3 pos
Currently anchors the Skeleton.
AABB aabb
Bounding box of area.
float roll
#define MAX_NUKLEAR_EVENTS
Max amount of events to poll in one render step.
bool on_ground
If the camera is on the ground.
bool noclip
If collision is enabled.
Vector mesh_nodes
MeshNodes.
SceneData scene_data
SceneData that is more-so scene specific.
Vector bvh_nodes
Skeleton skeleton
Player Skeleton.
PhysicsComponent * pc
PhysicsComponent in PHYSICS_COMPONENTS.
Vector audio_portals
AudioPortals.
LegIK right_leg
Right leg.
Vector meshes
Meshes.
bool sprinting
Currently unused flag for sprinting.
float neck_height
Height from ground to neck.
@ SELMODE_TEXTBOX
TextBox.
@ SELMODE_ASSETINSTANCE
AssetInstance.
@ SELMODE_MN
MeshNode.
@ SELMODE_RPROBE
ReflectionProbe.
@ SELMODE_APV
Audio ProbeVolume (APV).
@ SELMODE_LIGHT
Light.
@ SELMODE_ENTITY
Entity.
@ SELMODE_LPV
Lighting ProbeVolume (LPV).
@ SELMODE_UIELEMENT
UIElement.
@ SELMODE_AEM
AudioEmitter.
@ SELMODE_APORTAL
AudioPortal.
vec3 rotation
Current rotation of the spring.
Globals GLOBALS
Engine Globals.
Definition main.c:310
bool keyboard_locked
If the keyboard is unlocked to register text events in the editor UI.
Vector reflection_probes
ReflectionProbes in the scene.
Vector lights
Lights.
vec3 forward
@ MENU_MN
@ MENU_UI
@ MENU_LIGHT
@ MENU_LPROBE
@ MENU_AINST
@ MENU_TEXT
@ MENU_AUDIO
Vector lighting_probe_volumes
All of the lighting probe volumes, regardless of if they have been loaded yet.
Vector audio_probe_volumes
All of the AudioProbe% volumes, regardless of if they have been loaded yet.
size_t material
The Material.
float pitch
LegIK left_leg
Left leg.
float yaw
Camera * cam
Player Camera.
CamData cam_data
bool noclip
Enables flying (but not collisions).
vec4 cam_pos
The position of the Camera (padded).
ReflectionProbes used for parallax corrected cubemaps.
Sections of Meshes that are divided based on Material for batching and DrawCommand ordering purposes.
Functions that modify TextBoxes and load Fonts.
OBB obb
The OBB that defines the size.
The ProbeVolumes for APVs and LPVs, controlled by OBBs.
vec3 pos
The position of the AudioEmitter .
vec3 pos
The position of the AudioPortal.
#define MAX_AUDIO_EMITTERS
The maximum amount of AudioEmitters.
An AudioEmitter that plays audio possibily from a certain position or at a certain time.
AudioPortals used for determining paths to transmit sound when emitter and listener are occluded.
int selected_lighting_probe_volume_id
int selected_asset_instance_id
int selected_audio_probe_volume_id
int selected_audio_emitter_id
bool wireframe_toggled
Shows wireframes around many structures: Lights, ReflectionProbes, AudioProbes, AudioPortals,...
SelectionMode SELMODE
bool asset_instance_menu_open
int selected_audio_portal_id
int selected_material_mn_id
const char menu_names[][256]
The array for all editor menu names (to avoid Nuklear hashing problems).
Definition editor.c:2307
void perform_newest_redo()
Performs top-most Redo (Undo->next) and moves pointers upward.
Definition editor.c:303
void perform_newest_undo()
Performs top-most Undo and moves the top-most pointer to the previous.
Definition editor.c:287
void toggle_performance_overlay()
Toggles the performance overlay menu: PERFORMANCE_OVERLAY_MENU.
Definition editor.c:1616
#define EDITOR_APORTAL_SIZE
vec3 old_vel
Last step's velocity.
vec3 vel
Velocity.
vec3 pos
Position of light.
int mesh
The Mesh it references.
int asset_instance
The AssetInstance it belongs to.
The CPU side structure for Lights.
MeshNodes that describe the position of Meshes, GLTF nodes for GLTFAnimations, or hold references to ...
TextBox text_boxes[1024]
The TextBoxes.
Definition ui.h:567
UIElement elements[1024]
The UIElements.
Definition ui.h:566
vec2 translation
X and Y coords where Y+ is down.
Definition text.vert:45
vec2 translation
Where to place the center of the TextBox on the GPU.
Definition ui.h:278
int get_ui_element_from_coords(vec2 pos, int *menu_idx)
Finds a UIElement based on a screen position.
Definition ui.c:570
#define MAX_UI_ELEMENTS
Definition ui.h:33
Vector MENUS
All UIMenus.
Definition ui.c:13
void handle_ui_event(SDL_Event event, int mouse_x, int mouse_y)
Handles an incoming UI event.
Definition ui.c:696
vec2 screenspace_to_ui(vec2 pos)
Transfers a position to local UI space by multiplying it by a ratio of the two resolutions.
Definition ui.h:934
int get_text_box_from_coords(vec2 pos, int *menu_idx)
Finds a TextBox based on a screen position.
Definition ui.c:515
A structure holding a Font ID and text to be rendered and transformed with its properties.
Definition text.vert:5
UIElements that are contained within a UIMenu that may receive events, be contained within UIContaine...
Definition text.vert:31
The top-most UI structure that contains UIElements, TextBoxes, and UIContainers.
Definition ui.h:562
Important globals for the entire engine and initialization functions that are mainly called on engine...
void handle_held_events()
Processes UI events for persistent state if the LMB has not been released.
Definition input.c:97
float cooldown_interval
Definition input.c:407
void process_sdl_event(SDL_Event event)
Processes a deferred SDL_Event after the physics loop accumulator.
Definition input.c:107
void handle_ui_selection_event()
Definition input.c:23
void process_input(SDL_Window **window, SDL_Event *event_queue, int *event_queue_count, SDL_Event *sdl_queue, int *sdl_queue_count, float physics_dt)
Receives input from SDL in a while loop, pushes th events onto queues to be consumed at the end of th...
Definition input.c:412
float cooldown_time
Definition input.c:406
Receives input events from SDL and processes them.
Vector submeshes
The SubMeshes split via Materials.
A Mesh with geometry data that is either initialized as static or dynamic and split into SubMeshes.
Saves and loads various files that store engine data.
int MOUSE_X
Definition main.c:183
int running
The variable that tracks if we need to exit main().
Definition main.c:317
AudioEmitter AUDIO_EMITTERS[1024]
Definition main.c:67
struct nk_context * NK_CTX
Nuklear context handle used for Editor UI.
Definition main.c:327
bool NUKLEAR_HOVERED
Definition main.c:328
int MOUSE_Y
Definition main.c:183
EditorSettings EDITOR_SETTINGS
Definition main.c:330
float dt
The 1.0f/60 simulation timestep.
Definition main.c:319
vec3 spawn_point
Spawn point.
Definition main.c:289
SDL_Window * window
Definition main.c:519
vec3 CAM_POS
Shorthand variable for the camera position.
Definition main.c:205
int LMB_HELD
If the left mouse button is held.
Definition main.c:51
Player player
The Player data.
Definition main.c:287
vec3 vec3_scale(vec3 a, float b)
Definition mathf.h:248
vec3 vec3_sub(vec3 a, vec3 b)
Definition mathf.h:266
vec3 vec3_add(vec3 a, vec3 b)
Definition mathf.h:286
float vec3_length(vec3 v)
Definition mathf.h:328
Nodes for the acceleration structures of BVHs.
void SHADERS_INIT()
Deletes and then recompiles and links all engine shaders.
Definition shaders.c:1131
Initialization for ShaderPrograms.
float z
Definition types.h:13
float x
Definition types.h:13
float x
Definition types.h:12
size_t mesh_node_idx
Definition types.h:259
float y
Definition types.h:13
float y
Definition types.h:12
float z
Definition types.h:12
size_t count
Definition types.h:209
@ HIT_NONE
Definition types.h:249
Definition types.h:11
Definition types.h:12
The standalone UI library that controls text rendering, ui rendering, and events.
void calculate_aabb_bounds(AABB *aabb)
Definition utilities.c:305
#define CAST_VEC(vec, type)
Definition utilities.h:134
float wrap_angle_pi(float angle)
Definition utilities.h:57
vec3 vec4_to_vec3(vec4 v)
Definition utilities.h:165
#define M_PI
Definition utilities.h:52