Types
Vector types
Header: <glm/glm.hpp>
float |
vec2 |
vec3 |
vec4 |
double |
dvec2 |
dvec3 |
dvec4 |
int |
ivec2 |
ivec3 |
ivec4 |
unsigned int |
uvec2 |
uvec3 |
uvec4 |
bool |
bvec2 |
bvec3 |
bvec4 |
Matrix types
Header: <glm/glm.hpp>
float |
mat2 |
mat3 |
mat4 |
double |
dmat2 |
dmat3 |
dmat4 |
float |
mat2x2 |
mat2x3 |
mat2x4 |
double |
dmat2x2 |
dmat2x3 |
dmat2x4 |
float |
mat3x2 |
mat3x3 |
mat3x4 |
double |
dmat3x2 |
dmat3x3 |
dmat3x4 |
float |
mat4x2 |
mat4x3 |
mat4x4 |
double |
dmat4x2 |
dmat4x3 |
dmat4x4 |
GLM matrix types are column-major; i.e. a value of type mat4x4
represents a matrix \[\begin{pmatrix}
\mathrm{a[0][0]} & \mathrm{a[1][0]} & \mathrm{a[2][0]} & \mathrm{a[3][0]} \\
\mathrm{a[0][1]} & \mathrm{a[1][1]} & \mathrm{a[2][1]} & \mathrm{a[3][1]} \\
\mathrm{a[0][2]} & \mathrm{a[1][2]} & \mathrm{a[2][2]} & \mathrm{a[3][2]} \\
\mathrm{a[0][3]} & \mathrm{a[1][3]} & \mathrm{a[2][3]} & \mathrm{a[3][3]}
\end{pmatrix}\] and a value of type mat2x3
represents a matrix \[\begin{pmatrix}
\mathrm{a[0][0]} & \mathrm{a[1][0]} \\
\mathrm{a[0][1]} & \mathrm{a[1][1]} \\
\mathrm{a[0][2]} & \mathrm{a[1][2]}
\end{pmatrix}.\]
Stable extension: vec1
Header: <glm/ext/vec1.hpp>
float |
vec1 |
double |
dvec1 |
int |
ivec1 |
unsigned int |
uvec1 |
bool |
bvec1 |