PDA

View Full Version : glm vec with arbitrary size



jocaps
02-27-2014, 12:39 AM
Hi,

I am assuming this is not yet possible in glm (or at least I couldnt find it anywhere in glm): vectors with with arbitrary (fixed) size. I have some algorithms that make use of several dimensional vector space and I want to be minimal in my usage of external libraries, so my question is whether glm supports arbitrary size vec (and operations with them) and matrices? Otherwise I am thinking of extending the library to my needs (I mean I just need some n-dimensional minor matrix and vector operations for my project). Any ideas, hints, suggestions about this?

Jose

tonyo_au
02-27-2014, 04:41 PM
glm is really for graphics which doesn't need more that 4 dimensions; but it is just templates so it could be expanded to more dimensions - I would look at type_vec4.hpp and type_vec3.hpp to see how the template is expanded.