489 #define KFRUSTUM_SIDE_COUNT 6
This file contains global type definitions which are used throughout the entire engine and applicatio...
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:27
float f32
32-bit floating point number
Definition: defines.h:49
signed int i32
Signed 32-bit integer.
Definition: defines.h:41
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:30
struct skinned_vertex_3d skinned_vertex_3d
Represents a single skinned vertex in 3D space.
u32 ray_flags
Definition: math_types.h:631
union ivec4_u ivec4
A 4-element vector of signed ints.
union uvec3_u uvec3
A 3-element vector of unsigned ints.
union mat3_u mat3
A 3x3 matrix.
struct ray ray
Represents a line which starts at an origin and proceed infinitely in the given direction....
extents_3d aabb
Axis-aligned bounding box.
Definition: math_types.h:411
struct raycast_hit raycast_hit
#define KFRUSTUM_SIDE_COUNT
Definition: math_types.h:489
struct extents_2d extents_2d
Represents the extents of a 2d object.
struct vertex_2d vertex_2d
Represents a single vertex in 2D space.
union vec2_u vec2
A 2-element vector.
union vec4i_t vec4i
A 4-element integer-based vector.
axis_3d
Definition: math_types.h:16
@ AXIS_ZY
Definition: math_types.h:25
@ AXIS_XY
Definition: math_types.h:20
@ AXIS_X
Definition: math_types.h:17
@ AXIS_ZX
Definition: math_types.h:24
@ AXIS_Y
Definition: math_types.h:18
@ AXIS_XZ
Definition: math_types.h:21
@ AXIS_YZ
Definition: math_types.h:23
@ AXIS_Z
Definition: math_types.h:19
@ AXIS_YX
Definition: math_types.h:22
union vec4_u vec4
A 4-element vector.
union uvec2_u uvec2
A 2-element vector of unsigned ints.
vec4i rect_2di
Definition: math_types.h:620
union vec3_u vec3
A 3-element vector.
union mat4_u mat4
a 4x4 matrix, typically used to represent object transformations.
union uvec4_u uvec4
A 4-element vector of unsigned ints.
struct extents_3d extents_3d
Represents the extents of a 3d object.
raycast_hit_type
Definition: math_types.h:645
@ RAYCAST_HIT_TYPE_SURFACE
Definition: math_types.h:647
@ RAYCAST_HIT_TYPE_BVH_AABB
Definition: math_types.h:646
@ RAYCAST_HIT_TYPE_BVH_AABB_BASE_NODE
Definition: math_types.h:649
struct vertex_3d vertex_3d
Represents a single vertex in 3D space.
struct raycast_result raycast_result
union ivec2_u ivec2
A 2-element vector of signed ints.
union ivec3_u ivec3
A 3-element vector of signed ints.
vec4 rect_2d
A 2d rectangle.
Definition: math_types.h:278
ray_flag_bits
Definition: math_types.h:626
@ RAY_FLAG_IGNORE_IF_INSIDE_BIT
Definition: math_types.h:628
@ RAY_FLAG_NONE
Definition: math_types.h:627
struct position_vertex_3d position_vertex_3d
struct colour_vertex_3d colour_vertex_3d
Represents a single vertex in 3D space with position and colour data only.
kfrustum_side
Definition: math_types.h:491
@ KFRUSTUM_SIDE_NEAR
Definition: math_types.h:497
@ KFRUSTUM_SIDE_FAR
Definition: math_types.h:496
@ KFRUSTUM_SIDE_LEFT
Definition: math_types.h:495
@ KFRUSTUM_SIDE_RIGHT
Definition: math_types.h:494
@ KFRUSTUM_SIDE_TOP
Definition: math_types.h:492
@ KFRUSTUM_SIDE_BOTTOM
Definition: math_types.h:493
union vec3i_t vec3i
A 3-element integer-based vector.
union vec2i_t vec2i
A 2-element integer-based vector.
vec4 quat
A quaternion, used to represent rotational orientation.
Definition: math_types.h:275
Represents a single vertex in 3D space with position and colour data only.
Definition: math_types.h:477
vec4 position
The position of the vertex. w is ignored.
Definition: math_types.h:479
vec4 colour
The colour of the vertex.
Definition: math_types.h:481
Represents the extents of a 2d object.
Definition: math_types.h:391
vec2 max
The maximum extents of the object.
Definition: math_types.h:395
vec2 min
The minimum extents of the object.
Definition: math_types.h:393
Represents the extents of a 3d object.
Definition: math_types.h:401
vec3 min
The minimum extents of the object.
Definition: math_types.h:403
vec3 max
The maximum extents of the object.
Definition: math_types.h:405
Definition: math_types.h:500
plane_3d sides[KFRUSTUM_SIDE_COUNT]
Definition: math_types.h:502
Definition: math_types.h:665
vec3 position
Definition: math_types.h:666
f32 radius
Definition: math_types.h:667
Definition: math_types.h:413
vec3 center
Definition: math_types.h:414
vec3 axis[3]
Definition: math_types.h:416
vec3 half_extents
Definition: math_types.h:417
Definition: math_types.h:484
f32 distance
Definition: math_types.h:486
vec3 normal
Definition: math_types.h:485
Definition: math_types.h:469
vec4 position
The position of the vertex. w is ignored.
Definition: math_types.h:471
Represents a line which starts at an origin and proceed infinitely in the given direction....
Definition: math_types.h:638
f32 max_distance
Definition: math_types.h:641
vec3 origin
Definition: math_types.h:639
vec3 direction
Definition: math_types.h:640
ray_flags flags
Definition: math_types.h:642
Definition: math_types.h:652
vec3 position
Definition: math_types.h:656
f32 distance
Definition: math_types.h:654
vec3 normal
Definition: math_types.h:657
u64 user
Definition: math_types.h:655
raycast_hit_type type
Definition: math_types.h:653
Definition: math_types.h:660
raycast_hit * hits
Darray of hits. Not set if there are no hits.
Definition: math_types.h:662
Represents a single skinned vertex in 3D space.
Definition: math_types.h:439
vec3 position
The position of the vertex.
Definition: math_types.h:441
vec3 normal
The normal of the vertex.
Definition: math_types.h:443
vec2 texcoord
The texture coordinate of the vertex.
Definition: math_types.h:445
ivec4 bone_ids
Bone indices that will influence this index. -1 means no bone.
Definition: math_types.h:451
vec4 tangent
The tangent of the vertex.
Definition: math_types.h:449
vec4 weights
Weights from each bone that will influence this index.
Definition: math_types.h:453
vec4 colour
The colour of the vertex.
Definition: math_types.h:447
Definition: math_types.h:622
vec3 verts[3]
Definition: math_types.h:623
Represents a single vertex in 2D space.
Definition: math_types.h:459
vec2 position
The position of the vertex.
Definition: math_types.h:461
vec2 texcoord
The texture coordinate of the vertex.
Definition: math_types.h:463
Represents a single vertex in 3D space.
Definition: math_types.h:423
vec3 position
The position of the vertex.
Definition: math_types.h:425
vec3 normal
The normal of the vertex.
Definition: math_types.h:427
vec2 texcoord
The texture coordinate of the vertex.
Definition: math_types.h:429
vec4 tangent
The tangent of the vertex.
Definition: math_types.h:433
vec4 colour
The colour of the vertex.
Definition: math_types.h:431
A 2-element vector of signed ints.
Definition: math_types.h:89
i32 r
The first element.
Definition: math_types.h:98
i32 g
The third element.
Definition: math_types.h:106
i32 y
The second element.
Definition: math_types.h:104
i32 s
The first element.
Definition: math_types.h:100
i32 t
The third element.
Definition: math_types.h:108
i32 elements[2]
An array of x, y, z.
Definition: math_types.h:91
i32 x
The first element.
Definition: math_types.h:96
A 3-element vector of signed ints.
Definition: math_types.h:193
i32 r
The first element.
Definition: math_types.h:202
i32 g
The third element.
Definition: math_types.h:210
i32 elements[3]
An array of x, y, z.
Definition: math_types.h:195
i32 y
The second element.
Definition: math_types.h:208
i32 b
The third element.
Definition: math_types.h:218
i32 s
The first element.
Definition: math_types.h:204
i32 p
The third element.
Definition: math_types.h:220
i32 t
The third element.
Definition: math_types.h:212
i32 z
The third element.
Definition: math_types.h:216
i32 x
The first element.
Definition: math_types.h:200
A 4-element vector of signed ints.
Definition: math_types.h:331
i32 w
The fourth element.
Definition: math_types.h:364
i32 r
The first element.
Definition: math_types.h:340
i32 g
The third element.
Definition: math_types.h:348
i32 elements[4]
An array of x, y, z, w.
Definition: math_types.h:333
i32 y
The second element.
Definition: math_types.h:346
i32 height
The fourth element.
Definition: math_types.h:370
i32 width
The third element.
Definition: math_types.h:360
i32 b
The third element.
Definition: math_types.h:356
i32 s
The first element.
Definition: math_types.h:342
i32 a
The fourth element.
Definition: math_types.h:366
i32 p
The third element.
Definition: math_types.h:358
i32 t
The third element.
Definition: math_types.h:350
i32 z
The third element.
Definition: math_types.h:354
i32 q
The fourth element.
Definition: math_types.h:368
i32 x
The first element.
Definition: math_types.h:338
A 3x3 matrix.
Definition: math_types.h:377
f32 data[12]
The matrix elements.
Definition: math_types.h:379
a 4x4 matrix, typically used to represent object transformations.
Definition: math_types.h:383
f32 data[16]
The matrix elements.
Definition: math_types.h:385
A 2-element vector of unsigned ints.
Definition: math_types.h:61
u32 y
The second element.
Definition: math_types.h:76
u32 s
The first element.
Definition: math_types.h:72
u32 t
The third element.
Definition: math_types.h:80
u32 r
The first element.
Definition: math_types.h:70
u32 elements[2]
An array of x, y, z.
Definition: math_types.h:63
u32 g
The third element.
Definition: math_types.h:78
u32 x
The first element.
Definition: math_types.h:68
A 3-element vector of unsigned ints.
Definition: math_types.h:157
u32 y
The second element.
Definition: math_types.h:172
u32 b
The third element.
Definition: math_types.h:182
u32 s
The first element.
Definition: math_types.h:168
u32 t
The third element.
Definition: math_types.h:176
u32 elements[3]
An array of x, y, z.
Definition: math_types.h:159
u32 r
The first element.
Definition: math_types.h:166
u32 p
The third element.
Definition: math_types.h:184
u32 z
The third element.
Definition: math_types.h:180
u32 g
The third element.
Definition: math_types.h:174
u32 x
The first element.
Definition: math_types.h:164
A 4-element vector of unsigned ints.
Definition: math_types.h:283
u32 y
The second element.
Definition: math_types.h:298
u32 b
The third element.
Definition: math_types.h:308
u32 s
The first element.
Definition: math_types.h:294
u32 t
The third element.
Definition: math_types.h:302
u32 w
The fourth element.
Definition: math_types.h:316
u32 r
The first element.
Definition: math_types.h:292
u32 q
The fourth element.
Definition: math_types.h:320
u32 elements[4]
An array of x, y, z, w.
Definition: math_types.h:285
u32 width
The third element.
Definition: math_types.h:312
u32 p
The third element.
Definition: math_types.h:310
u32 z
The third element.
Definition: math_types.h:306
u32 height
The fourth element.
Definition: math_types.h:322
u32 g
The third element.
Definition: math_types.h:300
u32 a
The fourth element.
Definition: math_types.h:318
u32 x
The first element.
Definition: math_types.h:290
A 2-element vector.
Definition: math_types.h:31
f32 r
The first element.
Definition: math_types.h:39
f32 v
The second element.
Definition: math_types.h:53
f32 s
The first element.
Definition: math_types.h:41
f32 x
The first element.
Definition: math_types.h:37
f32 g
The second element.
Definition: math_types.h:49
f32 t
The second element.
Definition: math_types.h:51
f32 u
The first element.
Definition: math_types.h:43
f32 y
The second element.
Definition: math_types.h:47
f32 elements[2]
An array of x, y.
Definition: math_types.h:33
A 2-element integer-based vector.
Definition: math_types.h:508
i32 v
The second element.
Definition: math_types.h:530
i32 r
The first element.
Definition: math_types.h:516
i32 g
The second element.
Definition: math_types.h:526
i32 y
The second element.
Definition: math_types.h:524
i32 u
The first element.
Definition: math_types.h:520
i32 s
The first element.
Definition: math_types.h:518
i32 t
The second element.
Definition: math_types.h:528
i32 elements[2]
An array of x, y.
Definition: math_types.h:510
i32 x
The first element.
Definition: math_types.h:514
A 3-element vector.
Definition: math_types.h:117
f32 elements[3]
An array of x, y, z.
Definition: math_types.h:119
f32 r
The first element.
Definition: math_types.h:125
f32 v
The second element.
Definition: math_types.h:139
f32 s
The first element.
Definition: math_types.h:127
f32 b
The third element.
Definition: math_types.h:145
f32 x
The first element.
Definition: math_types.h:123
f32 p
The third element.
Definition: math_types.h:147
f32 g
The second element.
Definition: math_types.h:135
f32 t
The second element.
Definition: math_types.h:137
f32 u
The first element.
Definition: math_types.h:129
f32 z
The third element.
Definition: math_types.h:143
f32 y
The second element.
Definition: math_types.h:133
f32 w
The third element.
Definition: math_types.h:149
A 3-element integer-based vector.
Definition: math_types.h:538
i32 r
The first element.
Definition: math_types.h:547
i32 g
The third element.
Definition: math_types.h:555
i32 elements[3]
An array of x, y, z.
Definition: math_types.h:540
i32 y
The second element.
Definition: math_types.h:553
i32 b
The third element.
Definition: math_types.h:563
i32 s
The first element.
Definition: math_types.h:549
i32 p
The third element.
Definition: math_types.h:565
i32 t
The third element.
Definition: math_types.h:557
i32 z
The third element.
Definition: math_types.h:561
i32 x
The first element.
Definition: math_types.h:545
A 4-element vector.
Definition: math_types.h:229
f32 q
The fourth element.
Definition: math_types.h:266
f32 elements[4]
An array of x, y, z, w.
Definition: math_types.h:231
f32 height
The fourth element.
Definition: math_types.h:268
f32 r
The first element.
Definition: math_types.h:238
f32 a
The fourth element.
Definition: math_types.h:264
f32 s
The first element.
Definition: math_types.h:240
f32 b
The third element.
Definition: math_types.h:254
f32 x
The first element.
Definition: math_types.h:236
f32 p
The third element.
Definition: math_types.h:256
f32 g
The third element.
Definition: math_types.h:246
f32 t
The third element.
Definition: math_types.h:248
f32 width
The third element.
Definition: math_types.h:258
f32 z
The third element.
Definition: math_types.h:252
f32 y
The second element.
Definition: math_types.h:244
f32 w
The fourth element.
Definition: math_types.h:262
A 4-element integer-based vector.
Definition: math_types.h:574
i32 w
The fourth element.
Definition: math_types.h:607
i32 r
The first element.
Definition: math_types.h:583
i32 g
The third element.
Definition: math_types.h:591
i32 elements[4]
An array of x, y, z, w.
Definition: math_types.h:576
i32 y
The second element.
Definition: math_types.h:589
i32 height
The fourth element.
Definition: math_types.h:613
i32 width
The third element.
Definition: math_types.h:603
i32 b
The third element.
Definition: math_types.h:599
i32 s
The first element.
Definition: math_types.h:585
i32 a
The fourth element.
Definition: math_types.h:609
i32 p
The third element.
Definition: math_types.h:601
i32 t
The third element.
Definition: math_types.h:593
i32 z
The third element.
Definition: math_types.h:597
i32 q
The fourth element.
Definition: math_types.h:611
i32 x
The first element.
Definition: math_types.h:581