Kohi Game Engine
math_types.h File Reference

Contains various math types required for the engine. More...

#include "defines.h"

Go to the source code of this file.

Data Structures

union  vec2_u
 A 2-element vector. More...
 
union  vec3_u
 A 3-element vector. More...
 
union  vec4_u
 A 4-element vector. More...
 
union  mat3_u
 A 3x3 matrix. More...
 
union  mat4_u
 a 4x4 matrix, typically used to represent object transformations. More...
 
struct  extents_2d
 Represents the extents of a 2d object. More...
 
struct  extents_3d
 Represents the extents of a 3d object. More...
 
struct  vertex_3d
 Represents a single vertex in 3D space. More...
 
struct  vertex_2d
 Represents a single vertex in 2D space. More...
 
struct  colour_vertex_3d
 Represents a single vertex in 3D space with position and colour data only. More...
 
struct  transform
 Represents the transform of an object in the world. Transforms can have a parent whose own transform is then taken into account. NOTE: The properties of this should not be edited directly, but done via the functions in transform.h to ensure proper matrix generation. More...
 
struct  plane_3d
 
struct  frustum
 

Typedefs

typedef union vec2_u vec2
 A 2-element vector. More...
 
typedef union vec3_u vec3
 A 3-element vector. More...
 
typedef union vec4_u vec4
 A 4-element vector. More...
 
typedef vec4 quat
 A quaternion, used to represent rotational orientation. More...
 
typedef vec4 rect_2d
 A 2d rectangle. More...
 
typedef union mat3_u mat3
 A 3x3 matrix. More...
 
typedef union mat4_u mat4
 a 4x4 matrix, typically used to represent object transformations. More...
 
typedef struct extents_2d extents_2d
 Represents the extents of a 2d object. More...
 
typedef struct extents_3d extents_3d
 Represents the extents of a 3d object. More...
 
typedef struct vertex_3d vertex_3d
 Represents a single vertex in 3D space. More...
 
typedef struct vertex_2d vertex_2d
 Represents a single vertex in 2D space. More...
 
typedef struct colour_vertex_3d colour_vertex_3d
 Represents a single vertex in 3D space with position and colour data only. More...
 
typedef struct transform transform
 Represents the transform of an object in the world. Transforms can have a parent whose own transform is then taken into account. NOTE: The properties of this should not be edited directly, but done via the functions in transform.h to ensure proper matrix generation. More...
 
typedef struct plane_3d plane_3d
 
typedef struct frustum frustum
 

Detailed Description

Contains various math types required for the engine.

Author
Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
Version
1.0
Date
2022-01-10

Typedef Documentation

◆ colour_vertex_3d

Represents a single vertex in 3D space with position and colour data only.

◆ extents_2d

typedef struct extents_2d extents_2d

Represents the extents of a 2d object.

◆ extents_3d

typedef struct extents_3d extents_3d

Represents the extents of a 3d object.

◆ frustum

typedef struct frustum frustum

◆ mat3

typedef union mat3_u mat3

A 3x3 matrix.

◆ mat4

typedef union mat4_u mat4

a 4x4 matrix, typically used to represent object transformations.

◆ plane_3d

typedef struct plane_3d plane_3d

◆ quat

typedef vec4 quat

A quaternion, used to represent rotational orientation.

◆ rect_2d

typedef vec4 rect_2d

A 2d rectangle.

◆ transform

typedef struct transform transform

Represents the transform of an object in the world. Transforms can have a parent whose own transform is then taken into account. NOTE: The properties of this should not be edited directly, but done via the functions in transform.h to ensure proper matrix generation.

◆ vec2

typedef union vec2_u vec2

A 2-element vector.

◆ vec3

typedef union vec3_u vec3

A 3-element vector.

◆ vec4

typedef union vec4_u vec4

A 4-element vector.

◆ vertex_2d

typedef struct vertex_2d vertex_2d

Represents a single vertex in 2D space.

◆ vertex_3d

typedef struct vertex_3d vertex_3d

Represents a single vertex in 3D space.