Maybe I’m just missing something in the docs, but it seem it’s not possible with GLM to take the transpose of a vector. I also see no mat3x1 or mat1x3 types. Also glm::transpose doesn’t work for vectors. Am I missing something or is this just a feature lacking in GLM?
Share
GLM is based on GLSL, where there’s simply no need to transpose a vector. If you do vector/matrix multiplication, it will multiply the vector in the way that works for the size of the matrix (unless it would have to change the order of the multiplication). So if you have a
mat4and domat4*vec4, yourvec4is considered a column vector. If you dovec4*mat4, it is considered a row vector. If you domat2x4*vec4, you get an error, whilevec4*mat2x4works (as a row vector).So in general, there’s no reason to need to “transpose” a vector. The system simply does whatever works.