ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
Loading...
Searching...
No Matches
mat4 Union Reference

Column-major 4×4 single-precision matrix. Layout matches GLSL mat4. More...

#include <Mathlib.h>

Data Fields

float f [16]
 Flat array accessor.
 
float m [4][4]
 Column-major 2D array accessor. m[col][row].
 
vec4 cols [4]
 Column vectors.
 

Detailed Description

Column-major 4×4 single-precision matrix. Layout matches GLSL mat4.

m[col][row] — the first index is the column, the second is the row. cols[i] is the i-th column as a vec4. f[col * 4 + row] is the flat accessor.

Field Documentation

◆ cols

vec4 mat4::cols[4]

Column vectors.

◆ f

float mat4::f[16]

Flat array accessor.

◆ m

float mat4::m[4][4]

Column-major 2D array accessor. m[col][row].


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