Kohi Game Engine
transform Struct Reference

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...

#include <math_types.h>

Data Fields

vec3 position
 The position in the world. More...
 
quat rotation
 The rotation in the world. More...
 
vec3 scale
 The scale in the world. More...
 
b8 is_dirty
 Indicates if the position, rotation or scale have changed, indicating that the local matrix needs to be recalculated. More...
 
mat4 local
 The local transformation matrix, updated whenever the position, rotation or scale have changed. More...
 
f32 determinant
 
struct transformparent
 A pointer to a parent transform if one is assigned. Can also be null. More...
 

Detailed Description

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.

Field Documentation

◆ determinant

f32 determinant

◆ is_dirty

b8 is_dirty

Indicates if the position, rotation or scale have changed, indicating that the local matrix needs to be recalculated.

◆ local

mat4 local

The local transformation matrix, updated whenever the position, rotation or scale have changed.

◆ parent

struct transform* parent

A pointer to a parent transform if one is assigned. Can also be null.

◆ position

vec3 position

The position in the world.

◆ rotation

quat rotation

The rotation in the world.

◆ scale

vec3 scale

The scale in the world.


The documentation for this struct was generated from the following file: