LibGame  v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
lg_math_extra.h
1 /*
2  * LibGame - Copyright (C) Emmanuel Thomas-Maurin 2011-2025
3  * All rights reserved
4  */
5 
6 #ifndef LG_MATH_EXTRA_H
7 #define LG_MATH_EXTRA_H
8 
9 typedef struct {
10  float x;
11  float y;
12  float z;
13  float w;
14 } vec4_t;
15 
16 typedef struct {
17  vec3_t orig;
18  vec3_t dir;
19 } LG_Ray;
20 
21 enum {RAYCAST_NO_CLICK, RAYCAST_LEFT_CLICK, RAYCAST_RIGHT_CLICK};
22 
23 zboolean lg_raycast_bsphere(LG_Camera *, LG_BSphere, float *, int *, zboolean);
24 
25 vec4_t vec4(float, float, float, float);
26 
28 
29 float m4_det(mat4_t);
30 
32 
33 #endif /* LG_MATH_EXTRA_H */
lg_raycast_bsphere
zboolean lg_raycast_bsphere(LG_Camera *cam, LG_BSphere bsphere, float *inters_dist, int *click_type, zboolean flush_clicks)
Definition: lg_math_extra.c:34
m4_mul_v4
vec4_t m4_mul_v4(mat4_t m, vec4_t v)
Definition: lg_math_extra.c:136
m4_invert
mat4_t m4_invert(mat4_t mat)
Definition: lg_math_extra.c:176
vec4_t
Definition: lg_math_extra.h:9
vec3_t
Definition: math_3d.h:123
LG_Camera
Definition: lg_camera.h:22
LG_BSphere
Definition: lg_collision_detect.h:32
LG_Ray
Definition: lg_math_extra.h:16
vec4
vec4_t vec4(float x, float y, float z, float w)
Definition: lg_math_extra.c:124
m4_det
float m4_det(mat4_t mat)
Definition: lg_math_extra.c:155
mat4_t
Definition: math_3d.h:179